public class SmallMap<K,V> extends Object implements Map<K,V>
null
is not supported for keys or values.
Constructor and Description |
---|
SmallMap()
Creates empty map.
|
SmallMap(Map<? extends K,? extends V> initMap)
Creates map filled with entries from provided map.
|
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()
Returns a set view of the keys contained in this map.
|
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> otherMap) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values()
Returns a collection of the values contained in this map.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
public Set<K> keySet()
The current implementation does not allow changes to the returned key set (which would have to be reflected in the underlying map.
public Collection<V> values()
The current implementation does not allow changes to the returned collection (which would have to be reflected in the underlying map.
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.