public interface IEquatableDefinition
Modifier and Type | Method and Description |
---|---|
int |
getDefinitionHashCode()
Gets a hash code representing the definition of this object.
|
boolean |
isSameDefinition(Object other)
Determines if this object has the same definition as another object.
|
boolean isSameDefinition(Object other)
This method is very similar to Object.equals(Object)
except that it explicitly considers
the "definitions" of the two objects for objects that do not typically act like values. The definition of
an object typically includes all of the fields of the object.
other
- The other instance to compare to this one.true
if this object has the same definition as the specified one.
false
if the other object is null
, a different type
than this one, or if this object and the specified one have different definitions.int getDefinitionHashCode()
This method is very similar to Object.hashCode()
except that it explicitly includes
the "definition" of the object even if the object does not typically act like a value. The definition of
an object typically includes all of the fields of the object. The value returned by this method should
NOT change. This means that two objects for which IEquatableDefinition.isSameDefinition(java.lang.Object)
returns true
will not necessarily have the same hash code if one or the other was changed after the hash code was first
obtained.