Update the map with several entries, returning a new instance of the map.
Update the map with several entries, returning a new instance of the map.
The new entries to add to the map.
A new instance of the map with the new entries added.
Get a value from the map, throwing an exception if it is not present.
Get a value from the map, throwing an exception if it is not present.
The type of value to retrieve.
The key for the value to retrieve.
The value, if it is present in the map.
scala.NoSuchElementException
If the value isn't present in the map.
Check if the map contains a value with the given key.
Check if the map contains a value with the given key.
The key to check for.
True if the value is present, false otherwise.
Get a value from the map, returning None
if it is not present.
Get a value from the map, returning None
if it is not present.
The type of value to retrieve.
The key for the value to retrieve.
Some
value, if it is present in the map, otherwise None
.
Update the map with the given key and value, returning a new instance of the map.
Update the map with the given key and value, returning a new instance of the map.
The type of value.
The key to set.
The value to use.
A new instance of the map with the new entry added.
The Java version for this map.
A TypedMap is an immutable map containing typed values. Each entry is associated with a TypedKey that can be used to look up the value. A
TypedKey
also defines the type of the value, e.g. aTypedKey[String]
would be associated with aString
value.Instances of this class are created with the
TypedMap.empty
method.The elements inside TypedMaps cannot be enumerated. This is a decision designed to enforce modularity. It's not possible to accidentally or intentionally access a value in a TypedMap without holding the corresponding TypedKey.