BRUtil - Making Java a Kinder, Gentler, Place to be.

brutil
Class HashCoord

java.lang.Object
  |
  +--brutil.HashCoord

public final class HashCoord
extends java.lang.Object

This class encapsulates the subtable number, and the bucket number, used in a HashMap.

This class should be instantiated by a HashFunction's hash(Object) method.

See Also:
HashMap, HashStatsListener, HashFunction, POD

Field Summary
 int bucket
          The bucket number.
 int table
          The subtable number.
 
Constructor Summary
HashCoord(int table, int bucket)
          Sole constructor.
 
Method Summary
 java.lang.String toString()
          returns a String representation of this HashCoord's values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

public final int table
The subtable number.

bucket

public final int bucket
The bucket number.
Constructor Detail

HashCoord

public HashCoord(int table,
                 int bucket)
Sole constructor. Created a hash coordinate for a HashMap.
Parameters:
table - the subtable number.
bucket - the bucket number.
Method Detail

toString

public final java.lang.String toString()
returns a String representation of this HashCoord's values. Contains the subtable number and the bucket number. Formatted as "HashCoord (table,bucket)."
Overrides:
toString in class java.lang.Object
Returns:
a String representation of this HashCoord's values.


BRUtil - Making Java a Kinder, Gentler, Place to be.