public abstract class TByteIntHash extends TPrimitiveHash
| Modifier and Type | Field and Description |
|---|---|
byte[] |
_set
the set of bytes
|
protected boolean |
consumeFreeSlot
|
protected byte |
no_entry_key
key that represents null NOTE: should not be modified after the Hash is created, but is not final because of Externalization
|
protected int |
no_entry_value
value that represents null NOTE: should not be modified after the Hash is created, but is not final because of Externalization
|
_states, FREE, FULL, REMOVED_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR| Constructor and Description |
|---|
TByteIntHash()
Creates a new
T#E#Hash instance with the default capacity and load factor.
|
TByteIntHash(int initialCapacity)
Creates a new
T#E#Hash instance whose capacity is the next highest prime above
initialCapacity + 1 unless that value is already prime.
|
TByteIntHash(int initialCapacity, float loadFactor)
Creates a new
TByteIntHash instance with a prime value at or near the specified capacity and load factor.
|
TByteIntHash(int initialCapacity, float loadFactor, byte no_entry_key, int no_entry_value)
Creates a new
TByteIntHash instance with a prime value at or near the specified capacity and load factor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(byte val)
Searches the set for
val
|
boolean |
forEach(TByteProcedure
Executes
procedure for each key in the map.
|
byte |
getNoEntryKey()
Returns the value that is used to represent null as a key.
|
int |
getNoEntryValue()
Returns the value that is used to represent null.
|
protected int |
index(byte key)
Locates the index of
val.
|
protected int |
insertKey(byte val)
Locates the index at which
val can be inserted.
|
void |
readExternal(ObjectInput
|
protected void |
removeAt(int index)
Releases the element currently stored at
index.
|
protected int |
setUp(int initialCapacity)
initializes the hashtable to a prime capacity which is at least
initialCapacity + 1.
|
void |
writeExternal(ObjectOutput
|
protected int |
XinsertKey(byte key)
|
capacitycalculateGrownCapacity, clear, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, rehash, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSizepublic transient byte[] _set
protected byte no_entry_key
protected int no_entry_value
protected boolean consumeFreeSlot
public TByteIntHash()
T#E#Hash instance with the default capacity and load factor.
public TByteIntHash(int initialCapacity)
T#E#Hash instance whose capacity is the next highest prime above
initialCapacity + 1 unless that value is already prime.
initialCapacity - an
int value
public TByteIntHash(int initialCapacity,
float loadFactor)
TByteIntHash 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.
public TByteIntHash(int initialCapacity,
float loadFactor,
byte no_entry_key,
int no_entry_value)
TByteIntHash 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.
no_entry_value - value that represents null
public byte getNoEntryKey()
public int getNoEntryValue()
protected int setUp(int initialCapacity)
setUp in class
TPrimitiveHash
initialCapacity - an
int value
public boolean contains(byte val)
val - an
byte value
boolean value
public boolean forEach(TByteProcedureprocedure)
procedure - a
TByteProcedure value
protected void removeAt(int index)
removeAt in class
TPrimitiveHash
index - an
int value
protected int index(byte key)
key - an
byte value
protected int insertKey(byte val)
key - an
byte value
int value
protected int XinsertKey(byte key)
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