gate.util
Class HashMapLong

java.lang.Object
  |
  +--gate.util.HashMapLong

public class HashMapLong
extends Object

simple cut-off version of the hashmap with native long's as keys only get,put and isEmpty methods are implemented(). This map is used in very private case in the SimpleSortedSet class. The main purpose is to optimize the speed of the SinglePhaseTransducer.transduce()


Inner Class Summary
private static class HashMapLong.Entry
          HashMapLong collision list entry.
 
Field Summary
private  int count
           
private  float loadFactor
           
private  HashMapLong.Entry[] table
          The hash table data.
private  int threshold
           
 
Constructor Summary
HashMapLong()
           
HashMapLong(int initialCapacity)
           
HashMapLong(int initialCapacity, float loadFactor)
          the main constructor.
 
Method Summary
 Object get(long key)
           
 boolean isEmpty()
           
 Object put(long key, Object value)
           
private  void rehash()
          Rehashes the contents of this map into a new HashMapLong instance with a larger capacity.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

table

private transient HashMapLong.Entry[] table
The hash table data.

count

private transient int count

threshold

private int threshold

loadFactor

private float loadFactor
Constructor Detail

HashMapLong

public HashMapLong(int initialCapacity,
                   float loadFactor)
the main constructor. see the HashMap constructor for description

HashMapLong

public HashMapLong(int initialCapacity)

HashMapLong

public HashMapLong()
Method Detail

isEmpty

public boolean isEmpty()

get

public Object get(long key)

rehash

private void rehash()
Rehashes the contents of this map into a new HashMapLong instance with a larger capacity. This method is called automatically when the number of keys in this map exceeds its capacity and load factor.

put

public Object put(long key,
                  Object value)