public interface UnmodifiableEconomicMap<K,V>
EconomicMap
for the underlying data structure and
its properties.Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(K key)
Returns
true if this map contains a mapping for key . |
V |
get(K key)
Returns the value to which
key is mapped, or null if this map contains no
mapping for key . |
default V |
get(K key,
V defaultValue)
Returns the value to which
key is mapped, or defaultValue if this map
contains no mapping for key . |
UnmodifiableMapCursor<K,V> |
getEntries()
Returns a
UnmodifiableMapCursor view of the mappings contained in this map. |
default Equivalence |
getEquivalenceStrategy()
Returns the strategy used to compare keys.
|
Iterable<K> |
getKeys()
Returns a
Iterable view of the keys contained in this map. |
Iterable<V> |
getValues()
Returns a
Iterable view of the values contained in this map. |
boolean |
isEmpty()
Returns
true if this map contains no key-value mappings. |
int |
size()
Returns the number of key-value mappings in this map.
|
V get(K key)
key
is mapped, or null
if this map contains no
mapping for key
. The key
must not be null
.default V get(K key, V defaultValue)
key
is mapped, or defaultValue
if this map
contains no mapping for key
. The key
must not be null
.boolean containsKey(K key)
true
if this map contains a mapping for key
. Always returns
false
if the key
is null
.int size()
boolean isEmpty()
true
if this map contains no key-value mappings.Iterable<V> getValues()
Iterable
view of the values contained in this map.Iterable<K> getKeys()
Iterable
view of the keys contained in this map.UnmodifiableMapCursor<K,V> getEntries()
UnmodifiableMapCursor
view of the mappings contained in this map.default Equivalence getEquivalenceStrategy()