public class TShortObjectHashMap<V> extends TShortHashimplements TShortObjectMap <V>, Externalizable
| Modifier and Type | Class and Description |
|---|---|
protected class |
TShortObjectHashMap
a view onto the values of the map.
|
| Modifier and Type | Field and Description |
|---|---|
protected V[] |
_values
the values of the map
|
protected short |
no_entry_key
the value that represents null in the key set.
|
_set, consumeFreeSlot, no_entry_value_states, FREE, FULL, REMOVED_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR| Constructor and Description |
|---|
TShortObjectHashMap()
Creates a new
TShortObjectHashMap instance with the default capacity and load factor.
|
TShortObjectHashMap(int initialCapacity)
Creates a new
TShortObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
|
TShortObjectHashMap(int initialCapacity, float loadFactor)
Creates a new
TShortObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the specified load factor.
|
TShortObjectHashMap(int initialCapacity, float loadFactor, short noEntryKey)
Creates a new
TShortObjectHashMap instance with a prime value at or near the specified capacity and load factor.
|
TShortObjectHashMap(TShortObjectMap
Creates a new
TShortObjectHashMap that contains the entries in the map passed to it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
|
boolean |
containsKey(short key)
|
boolean |
containsValue(Object
|
boolean |
equals(Object
|
boolean |
forEachEntry(TShortObjectProcedure
|
boolean |
forEachKey(TShortProcedure
|
boolean |
forEachValue(TObjectProcedure
|
V |
get(short key)
|
short |
getNoEntryKey()
|
int |
hashCode()
|
TShortObjectIterator |
iterator()
|
short[] |
keys()
|
short[] |
keys(short[] dest)
|
TShortSet |
keySet()
|
V |
put(short key, V value)
|
void |
putAll(Map
|
void |
putAll(TShortObjectMap
|
V |
putIfAbsent(short key, V value)
|
void |
readExternal(ObjectInput
|
protected void |
rehash(int newCapacity)
|
V |
remove(short key)
|
protected void |
removeAt(int index)
|
boolean |
retainEntries(TShortObjectProcedure
|
protected int |
setUp(int initialCapacity)
|
String |
toString()
|
void |
transformValues(TObjectFunction
|
Collection |
valueCollection()
|
Object |
values()
|
V[] |
values(V[] dest)
|
void |
writeExternal(ObjectOutput
|
contains, forEach, getNoEntryValue, index, insertKeycapacitycalculateGrownCapacity, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSizeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisEmpty, sizeprotected transient V[] _values
protected short no_entry_key
public TShortObjectHashMap()
TShortObjectHashMap instance with the default capacity and load factor.
public TShortObjectHashMap(int initialCapacity)
TShortObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
initialCapacity - an
int value
public TShortObjectHashMap(int initialCapacity,
float loadFactor)
TShortObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the specified load factor.
initialCapacity - an
int value
loadFactor - a
float value
public TShortObjectHashMap(int initialCapacity,
float loadFactor,
short noEntryKey)
TShortObjectHashMap instance with a prime value at or near the specified capacity and load factor.
initialCapacity - used to find a prime capacity for the table.
loadFactor - used to calculate the threshold over which rehashing takes place.
noEntryKey - the value used to represent null in the key set.
public TShortObjectHashMap(TShortObjectMap<? extends V> map)
TShortObjectHashMap that contains the entries in the map passed to it.
map - the
TShortObjectMap to be copied.
protected int setUp(int initialCapacity)
protected void rehash(int newCapacity)
public short getNoEntryKey()
public boolean containsKey(short key)
public boolean containsValue(Objectval)
public V get(short key)
public V remove(short key)
protected void removeAt(int index)
public void putAll(TShortObjectMap<? extends V> map)
public void clear()
public TShortSetkeySet()
public short[] keys()
public short[] keys(short[] dest)
public Collection<V> valueCollection()
public Object[] values()
public TShortObjectIterator<V> iterator()
public boolean forEachKey(TShortProcedureprocedure)
public boolean forEachValue(TObjectProcedure<? super V> procedure)
public boolean forEachEntry(TShortObjectProcedure<? super V> procedure)
public boolean retainEntries(TShortObjectProcedure<? super V> procedure)
public void transformValues(TObjectFunction<V ,V> function)
public boolean equals(Objectother)
public int hashCode()
public void writeExternal(ObjectOutputout) throws IOException
writeExternal in interface
Externalizable
writeExternal in class
THash
IOException
public void readExternal(ObjectInputin) throws IOException , ClassNotFoundException
readExternal in interface
Externalizable
readExternal in class
THash
IOException
ClassNotFoundException
public StringtoString()