
V - public class ExactHashObjectMap<V> extends TIntObjectHashMap<V>
TIntObjectHashMap.ValueView_values, no_entry_key_set, consumeFreeSlot, no_entry_value_states, FREE, FULL, REMOVED_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR| Constructor and Description |
|---|
ExactHashObjectMap()
Builds a new, emtpy map.
|
ExactHashObjectMap(int expectedSize)
Builds a new map, which will not resize until the number of stored
objects will be less or equal to expectedSize.
|
ExactHashObjectMap(TIntObjectMap<? extends V> map)
Builds a new map containing all the elements of the passed map.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the specified
key.
|
V |
get(Object key)
Returns the value to which the specified key is mapped, or
null
if this map contains no mapping for the key. |
V |
put(Object key,
V value)
Associates the specified value with the specified key in this map
(optional operation).
|
V |
remove(Object key)
Removes the mapping for a key from this map if it is present (optional
operation).
|
clear, containsKey, containsValue, equals, forEachEntry, forEachKey, forEachValue, get, getNoEntryKey, hashCode, iterator, keys, keys, keySet, put, putAll, putAll, putIfAbsent, readExternal, rehash, remove, removeAt, retainEntries, setUp, toString, transformValues, valueCollection, values, values, writeExternalcontains, forEach, getNoEntryValue, index, insertKeycapacitycalculateGrownCapacity, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSizeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisEmpty, sizepublic ExactHashObjectMap()
public ExactHashObjectMap(TIntObjectMap<? extends V> map)
map - the map to copypublic ExactHashObjectMap(int expectedSize)
expectedSize - the expected sizepublic boolean containsKey(Object key)
key - key whose presence in this map is to be testedpublic V get(Object key)
null
if this map contains no mapping for the key.
More formally, if this map contains a mapping from a key k to a
value v such that (key==null ? k==null :
key.equals(k)), then this method returns v; otherwise it returns
null. (There can be at most one such mapping.)
If this map permits null values, then a return value of null does
not necessarily indicate that the map contains no mapping for the
key; it's also possible that the map explicitly maps the key to
null. The containsKey operation may be used
to distinguish these two cases.
key - the key whose associated value is to be returnednull if this map contains no mapping for the keypublic V put(Object key, V value)
m.containsKey(k) would return true.)key - key with which the specified value is to be associatedvalue - an int value value to be associated with the
specified keyTIntObjectHashMap.getNoEntryKey()public V remove(Object key)
key.equals(k), that
mapping is removed. (The map can contain at most one such mapping.)
Returns the value to which this map previously associated the key, or null if the map contained no mapping for the key.
If this map permits null values, then a return value of null does not necessarily indicate that the map contained no mapping for the key; it's also possible that the map explicitly mapped the key to null.
The map will not contain a mapping for the specified key once the call returns.
key - key whose mapping is to be removed from the map