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