public final class FastByIDMap<V> extends Object implements Serializable, Cloneable
FastMap
,
FastIDSet
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
NO_MAX_SIZE |
Constructor and Description |
---|
FastByIDMap()
Creates a new
FastByIDMap with default capacity. |
FastByIDMap(int size) |
FastByIDMap(int size,
float loadFactor) |
FastByIDMap(int size,
int maxSize) |
FastByIDMap(int size,
int maxSize,
float loadFactor)
Creates a new
FastByIDMap whose capacity can accommodate the given number of entries without rehash. |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
FastByIDMap<V> |
clone() |
boolean |
containsKey(long key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<Long,V>> |
entrySet() |
boolean |
equals(Object other) |
V |
get(long key) |
int |
hashCode() |
boolean |
isEmpty() |
LongPrimitiveIterator |
keySetIterator() |
V |
put(long key,
V value) |
void |
rehash() |
V |
remove(long key) |
int |
size() |
String |
toString() |
Collection<V> |
values() |
public static final int NO_MAX_SIZE
public FastByIDMap()
FastByIDMap
with default capacity.public FastByIDMap(int size)
public FastByIDMap(int size, float loadFactor)
public FastByIDMap(int size, int maxSize)
public FastByIDMap(int size, int maxSize, float loadFactor)
FastByIDMap
whose capacity can accommodate the given number of entries without rehash.size
- desired capacitymaxSize
- max capacityloadFactor
- ratio of internal hash table size to current sizeIllegalArgumentException
- if size is less than 0, maxSize is less than 1
or at least half of RandomUtils.MAX_INT_SMALLER_TWIN_PRIME
, or
loadFactor is less than 1public V get(long key)
public int size()
public boolean isEmpty()
public boolean containsKey(long key)
public boolean containsValue(Object value)
public V remove(long key)
public void clear()
public LongPrimitiveIterator keySetIterator()
public Collection<V> values()
public void rehash()
public FastByIDMap<V> clone()
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.