Package org.graalvm.collections
Interface UnmodifiableEconomicMap<K,V>
- All Known Subinterfaces:
EconomicMap<K,
V>
- All Known Implementing Classes:
EconomicMapWrap
public interface UnmodifiableEconomicMap<K,V>
Unmodifiable memory efficient map. See
EconomicMap
for the underlying data structure and
its properties.- Since:
- 19.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(K key) Returnstrue
if this map contains a mapping forkey
.Returns the value to whichkey
is mapped, ornull
if this map contains no mapping forkey
.default V
Returns the value to whichkey
is mapped, ordefaultValue
if this map contains no mapping forkey
.Returns aUnmodifiableMapCursor
view of the mappings contained in this map.default Equivalence
Returns the strategy used to compare keys.getKeys()
Returns aIterable
view of the keys contained in this map.Returns aIterable
view of the values contained in this map.boolean
isEmpty()
Returnstrue
if this map contains no key-value mappings.int
size()
Returns the number of key-value mappings in this map.
-
Method Details
-
get
Returns the value to whichkey
is mapped, ornull
if this map contains no mapping forkey
. Thekey
must not benull
.- Since:
- 19.0
-
get
Returns the value to whichkey
is mapped, ordefaultValue
if this map contains no mapping forkey
. Thekey
must not benull
.- Since:
- 19.0
-
containsKey
Returnstrue
if this map contains a mapping forkey
. Always returnsfalse
if thekey
isnull
.- Since:
- 19.0
-
size
int size()Returns the number of key-value mappings in this map.- Since:
- 19.0
-
isEmpty
boolean isEmpty()Returnstrue
if this map contains no key-value mappings.- Since:
- 19.0
-
getValues
Returns aIterable
view of the values contained in this map.- Since:
- 19.0
-
getKeys
Returns aIterable
view of the keys contained in this map.- Since:
- 19.0
-
getEntries
UnmodifiableMapCursor<K,V> getEntries()Returns aUnmodifiableMapCursor
view of the mappings contained in this map.- Since:
- 19.0
-
getEquivalenceStrategy
Returns the strategy used to compare keys.- Since:
- 23.0
-