Пример #1
0
 public boolean sameAs(Environmental E) {
   if (!(E instanceof GenShipComponent)) return false;
   String[] theCodes = getStatCodes();
   for (int i = 0; i < theCodes.length; i++)
     if (!E.getStat(theCodes[i]).equals(getStat(theCodes[i]))) return false;
   return true;
 }
Пример #2
0
 @Override
 public boolean sameAs(Environmental E) {
   if (!(E instanceof GenShopkeeper)) return false;
   final String[] codes = getStatCodes();
   for (int i = 0; i < codes.length; i++)
     if (!E.getStat(codes[i]).equals(getStat(codes[i]))) return false;
   return true;
 }
Пример #3
0
 @Override
 public boolean sameAs(Environmental E) {
   if (!(E instanceof GenLightSource)) return false;
   for (int i = 0; i < getStatCodes().length; i++) {
     if (!E.getStat(getStatCodes()[i]).equals(getStat(getStatCodes()[i]))) return false;
   }
   return true;
 }