Module org.apache.jena.base
Interface PersistentMap<K,V,SelfType extends PersistentMap<K,V,SelfType>>
- Type Parameters:
K- the type of keys in the mapV- the type of values in this mapSelfType- the self-type of implementing classes
- All Known Implementing Classes:
PMap
public interface PersistentMap<K,V,SelfType extends PersistentMap<K,V,SelfType>>
A persistent map data structure.
-
Method Summary
Modifier and TypeMethodDescriptionasMap()An immutable view of this as aMap.default booleancontainsKey(K key) default <R> Stream<R>flatten(BiFunction<K, V, Stream<R>> f) Sends this map's entries through a flattening function.
-
Method Details
-
get
- Parameters:
key-- Returns:
- the value indexed by
keyif it exists
-
plus
- Parameters:
key-value-- Returns:
- a new
SelfTypewith a new mapping fromkeytovalue
-
minus
- Parameters:
key-- Returns:
- a new
SelfTypewithout the mapping indexed bykey
-
containsKey
- Parameters:
key-- Returns:
- whether this map contains an entry indexed by
key
-
entryStream
- Returns:
- a
Streamof map entries
-
flatten
Sends this map's entries through a flattening function.- Parameters:
f- a function that flattens one entry into a stream- Returns:
- a stream of flattened entries
-
asMap
An immutable view of this as aMap.
-