GNU Trove

Interface TObjectHashingStrategy

All Superinterfaces:
All Known Implementing Classes:
TObjectHash, TObjectIdentityHashingStrategy

public interface TObjectHashingStrategy

Interface to support pluggable hashing strategies in maps and sets. Implementors can use this interface to make the trove hashing algorithms use object values, values provided by the java runtime, or a custom strategy when computing hashcodes. Created: Sat Aug 17 10:52:32 2002

$Id:,v 1.1 2002/08/18 16:43:15 ericdf Exp $
Eric Friedman

Method Summary
 int computeHashCode(java.lang.Object o)
          Computes a hash code for the specified object.
 boolean equals(java.lang.Object o1, java.lang.Object o2)
          Compares o1 and o2 for equality.

Method Detail


public int computeHashCode(java.lang.Object o)
Computes a hash code for the specified object. Implementors can use the object's own hashCode method, the Java runtime's identityHashCode, or a custom scheme.

the hashCode


public boolean equals(java.lang.Object o1,
                      java.lang.Object o2)
Compares o1 and o2 for equality. Strategy implementors may use the objects' own equals() methods, compare object references, or implement some custom scheme.

o1 - an Object value
o2 - an Object value
true if the objects are equal according to this strategy.

GNU Trove

GNU Trove is copyright 2001-2003 Eric D. Friedman. All Rights Reserved.