import java.util.HashMap;
import java.util.Map;
+import java.util.Map.Entry;
/**
* TODO
return false;
}
+ //
+ // OBJECT METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int hashCode() {
+ return id().hashCode();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Base)) {
+ return false;
+ }
+ return id().equals(((Base) obj).id());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append(getClass().getName());
+ stringBuilder.append('[').append("id=").append(id());
+ for (Entry<String, Value<?>> attributeEntry : attributes.entrySet()) {
+ stringBuilder.append(',').append(attributeEntry.getKey()).append('=').append(attributeEntry.getValue().get());
+ }
+ stringBuilder.append(']');
+ return stringBuilder.toString();
+ }
+
protected static class Value<T> {
private T original;