@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(); } }
// ============================================================= // 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(); }
public boolean add(final TYPE e) { underlying.add(e.name()); return super.add(e); }