Esempio n. 1
0
  public Attribute getAttributeInHierarchy(String name) {

    Entity entity = this;

    while (entity != null) {

      Attribute attribute = entity.getAttribute(name);
      if (attribute != null) {
        return attribute;
      }
      entity = entity.mExtendEntity;
    }

    return null;
  }
Esempio n. 2
0
  public void addCharacteristic(Characteristic<?> characteristic) {

    if (mCharacteristics == null) {
      mCharacteristics = new ArrayList<Characteristic<?>>(1);
    }

    if (containsCharacteristic(characteristic)
        || (mExtendEntity != null && mExtendEntity.containsCharacteristic(characteristic))) {
      System.out.println(
          ">> WARNING: Duplicate "
              + characteristic.getClass().getSimpleName()
              + ": "
              + characteristic);
      return;
    }

    mCharacteristics.add(characteristic);
  }