public class LongObjectPagedHashMap<T> extends java.lang.Object implements java.lang.Iterable<LongObjectPagedHashMap.Cursor<T>>
Modifier and Type | Class and Description |
---|---|
static class |
LongObjectPagedHashMap.Cursor<T> |
Constructor and Description |
---|
LongObjectPagedHashMap(BigArrays bigArrays) |
LongObjectPagedHashMap(long capacity,
BigArrays bigArrays) |
LongObjectPagedHashMap(long capacity,
float maxLoadFactor,
BigArrays bigArrays) |
Modifier and Type | Method and Description |
---|---|
long |
capacity()
Return the number of allocated slots to store this hash table.
|
void |
close() |
T |
get(long key)
Get the value that is associated with
key or null if key
was not present in the hash table. |
protected void |
grow() |
java.util.Iterator<LongObjectPagedHashMap.Cursor<T>> |
iterator() |
T |
put(long key,
T value)
Put this new (key, value) pair into this hash table and return the value
that was previously associated with
key or null in case of
an insertion. |
T |
remove(long key)
Remove the entry which has this key in the hash table and return the
associated value or null if there was no entry associated with this key.
|
protected void |
removeAndAdd(long index)
Remove the entry at the given index and add it back
|
protected void |
resize(long capacity)
Resize to the given capacity.
|
long |
size()
Return the number of longs in this hash table.
|
protected boolean |
used(long bucket) |
public LongObjectPagedHashMap(BigArrays bigArrays)
public LongObjectPagedHashMap(long capacity, BigArrays bigArrays)
public LongObjectPagedHashMap(long capacity, float maxLoadFactor, BigArrays bigArrays)
public T get(long key)
key
or null if key
was not present in the hash table.public T put(long key, T value)
key
or null in case of
an insertion.public T remove(long key)
public java.util.Iterator<LongObjectPagedHashMap.Cursor<T>> iterator()
iterator
in interface java.lang.Iterable<LongObjectPagedHashMap.Cursor<T>>
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface Releasable
protected void resize(long capacity)
protected boolean used(long bucket)
protected void removeAndAdd(long index)
public long capacity()
public long size()
protected final void grow()