* of {@link #getImplementedInterface()} bound to itself. The value is communicated through {@link #getValue()}, which
* is only an encapsulation holding information about the object model and the data in that object model.
*
+ * <p>
+ * Implementations are strongly encouraged to use {@link AbstractOpaqueObject} as their base implementation class.
+ *
* @param <T> Generated interface
*/
@Beta
ValueAware<OpaqueData<?>> {
@Override
Class<T> getImplementedInterface();
+
+ /**
+ * Hash code value of this object. This is a combination of {@link #getImplementedInterface()} and the value being
+ * held. The canonical computation algorithm is defined in {@link AbstractOpaqueObject#hashCode()}.
+ *
+ * @return a hash code value for this object.
+ */
+ @Override
+ int hashCode();
+
+ /**
+ * Compare this object to another object. The comparison needs to take into account
+ * {@link #getImplementedInterface()} first and then follow comparison on {@link #getValue()}. For canonical
+ * algorithm please refer to {@link AbstractOpaqueObject#equals(Object)}.
+ *
+ * @param obj the reference object with which to compare.
+ * @return {@code true} if this object is the same as the obj argument; {@code false} otherwise.
+ */
+ @Override
+ boolean equals(Object obj);
}