namespace HashMap
A type-invariant immutable Map of key type K, and value type V. In the Map, each key has exactly one value, and the Map cannot contain duplicate keys. See the Map documentation and the HashMap API documentation
Companion interface: HashMap<K,V>
Interfaces
Name | Description |
---|---|
HashMap.Builder<K,V> | A mutable HashMap builder used to efficiently create new immutable instances. See the Map documentation and the HashMap.Builder API documentation |
HashMap.Context<UK> | A context instance for a HashMap that acts as a factory for every instance of this type of collection. |
HashMap.NonEmpty<K,V> | A non-empty type-invariant immutable Map of key type K, and value type V. In the Map, each key has exactly one value, and the Map cannot contain duplicate keys. See the Map documentation and the HashMap API documentation |
HashMap.Types | Utility interface that provides higher-kinded types for this collection. |
Static Methods
builder
Returns an empty builder instance for this type of collection and context.
builder
createContext
Returns a new HashMap context instance based on the given options
.
createContext
options
.defaultContext
Returns the default context for HashMaps.
defaultContext
empty
Returns the (singleton) empty instance of this type and context with given key and value types.
empty
from
Returns an immutable map of this type and context, containing the entries in the given sources
StreamSource
instances.
from
sources
StreamSource
instances.merge
Returns a Map containing the common keys from this map and all the given sources
key-value stream sources, and as values tuples of all the corresponding values for each common key. If a source doesn't have a key, the key will be skipped.
merge
sources
key-value stream sources, and as values tuples of all the corresponding values for each common key. If a source doesn't have a key, the key will be skipped.mergeAll
Returns a Map containing all keys from this map and all the given sources
key-value stream sources, and as values tuples of all the corresponding values for each key. If a source doesn't have a key, the tuple will be filled with the given fillValue
.
mergeAll
sources
key-value stream sources, and as values tuples of all the corresponding values for each key. If a source doesn't have a key, the tuple will be filled with the given fillValue
.mergeAllWith
Returns a Map containing all keys from this map and all the given sources
key-value stream sources, and as values the result of applying the given mergeFun
to the key and all the corresponding values for each key. If a source doesn't have a key, the given tuple will be filled with the given fillValue
.
mergeAllWith
sources
key-value stream sources, and as values the result of applying the given mergeFun
to the key and all the corresponding values for each key. If a source doesn't have a key, the given tuple will be filled with the given fillValue
.mergeWith
Returns a Map containing the common keys from this map and all the given sources
key-value stream sources, and as values the result of applying given mergeFun
to the key and values of all the corresponding values for each common key. If a source doesn't have a key, the key will be skipped.
mergeWith
sources
key-value stream sources, and as values the result of applying given mergeFun
to the key and values of all the corresponding values for each common key. If a source doesn't have a key, the key will be skipped.of
Returns an immutable map of this collection type and context, containing the given entries
.
of
entries
.reducer
Returns a Reducer
that adds received tuples to an RMap and returns the RMap as a result. When a source
is given, the reducer will first create an RMap from the source, and then add tuples to it.
reducer
Reducer
that adds received tuples to an RMap and returns the RMap as a result. When a source
is given, the reducer will first create an RMap from the source, and then add tuples to it.