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.
Constructor and Description |
---|
ArrayMap()
Public ctor.
|
ArrayMap(Map<K,V> map)
Public ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
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) |
void |
putAll(Map<? extends K,? extends V> map) |
V |
putIfAbsent(K key,
V value) |
V |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V old,
V value) |
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.
|
public 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>
public V putIfAbsent(K key, V value)
putIfAbsent
in interface ConcurrentMap<K,V>
public boolean remove(Object key, Object value)
remove
in interface ConcurrentMap<K,V>
public boolean replace(K key, V old, V value)
replace
in interface ConcurrentMap<K,V>
Copyright © 2012–2014 jcabi.com. All rights reserved.