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 |
|---|---|
default boolean |
containsKey(K key) |
java.util.stream.Stream<Map.Entry<K,V>> |
entryStream() |
default <R> java.util.stream.Stream<R> |
flatten(java.util.function.BiFunction<K,V,java.util.stream.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 - keyjava.util.stream.Stream<Map.Entry<K,V>> entryStream()
Stream of map entriesdefault <R> java.util.stream.Stream<R> flatten(java.util.function.BiFunction<K,V,java.util.stream.Stream<R>> f)
f - a function that flattens one entry into a streamLicenced under the Apache License, Version 2.0