Parsing Engine

danbikel.util
Class HashMapTwoDoubles<K>

java.lang.Object
  extended by java.util.AbstractMap<K,Object>
      extended by danbikel.util.AbstractMapToPrimitive<K>
          extended by danbikel.util.HashMapPrimitive<K>
              extended by danbikel.util.HashMapDouble<K>
                  extended by danbikel.util.HashMapTwoDoubles<K>
All Implemented Interfaces:
FlexibleMap<K,Object>, MapToPrimitive<K>, Serializable, Cloneable, Map<K,Object>
Direct Known Subclasses:
BiCountsTable

public class HashMapTwoDoubles<K>
extends HashMapDouble<K>

A map for storing arbitrary Object instances as keys with ordered pairs of doubles as values.

See Also:
Serialized Form

Nested Class Summary
protected static class HashMapTwoDoubles.Entry<K>
          A map entry for this type of map, containing a key and a pair of doubles.
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
 
Fields inherited from class danbikel.util.HashMapPrimitive
defaultInitialCapacity, defaultLoadFactor, hashCodeBitmask, maxCapacity
 
Constructor Summary
HashMapTwoDoubles()
          Constructs a new, empty map with a default capacity and load factor.
HashMapTwoDoubles(int initialCapacity)
          Constructs a new, empty map with the specified initial capacity and default load factor.
HashMapTwoDoubles(int initialCapacity, float loadFactor)
          Constructs a new, empty map with the specified initial capacity and the specified load factor.
HashMapTwoDoubles(Map t)
          Constructs a new map with the same mappings as the given map.
 
Method Summary
protected  HashMapPrimitive.Entry<K> getNewEntry(int hash, K key, HashMapPrimitive.Entry<K> next)
          Gets a map entry for this type of map, containing a key and a pair of doubles.
 
Methods inherited from class danbikel.util.HashMapPrimitive
add, add, add, add, add, add, addEntryMRU, containsKey, entrySet, get, getCapacity, getEntry, getEntry, getEntryMRU, getEntryMRU, getLoadFactor, getOrCreateEntry, getStats, put, put, put, put, put, put, put, put, remove, removeLRU, removeLRU, removeRandom
 
Methods inherited from class danbikel.util.AbstractMapToPrimitive
add, add, add, add, add, add, put, put, put, put, put, put, put, removeRandom, toString
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, values
 

Constructor Detail

HashMapTwoDoubles

public HashMapTwoDoubles(int initialCapacity,
                         float loadFactor)
Constructs a new, empty map with the specified initial capacity and the specified load factor.

Parameters:
initialCapacity - the initial capacity of the HashMap.
loadFactor - the load factor of the HashMap
Throws:
IllegalArgumentException - if the initial capacity is less than zero, or if the load factor is nonpositive.

HashMapTwoDoubles

public HashMapTwoDoubles(int initialCapacity)
Constructs a new, empty map with the specified initial capacity and default load factor.

Parameters:
initialCapacity - the initial capacity of the HashMap.
Throws:
IllegalArgumentException - if the initial capacity is less than zero.

HashMapTwoDoubles

public HashMapTwoDoubles()
Constructs a new, empty map with a default capacity and load factor.


HashMapTwoDoubles

public HashMapTwoDoubles(Map t)
Constructs a new map with the same mappings as the given map. The map is created with a capacity of twice the number of mappings in the given map or the default size (whichever is greater), and a default load factor.

Parameters:
t - the map whose mappings are to be placed in this map.
Method Detail

getNewEntry

protected HashMapPrimitive.Entry<K> getNewEntry(int hash,
                                                K key,
                                                HashMapPrimitive.Entry<K> next)
Gets a map entry for this type of map, containing a key and a pair of doubles.

Overrides:
getNewEntry in class HashMapDouble<K>
Parameters:
hash - the hash value of the specified key
key - the key for this map entry to wrap
next - the next pointer for this entry in its singly-linked list (can be null)
Returns:
a new HashMapPrimitive.Entry for this type of map

Parsing Engine

Author: Dan Bikel.