public abstract class OpenAbstractCollection extends AbstractMap
| Modifier and Type | Field and Description |
|---|---|
protected static byte |
FREE
The Constant FREE.
|
protected int |
freeEntries
The number of table entries in state==FREE.
|
protected static byte |
FULL
The Constant FULL.
|
protected static byte |
REMOVED
The Constant REMOVED.
|
protected byte[] |
state
The state of each hash table entry (FREE, FULL, REMOVED).
|
protected long[] |
table
The hash table keys.
|
defaultCapacity, defaultMaxLoadFactor, defaultMinLoadFactor, distinct, highWaterMark, lowWaterMark, maxLoadFactor, minLoadFactor| Constructor and Description |
|---|
OpenAbstractCollection() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(long key)
Returns true if the receiver contains the specified key.
|
void |
ensureCapacity(int minCapacity)
Ensures that the receiver can hold at least the specified number of
associations without needing to allocate new internal memory.
|
boolean |
forEachKey(LongProcedure procedure)
Applies a procedure to each key of the receiver, if any.
|
protected int |
indexOfInsertion(long key) |
protected int |
indexOfKey(long key) |
void |
trimToSize()
Trims the capacity of the receiver to be the receiver's current size.
|
chooseGrowCapacity, chooseHighWaterMark, chooseLowWaterMark, chooseMeanCapacity, chooseShrinkCapacity, clear, isEmpty, nextPrime, setUp, sizecloneprotected static final byte FREE
protected static final byte FULL
protected static final byte REMOVED
protected long[] table
protected byte[] state
protected int freeEntries
public final boolean containsKey(long key)
key - the keypublic final void ensureCapacity(int minCapacity)
This method never need be called; it is for performance tuning only. Calling this method before put()ing a large number of associations boosts performance, because the receiver will grow only once instead of potentially many times and hash collisions get less probable.
ensureCapacity in class AbstractMapminCapacity - the desired minimum capacity.public final boolean forEachKey(LongProcedure procedure)
procedure - the procedure to be applied. Stops iteration if the procedure
returns false, otherwise continues.protected final int indexOfInsertion(long key)
key - the key to be added to the receiver.protected final int indexOfKey(long key)
key - the key to be searched in the receiver.public final void trimToSize()
trimToSize in class AbstractMapCopyright © 2019 TomTom International B.V.. All rights reserved.