public boolean isDirectChildOf(EntityType type){
  return parentTypeName != null && parentTypeName.equals(type.getInterfaceName());
}

public boolean isDirectChildOf ( EntityType type ) { return parentTypeName != null && parentTypeName . equals ( type . getInterfaceName ( ) ) ; }
the provided type must be the direct parent
