Package gnu.trove
Class TObjectIdentityHashingStrategy<T>
java.lang.Object
gnu.trove.TObjectIdentityHashingStrategy<T>
- All Implemented Interfaces:
TObjectHashingStrategy<T>
,Serializable
public final class TObjectIdentityHashingStrategy<T>
extends Object
implements TObjectHashingStrategy<T>
This object hashing strategy uses the System.identityHashCode
method to provide identity hash codes. These are identical to the
value produced by Object.hashCode(), even when the type of the
object being hashed overrides that method.
Created: Sat Aug 17 11:13:15 2002
- Version:
- $Id: TObjectIdentityHashingStrategy.java,v 1.4 2007/06/11 15:26:44 robeden Exp $
- Author:
- Eric Friedman
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal int
computeHashCode
(T object) Delegates hash code computation to the System.identityHashCode(Object) method.final boolean
Compares object references for equality.
-
Constructor Details
-
TObjectIdentityHashingStrategy
public TObjectIdentityHashingStrategy()
-
-
Method Details
-
computeHashCode
Delegates hash code computation to the System.identityHashCode(Object) method.- Specified by:
computeHashCode
in interfaceTObjectHashingStrategy<T>
- Parameters:
object
- for which the hashcode is to be computed- Returns:
- the hashCode
-
equals
Compares object references for equality.- Specified by:
equals
in interfaceTObjectHashingStrategy<T>
- Parameters:
o1
- anObject
valueo2
- anObject
value- Returns:
- true if o1 == o2
-