public class TByteShortHashMap extends TByteShortHashimplements TByteShortMap , Externalizable
| Modifier and Type | Class and Description |
|---|---|
protected class |
TByteShortHashMap
a view onto the keys of the map.
|
protected class |
TByteShortHashMap
a view onto the values of the map.
|
| Modifier and Type | Field and Description |
|---|---|
protected short[] |
_values
the values of the map
|
_set, consumeFreeSlot, no_entry_key, no_entry_value_states, FREE, FULL, REMOVED_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR| Constructor and Description |
|---|
TByteShortHashMap()
Creates a new
TByteShortHashMap instance with the default capacity and load factor.
|
TByteShortHashMap(byte[] keys, short[] values)
Creates a new
TByteShortHashMap instance containing all of the entries in the map passed in.
|
TByteShortHashMap(int initialCapacity)
Creates a new
TByteShortHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
|
TByteShortHashMap(int initialCapacity, float loadFactor)
Creates a new
TByteShortHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the specified load factor.
|
TByteShortHashMap(int initialCapacity, float loadFactor, byte noEntryKey, short noEntryValue)
Creates a new
TByteShortHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the specified load factor.
|
TByteShortHashMap(TByteShortMap
Creates a new
TByteShortHashMap instance containing all of the entries in the map passed in.
|
| Modifier and Type | Method and Description |
|---|---|
short |
adjustOrPutValue(byte key, short adjust_amount, short put_amount)
|
boolean |
adjustValue(byte key, short amount)
|
void |
clear()
|
boolean |
containsKey(byte key)
|
boolean |
containsValue(short val)
|
boolean |
equals(Object
|
boolean |
forEachEntry(TByteShortProcedure
|
boolean |
forEachKey(TByteProcedure
|
boolean |
forEachValue(TShortProcedure
|
short |
get(byte key)
|
int |
hashCode()
|
boolean |
increment(byte key)
|
boolean |
isEmpty()
|
TByteShortIterator |
iterator()
|
byte[] |
keys()
|
byte[] |
keys(byte[] array)
|
TByteSet |
keySet()
|
short |
put(byte key, short value)
|
void |
putAll(Map
|
void |
putAll(TByteShortMap
|
short |
putIfAbsent(byte key, short value)
|
void |
readExternal(ObjectInput
|
protected void |
rehash(int newCapacity)
|
short |
remove(byte key)
|
protected void |
removeAt(int index)
|
boolean |
retainEntries(TByteShortProcedure
|
protected int |
setUp(int initialCapacity)
initializes the hashtable to a prime capacity which is at least
initialCapacity + 1.
|
String |
toString()
|
void |
transformValues(TShortFunction
|
TShortCollection |
valueCollection()
|
short[] |
values()
|
short[] |
values(short[] array)
|
void |
writeExternal(ObjectOutput
|
contains, forEach, getNoEntryKey, getNoEntryValue, index, insertKey, XinsertKeycapacitycalculateGrownCapacity, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, postInsertHook, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSizeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNoEntryKey, getNoEntryValue, sizepublic TByteShortHashMap()
TByteShortHashMap instance with the default capacity and load factor.
public TByteShortHashMap(int initialCapacity)
TByteShortHashMap instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
initialCapacity - an
int value
public TByteShortHashMap(int initialCapacity,
float loadFactor)
TByteShortHashMap 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 TByteShortHashMap(int initialCapacity,
float loadFactor,
byte noEntryKey,
short noEntryValue)
TByteShortHashMap 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
noEntryKey - a
byte value that represents
null for the Key set.
noEntryValue - a
short value that represents
null for the Value set.
public TByteShortHashMap(byte[] keys,
short[] values)
TByteShortHashMap instance containing all of the entries in the map passed in.
keys - a
byte array containing the keys for the matching values.
values - a
short array containing the values.
public TByteShortHashMap(TByteShortMapmap)
TByteShortHashMap instance containing all of the entries in the map passed in.
map - a
TByteShortMap that will be duplicated.
protected int setUp(int initialCapacity)
setUp in class
TByteShortHash
initialCapacity - an
int value
protected void rehash(int newCapacity)
public short put(byte key,
short value)
public short putIfAbsent(byte key,
short value)
public void putAll(TByteShortMapmap)
public short get(byte key)
public void clear()
public boolean isEmpty()
public short remove(byte key)
protected void removeAt(int index)
public TByteSetkeySet()
public byte[] keys()
public byte[] keys(byte[] array)
public TShortCollectionvalueCollection()
public short[] values()
public short[] values(short[] array)
public boolean containsValue(short val)
public boolean containsKey(byte key)
public TByteShortIteratoriterator()
public boolean forEachKey(TByteProcedureprocedure)
public boolean forEachValue(TShortProcedureprocedure)
public boolean forEachEntry(TByteShortProcedureprocedure)
public void transformValues(TShortFunctionfunction)
public boolean retainEntries(TByteShortProcedureprocedure)
public boolean increment(byte key)
public boolean adjustValue(byte key,
short amount)
public short adjustOrPutValue(byte key,
short adjust_amount,
short put_amount)
public boolean equals(Objectother)
public int hashCode()
public StringtoString()
public void writeExternal(ObjectOutputout) throws IOException
writeExternal in interface
Externalizable
writeExternal in class
TByteShortHash
IOException
public void readExternal(ObjectInputin) throws IOException , ClassNotFoundException
readExternal in interface
Externalizable
readExternal in class
TByteShortHash
IOException
ClassNotFoundException