Example #1
0
 public static String flag(final int flag, final MyAsset parentAsset) {
   ItemFlag itemFlag = StaticData.get().getItemFlags().get(flag);
   if (itemFlag != null) {
     if (parentAsset != null && !parentAsset.getFlag().isEmpty()) {
       return parentAsset.getFlag() + " > " + itemFlag.getFlagName();
     } else {
       return itemFlag.getFlagName();
     }
   }
   return "!" + flag;
 }
Example #2
0
  public static List<MyAsset> getParents(final MyAsset parentAsset) {
    List<MyAsset> parents;
    if (parentAsset != null) {
      parents = new ArrayList<MyAsset>(parentAsset.getParents());
      parents.add(parentAsset);
    } else {
      parents = new ArrayList<MyAsset>();
    }

    return parents;
  }
Example #3
0
 public static MyLocation getLocation(long locationID, final MyAsset parentAsset) {
   // Offices
   if (locationID >= 66000000) {
     if (locationID < 66014933) {
       locationID = locationID - 6000001;
     } else {
       locationID = locationID - 6000000;
     }
   }
   MyLocation location = StaticData.get().getLocations().get(locationID);
   if (location != null) {
     return location;
   }
   if (parentAsset != null) {
     location = parentAsset.getLocation();
     if (location != null) {
       return location;
     }
   }
   return new MyLocation(locationID);
 }
Example #4
0
 @Override
 public int compareTo(final MyAsset o) {
   return this.getName().compareToIgnoreCase(o.getName());
 }