Interface IIdentity<T>
-
- All Known Implementing Classes:
SameIdentity
,StandardIdentity
public interface IIdentity<T>
Abstract encapsulation of the concept of a type's identity. This is particularly useful when you want to use objects of that type in a map or collection, but you want to define theequals(Object, Object)
andhashCode(Object)
objects in a way that differs from the type's default. Objects returned fromof(Object)
will wrap values of the specified typeT
and use the identity methods from thisIIdentity
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
equals(T _this, Object that)
int
hashCode(T _this)
default Identified<T>
of(T value)
static IIdentity<Object>
same()
static IIdentity<Object>
standard()
-