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 Type
    Method
    Description
    boolean
    Returns true if this map contains a mapping for key.
    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.
    Returns a UnmodifiableMapCursor view of the mappings contained in this map.
    default Equivalence
    Returns the strategy used to compare keys.
    Returns a Iterable view of the keys contained in this map.
    Returns a Iterable view of the values contained in this map.
    boolean
    Returns true if this map contains no key-value mappings.
    int
    Returns the number of key-value mappings in this map.
  • Method Details

    • get

      V get(K key)
      Returns the value to which key is mapped, or null if this map contains no mapping for key. The key must not be null.
      Since:
      19.0
    • get

      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. The key must not be null.
      Since:
      19.0
    • containsKey

      boolean containsKey(K key)
      Returns true if this map contains a mapping for key. Always returns false if the key is null.
      Since:
      19.0
    • size

      int size()
      Returns the number of key-value mappings in this map.
      Since:
      19.0
    • isEmpty

      boolean isEmpty()
      Returns true if this map contains no key-value mappings.
      Since:
      19.0
    • getValues

      Iterable<V> getValues()
      Returns a Iterable view of the values contained in this map.
      Since:
      19.0
    • getKeys

      Iterable<K> getKeys()
      Returns a Iterable view of the keys contained in this map.
      Since:
      19.0
    • getEntries

      UnmodifiableMapCursor<K,V> getEntries()
      Returns a UnmodifiableMapCursor view of the mappings contained in this map.
      Since:
      19.0
    • getEquivalenceStrategy

      default Equivalence getEquivalenceStrategy()
      Returns the strategy used to compare keys.
      Since:
      23.0