K - the type of the keysV - the type of the valuespublic class ArrayHashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
protected K[] |
keys
The table for the keys; the length MUST always be a power of two.
|
protected int |
size
The number of key-value entries contained in this map.
|
protected V[] |
values
The table for the values; the length MUST be equal to the length of keys
and MUST always be a power of two.
|
| Constructor and Description |
|---|
ArrayHashMap() |
ArrayHashMap(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putAll, putIfAbsent, remove, replace, replace, replaceAllprotected transient volatile K[] keys
protected transient volatile V[] values
protected transient int size
public ArrayHashMap(int initialCapacity)
public ArrayHashMap()
public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>containsValue in class AbstractMap<K,V>public void clear()
public Collection<V> values()
Copyright © 2011–2024 Live Ontologies Project. All rights reserved.