K - Map key typeV - Value key type@Immutable @Loggable(value=1) public final class ArrayMap<K,V> extends Object implements ConcurrentMap<K,V>
This class is truly immutable. This means that it never changes
its encapsulated values and is annotated with @Immutable
annotation.
Limitation: Encapsulated objects with exposed mutators can mutate their state.
| Constructor and Description |
|---|
ArrayMap()
Public ctor.
|
ArrayMap(Map<K,V> map)
Public ctor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object object) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value)
Deprecated.
|
void |
putAll(Map<? extends K,? extends V> map)
Deprecated.
|
V |
putIfAbsent(K key,
V value)
Deprecated.
|
V |
remove(Object key)
Deprecated.
|
boolean |
remove(Object key,
Object value)
Deprecated.
|
V |
replace(K key,
V value)
Deprecated.
|
boolean |
replace(K key,
V old,
V value)
Deprecated.
|
int |
size() |
String |
toString() |
Collection<V> |
values() |
ArrayMap<K,V> |
with(K key,
V value)
Make a new one with an extra entry.
|
ArrayMap<K,V> |
with(Map<K,V> ents)
Make a new one with these extra entries.
|
ArrayMap<K,V> |
without(Collection<K> keys)
Make a new one without these keys.
|
ArrayMap<K,V> |
without(K key)
Make a new one without this key.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllpublic ArrayMap<K,V> with(K key, V value)
key - The keyvalue - The valuepublic ArrayMap<K,V> with(Map<K,V> ents)
ents - Entriespublic ArrayMap<K,V> without(K key)
key - The keypublic ArrayMap<K,V> without(Collection<K> keys)
keys - The keys to removepublic int hashCode()
public boolean equals(Object object)
public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>@Deprecated public V remove(Object key)
@Deprecated public void putAll(Map<? extends K,? extends V> map)
@Deprecated public void clear()
@Deprecated public V putIfAbsent(K key, V value)
putIfAbsent in interface ConcurrentMap<K,V>putIfAbsent in interface Map<K,V>@Deprecated public boolean remove(Object key, Object value)
@Deprecated public boolean replace(K key, V old, V value)
@Deprecated public V replace(K key, V value)
Copyright © 2012–2021 jcabi.com. All rights reserved.