public class TByteObjectHashMap<V> extends TByteHashimplements TByteObjectMap <V>, Externalizable
| Modifier and Type | Class and Description |
|---|---|
protected class |
TByteObjectHashMap
a view onto the values of the map.
|
| Modifier and Type | Field and Description |
|---|---|
protected V[] |
_values
the values of the map
|
protected byte |
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 |
|---|
TByteObjectHashMap()
Creates a new
TByteObjectHashMap instance with the default capacity and load factor.
|
TByteObjectHashMap(int initialCapacity)
Creates a new
TByteObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
|
TByteObjectHashMap(int initialCapacity, float loadFactor)
Creates a new
TByteObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the specified load factor.
|
TByteObjectHashMap(int initialCapacity, float loadFactor, byte noEntryKey)
Creates a new
TByteObjectHashMap instance with a prime value at or near the specified capacity and load factor.
|
TByteObjectHashMap(TByteObjectMap
Creates a new
TByteObjectHashMap that contains the entries in the map passed to it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
|
boolean |
containsKey(byte key)
|
boolean |
containsValue(Object
|
boolean |
equals(Object
|
boolean |
forEachEntry(TByteObjectProcedure
|
boolean |
forEachKey(TByteProcedure
|
boolean |
forEachValue(TObjectProcedure
|
V |
get(byte key)
|
byte |
getNoEntryKey()
|
int |
hashCode()
|
TByteObjectIterator |
iterator()
|
byte[] |
keys()
|
byte[] |
keys(byte[] dest)
|
TByteSet |
keySet()
|
V |
put(byte key, V value)
|
void |
putAll(Map
|
void |
putAll(TByteObjectMap
|
V |
putIfAbsent(byte key, V value)
|
void |
readExternal(ObjectInput
|
protected void |
rehash(int newCapacity)
|
V |
remove(byte key)
|
protected void |
removeAt(int index)
|
boolean |
retainEntries(TByteObjectProcedure
|
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 byte no_entry_key
public TByteObjectHashMap()
TByteObjectHashMap instance with the default capacity and load factor.
public TByteObjectHashMap(int initialCapacity)
TByteObjectHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
initialCapacity - an
int value
public TByteObjectHashMap(int initialCapacity,
float loadFactor)
TByteObjectHashMap 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 TByteObjectHashMap(int initialCapacity,
float loadFactor,
byte noEntryKey)
TByteObjectHashMap 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 TByteObjectHashMap(TByteObjectMap<? extends V> map)
TByteObjectHashMap that contains the entries in the map passed to it.
map - the
TByteObjectMap to be copied.
protected int setUp(int initialCapacity)
protected void rehash(int newCapacity)
public byte getNoEntryKey()
public boolean containsKey(byte key)
public boolean containsValue(Objectval)
public V get(byte key)
public V remove(byte key)
protected void removeAt(int index)
public void putAll(TByteObjectMap<? extends V> map)
public void clear()
public TByteSetkeySet()
public byte[] keys()
public byte[] keys(byte[] dest)
public Collection<V> valueCollection()
public Object[] values()
public TByteObjectIterator<V> iterator()
public boolean forEachKey(TByteProcedureprocedure)
public boolean forEachValue(TObjectProcedure<? super V> procedure)
public boolean forEachEntry(TByteObjectProcedure<? super V> procedure)
public boolean retainEntries(TByteObjectProcedure<? 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()