Interface ImmutableNavigableMap<K,V>

Type Parameters:
K - the key type
V - the value type
All Superinterfaces:
ImmutableMap<K,V>, ImmutableSortedMap<K,V>, Iterable<Map.Entry<K,V>>, ReadOnlyMap<K,V>, ReadOnlyNavigableMap<K,V>, ReadOnlySequencedMap<K,V>, ReadOnlySortedMap<K,V>
All Known Implementing Classes:
RedBlackMap

public interface ImmutableNavigableMap<K,V> extends ReadOnlyNavigableMap<K,V>, ImmutableSortedMap<K,V>
An interface to an immutable navigable map; the implementation guarantees that the state of the collection does not change.
  • Method Details

    • clear

      Description copied from interface: ImmutableMap
      Returns a copy of this map that is empty.
      Specified by:
      clear in interface ImmutableMap<K,V>
      Specified by:
      clear in interface ImmutableSortedMap<K,V>
      Returns:
      this set instance if it is already empty, or a different set instance that is empty.
    • put

      ImmutableNavigableMap<K,V> put(K key, @Nullable V value)
      Description copied from interface: ImmutableMap
      Returns a copy of this map that contains all entries of this map with the specified entry added or updated.
      Specified by:
      put in interface ImmutableMap<K,V>
      Specified by:
      put in interface ImmutableSortedMap<K,V>
      Parameters:
      key - the key of the entry
      value - the value of the entry
      Returns:
      this map instance if it already contains the same entry, or a different map instance with the entry added or updated
    • putAll

      default ImmutableNavigableMap<K,V> putAll(Map<? extends K,? extends V> m)
      Description copied from interface: ImmutableMap
      Returns a copy of this map that contains all entries of this map with entries from the specified map added or updated.
      Specified by:
      putAll in interface ImmutableMap<K,V>
      Specified by:
      putAll in interface ImmutableSortedMap<K,V>
      Parameters:
      m - another map
      Returns:
      this map instance if it already contains the same entries, or a different map instance with the entries added or updated
    • putAll

      default ImmutableNavigableMap<K,V> putAll(Iterable<? extends Map.Entry<? extends K,? extends V>> c)
      Description copied from interface: ImmutableMap
      Returns a copy of this map that contains all entries of this map with entries from the specified map added or updated.
      Specified by:
      putAll in interface ImmutableMap<K,V>
      Specified by:
      putAll in interface ImmutableSortedMap<K,V>
      Parameters:
      c - another map
      Returns:
      this map instance if it already contains the same entries, or a different map instance with the entries added or updated
    • putKeyValues

      default ImmutableNavigableMap<K,V> putKeyValues(Object... kv)
      Description copied from interface: ImmutableMap
      Returns a copy of this map that contains all entries of this map with entries from the specified map added or updated.
      Specified by:
      putKeyValues in interface ImmutableMap<K,V>
      Specified by:
      putKeyValues in interface ImmutableSortedMap<K,V>
      Parameters:
      kv - a list of alternating keys and values
      Returns:
      this map instance if it already contains the same entries, or a different map instance with the entries added or updated
    • remove

      ImmutableNavigableMap<K,V> remove(K key)
      Description copied from interface: ImmutableMap
      Returns a copy of this map that contains all entries of this map with the specified entry removed.
      Specified by:
      remove in interface ImmutableMap<K,V>
      Specified by:
      remove in interface ImmutableSortedMap<K,V>
      Parameters:
      key - the key of the entry
      Returns:
      this map instance if it already does not contain the entry, or a different map instance with the entry removed
    • removeAll

      default ImmutableNavigableMap<K,V> removeAll(Iterable<? extends K> c)
      Description copied from interface: ImmutableMap
      Returns a copy of this map that contains all entries of this map except the entries of the specified collection.
      Specified by:
      removeAll in interface ImmutableMap<K,V>
      Specified by:
      removeAll in interface ImmutableSortedMap<K,V>
      Parameters:
      c - a collection with keys of entries to be removed from this map
      Returns:
      this map instance if it already does not contain the entries, or a different map instance with the entries removed
    • retainAll

      default ImmutableNavigableMap<K,V> retainAll(Iterable<? extends K> c)
      Description copied from interface: ImmutableMap
      Returns a copy of this map that contains only entries that are in this map and in the specified collection.
      Specified by:
      retainAll in interface ImmutableMap<K,V>
      Specified by:
      retainAll in interface ImmutableSortedMap<K,V>
      Parameters:
      c - a collection with keys of entries to be retained in this map
      Returns:
      this map instance if it has not changed, or a different map instance with entries removed
    • retainAll

      default ImmutableNavigableMap<K,V> retainAll(ReadOnlyCollection<? extends K> c)
      Description copied from interface: ImmutableMap
      Returns a copy of this map that contains only entries that are in this map and in the specified collection.
      Specified by:
      retainAll in interface ImmutableMap<K,V>
      Specified by:
      retainAll in interface ImmutableSortedMap<K,V>
      Parameters:
      c - a collection with keys of entries to be retained in this map
      Returns:
      this map instance if it has not changed, or a different map instance with entries removed