public class IdentityHashingStrategy<K> extends java.lang.Object implements HashingStrategy<K>
HashingStrategy
that does identity comparisons
(==) and uses System.identityHashCode(Object)
for hashCode generation.Constructor and Description |
---|
IdentityHashingStrategy() |
Modifier and Type | Method and Description |
---|---|
int |
computeHashCode(K object)
Computes a hash code for the specified object.
|
boolean |
equals(K o1,
K o2)
Compares o1 and o2 for equality.
|
public int computeHashCode(K object)
HashingStrategy
computeHashCode
in interface HashingStrategy<K>
object
- for which the hashcode is to be computedpublic boolean equals(K o1, K o2)
HashingStrategy
equals
in interface HashingStrategy<K>
o1
- an Object
valueo2
- an Object
value