BUG-5626: introduce utility identifiers
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / Identifier.java
index 148865b850cec84120517d8a6451e66072b6d441..96696d7b656dd2cd2f8540bc6b0d1270af0dfabf 100644 (file)
@@ -14,8 +14,22 @@ import java.io.Serializable;
  * identify concepts -- such as names, addresses, classes, etc. We do not
  * require too much, just that the identifiers are serializable (and this
  * transferable).
+ *
+ * Implementations are expected to implement hashCode() and equals() methods
+ * in a way, which ensures that objects before and after serialization are
+ * considered equal.
+ *
+ * Implementations are advised to use the Externalizable Proxy pattern to
+ * allow future evolution of their serialization format.
  */
 public interface Identifier extends Serializable, Immutable {
+    @Override
+    boolean equals(Object o);
+
+    @Override
+    int hashCode();
 
+    @Override
+    String toString();
 }