danbikel.util
Class HashMapTwoInts<K>
java.lang.Object
java.util.AbstractMap<K,Object>
danbikel.util.AbstractMapToPrimitive<K>
danbikel.util.HashMapPrimitive<K>
danbikel.util.HashMapInt<K>
danbikel.util.HashMapTwoInts<K>
- All Implemented Interfaces:
- FlexibleMap<K,Object>, MapToPrimitive<K>, Serializable, Cloneable, Map<K,Object>
public class HashMapTwoInts<K>
- extends HashMapInt<K>
A map for storing arbitrary Object instances as keys with ordered
pairs of ints as values.
- See Also:
- Serialized Form
|
Nested Class Summary |
protected static class |
HashMapTwoInts.Entry<K>
A map entry for this type of map, containing a key and a pair of
ints. |
| 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 |
HashMapTwoInts
public HashMapTwoInts(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.
HashMapTwoInts
public HashMapTwoInts(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.
HashMapTwoInts
public HashMapTwoInts()
- Constructs a new, empty map with a
default capacity and
load factor.
HashMapTwoInts
public HashMapTwoInts(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 initial
capacity (whichever is greater), and
a default load factor.
- Parameters:
t - the map whose mappings are to be placed in this map.
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
ints.
- Overrides:
getNewEntry in class HashMapInt<K>
- Parameters:
hash - the hash value of the specified keykey - the key for this map entry to wrapnext - the next pointer for this entry in its singly-linked list (can
be null)
- Returns:
- a new
HashMapPrimitive.Entry for this type of map
Author: Dan Bikel.