IntMap.EntryConsumer<V,E extends Throwable>| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_CAPACITY
Initial capacity.
|
static int |
MAXIMUM_CAPACITY
Maximum capacity.
|
| Constructor and Description |
|---|
IntHashMap()
Default constructor.
|
IntHashMap(int cap)
Create map with preallocated array.
|
IntHashMap(IntMap<? extends V> other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(int key)
Returns true if the map contains the key, otherwise false.
|
boolean |
containsValue(V val)
Returns true if the map contains one or more values, otherwise false.
|
protected int |
distance(int curIdx,
int key)
Returns size of shift from ideal position computing via index(key).
|
<E extends Throwable> |
forEach(IntMap.EntryConsumer<V,E> act)
This method work under a read lock, be careful with long operations inside.
|
V |
get(int key)
Returns value associated with the key. if the map doesn't contain the key, returns null.
|
protected int |
index(int key)
Position in entites array.
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
int[] |
keys()
Returns array of keys.
|
V |
put(int key,
V val)
Save the pair into the map.
|
V |
putIfAbsent(int key,
V val)
Does put into the map if a pair isn't present, otherwise returns stored value.
|
V |
remove(int key) |
int |
size()
Returns count of elements.
|
String |
toString() |
Collection<V> |
values()
Returns a collection of values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomputeIfAbsentpublic static final int INITIAL_CAPACITY
public static final int MAXIMUM_CAPACITY
public IntHashMap()
public IntHashMap(int cap)
public V get(int key)
public V put(int key, V val)
public V remove(int key)
public V putIfAbsent(int key, V val)
putIfAbsent in interface IntMap<V>key - key with which the specified value is to be associated..val - value to be associated with the specified key..public <E extends Throwable> void forEach(IntMap.EntryConsumer<V,E> act) throws E extends Throwable
public boolean isEmpty()
public Collection<V> values()
public boolean containsKey(int key)
containsKey in interface IntMap<V>key - tests key value.public boolean containsValue(V val)
containsValue in interface IntMap<V>val - value to be associated with the specified key.protected int distance(int curIdx,
int key)
curIdx - Current index.key - Target key.protected int index(int key)
key - Targert key.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021