public class TLongObjectHashMap<V> extends TLongHashimplements TLongObjectMap <V>, Externalizable
| Modifier and Type | Class and Description |
|---|---|
protected class |
TLongObjectHashMap
a view onto the values of the map.
|
| Modifier and Type | Field and Description |
|---|---|
protected V[] |
_values
the values of the map
|
protected long |
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 |
|---|
TLongObjectHashMap()
Creates a new
TLongObjectHashMap instance with the default capacity and load factor.
|
TLongObjectHashMap(int initialCapacity)
Creates a new
TLongObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
|
TLongObjectHashMap(int initialCapacity, float loadFactor)
Creates a new
TLongObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the specified load factor.
|
TLongObjectHashMap(int initialCapacity, float loadFactor, long noEntryKey)
Creates a new
TLongObjectHashMap instance with a prime value at or near the specified capacity and load factor.
|
TLongObjectHashMap(TLongObjectMap
Creates a new
TLongObjectHashMap that contains the entries in the map passed to it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
|
boolean |
containsKey(long key)
|
boolean |
containsValue(Object
|
boolean |
equals(Object
|
boolean |
forEachEntry(TLongObjectProcedure
|
boolean |
forEachKey(TLongProcedure
|
boolean |
forEachValue(TObjectProcedure
|
V |
get(long key)
|
long |
getNoEntryKey()
|
int |
hashCode()
|
TLongObjectIterator |
iterator()
|
long[] |
keys()
|
long[] |
keys(long[] dest)
|
TLongSet |
keySet()
|
V |
put(long key, V value)
|
void |
putAll(Map
|
void |
putAll(TLongObjectMap
|
V |
putIfAbsent(long key, V value)
|
void |
readExternal(ObjectInput
|
protected void |
rehash(int newCapacity)
|
V |
remove(long key)
|
protected void |
removeAt(int index)
|
boolean |
retainEntries(TLongObjectProcedure
|
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, fastCeil, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, saturatedCast, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSizeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisEmpty, sizeprotected transient V[] _values
protected long no_entry_key
public TLongObjectHashMap()
TLongObjectHashMap instance with the default capacity and load factor.
public TLongObjectHashMap(int initialCapacity)
TLongObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
initialCapacity - an
int value
public TLongObjectHashMap(int initialCapacity,
float loadFactor)
TLongObjectHashMap 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 TLongObjectHashMap(int initialCapacity,
float loadFactor,
long noEntryKey)
TLongObjectHashMap 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 TLongObjectHashMap(TLongObjectMap<? extends V> map)
TLongObjectHashMap that contains the entries in the map passed to it.
map - the
TLongObjectMap to be copied.
protected int setUp(int initialCapacity)
protected void rehash(int newCapacity)
public long getNoEntryKey()
public boolean containsKey(long key)
public boolean containsValue(Objectval)
public V get(long key)
public V remove(long key)
protected void removeAt(int index)
public void putAll(TLongObjectMap<? extends V> map)
public void clear()
public TLongSetkeySet()
public long[] keys()
public long[] keys(long[] dest)
public Collection<V> valueCollection()
public Object[] values()
public TLongObjectIterator<V> iterator()
public boolean forEachKey(TLongProcedureprocedure)
public boolean forEachValue(TObjectProcedure<? super V> procedure)
public boolean forEachEntry(TLongObjectProcedure<? super V> procedure)
public boolean retainEntries(TLongObjectProcedure<? 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()