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()
Nested Class Summary |
private static class |
HashMapLong.Entry
HashMapLong collision list entry. |
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, toString, wait, wait, wait |
table
private transient HashMapLong.Entry[] table
- The hash table data.
count
private transient int count
threshold
private int threshold
loadFactor
private float loadFactor
HashMapLong
public HashMapLong(int initialCapacity,
float loadFactor)
- the main constructor. see the HashMap constructor for description
HashMapLong
public HashMapLong(int initialCapacity)
HashMapLong
public HashMapLong()
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)