Esempio n. 1
0
 @Override
 public ISpecies getParentSpecies() {
   if (parentSpecies == null) {
     final TypeDescription parentSpecDesc = getDescription().getParent();
     // Takes care of invalid species (see Issue 711)
     if (parentSpecDesc == null || parentSpecDesc == getDescription()) {
       return null;
     }
     ISpecies currentMacroSpec = this.getMacroSpecies();
     while (currentMacroSpec != null && parentSpecies == null) {
       parentSpecies = currentMacroSpec.getMicroSpecies(parentSpecDesc.getName());
       currentMacroSpec = currentMacroSpec.getMacroSpecies();
     }
   }
   return parentSpecies;
 }
Esempio n. 2
0
 @Override
 public boolean isPeer(final ISpecies other) {
   return other != null && other.getMacroSpecies().equals(this.getMacroSpecies());
 }