K - the type of keys in the mapV - the type of values in this mapSelfType - the self-type of implementing classespublic interface PersistentMap<K,V,SelfType extends PersistentMap<K,V,SelfType>>
| Modifier and Type | Method and Description |
|---|---|
Map<K,V> |
asMap()
An immutable view of this as a
Map. |
default boolean |
containsKey(K key) |
Stream<Map.Entry<K,V>> |
entryStream() |
default <R> Stream<R> |
flatten(BiFunction<K,V,Stream<R>> f)
Sends this map's entries through a flattening function.
|
default Optional<V> |
get(K key) |
SelfType |
minus(K key) |
SelfType |
plus(K key,
V value) |
SelfType plus(K key, V value)
key - value - SelfType with a new mapping from key to valueSelfType minus(K key)
key - SelfType without the mapping indexed by keydefault boolean containsKey(K key)
key - keydefault <R> Stream<R> flatten(BiFunction<K,V,Stream<R>> f)
f - a function that flattens one entry into a streamLicenced under the Apache License, Version 2.0