public interface PMap<K,V>
Modifier and Type | Interface and Description |
---|---|
static interface |
PMap.BiFunction<A,B,C>
See java.util.function.BiFunction.
|
static interface |
PMap.BiPredicate<A,B>
See java.util.function.BiPredicate.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equivalent(PMap<K,V> that,
PMap.BiPredicate<V,V> equivalence)
Checks equality recursively based on the given equivalence.
|
V |
get(K key)
Retrieves the given key from the map, or returns null if it is not present.
|
boolean |
isEmpty()
Returns whether this map is empty.
|
PMap<K,V> |
minus(K key)
Returns a new map with the given key removed.
|
PMap<K,V> |
plus(K key,
V value)
Returns a new map with the given key-value pair added.
|
PMap<K,V> |
reconcile(PMap<K,V> that,
PMap.BiFunction<V,V,V> joiner)
Performs a reconcile operation.
|
java.lang.Iterable<V> |
values()
Returns an iterable for the values in this map.
|
boolean isEmpty()
java.lang.Iterable<V> values()
@Nullable V get(K key)
PMap<K,V> plus(K key, V value)
PMap<K,V> minus(K key)
PMap<K,V> reconcile(PMap<K,V> that, PMap.BiFunction<V,V,V> joiner)
that
map must be the same implementation.boolean equivalent(PMap<K,V> that, PMap.BiPredicate<V,V> equivalence)
that
map must be the same implementation. Note
that the equivalence MUST be reflective (i.e. equivalence.test(x, x) == true).Copyright © 2009-2019 Google. All Rights Reserved.