Esempio n. 1
0
 @Override
 public String asText() {
   switch (type) {
     case ADDED:
       return type.name().toCharArray()[0]
           + "\t"
           + TextValueSerializer.asString(Optional.fromNullable((Object) newGeometry.orNull()));
     case REMOVED:
       return type.name().toCharArray()[0]
           + "\t"
           + TextValueSerializer.asString(Optional.fromNullable((Object) oldGeometry.orNull()));
     case MODIFIED:
     default:
       return type.name().toCharArray()[0] + "\t" + diff.asText();
   }
 }
Esempio n. 2
0
  // =============================================================
  //  PUBLIC METHODS
  //  ============================================================
  public String getString() {
    StringBuilder builder = new StringBuilder("\n[" + mType.name() + "]");

    if (!TextUtils.isEmpty(getAction())) builder.append("\nAction:[" + getAction() + "]");
    if (!TextUtils.isEmpty(getPointer())) builder.append("\nPointer:[" + getPointer() + "]");
    for (int i = 0; i < mAttribute.size(); i++)
      if (!TextUtils.isEmpty(mAttribute.get(i).getString()))
        builder.append("\nAttr:[" + (mAttribute.get(i).getString()) + "]");

    return builder.toString();
  }
Esempio n. 3
0
 public boolean add(final TYPE e) {
   underlying.add(e.name());
   return super.add(e);
 }