TypeMap
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TypeMap.type
Members list
Value members
Concrete methods
Creates a TypeMap with a single key-value pair.
Creates a TypeMap with a single key-value pair.
Type parameters
- A
-
The type of the value
Value parameters
- a
-
The value to add
- ta
-
An implicit Tag for type A
Attributes
- Returns
-
A new TypeMap with the single key-value pair
Creates a TypeMap with two key-value pairs.
Creates a TypeMap with two key-value pairs.
Type parameters
- A
-
The type of the first value
- B
-
The type of the second value
Value parameters
- a
-
The first value to add
- b
-
The second value to add
- ta
-
An implicit Tag for type A
- tb
-
An implicit Tag for type B
Attributes
- Returns
-
A new TypeMap with the two key-value pairs
Creates a TypeMap with three key-value pairs.
Creates a TypeMap with three key-value pairs.
Attributes
Creates a TypeMap with four key-value pairs.
Creates a TypeMap with four key-value pairs.
Attributes
Extensions
Extensions
Adds a new key-value pair to the TypeMap.
Adds a new key-value pair to the TypeMap.
Type parameters
- B
-
The type of the value to add
Value parameters
- b
-
The value to add
- t
-
An implicit Tag for type B
Attributes
- Returns
-
A new TypeMap with the added key-value pair
Retrieves a value of type B from the TypeMap.
Retrieves a value of type B from the TypeMap.
Type parameters
- B
-
The type of the value to retrieve (must be a supertype of A)
Value parameters
- t
-
An implicit Tag for type B
Attributes
- Returns
-
The value of type B
- Throws
-
RuntimeException
if the value is not found
Checks if the TypeMap is empty.
Checks if the TypeMap is empty.
Attributes
- Returns
-
true if the TypeMap is empty, false otherwise
Filters the TypeMap to only include key-value pairs where the key is a subtype of the given type.
Filters the TypeMap to only include key-value pairs where the key is a subtype of the given type.
Type parameters
- B
-
The type to filter by (must be a supertype of A)
Value parameters
- t
-
An implicit Tag for type B
Attributes
- Returns
-
A new TypeMap containing only the filtered key-value pairs
Returns a string representation of the TypeMap.
Returns a string representation of the TypeMap.
Attributes
- Returns
-
A string describing the contents of the TypeMap
Returns the number of key-value pairs in the TypeMap.
Returns the number of key-value pairs in the TypeMap.
Attributes
- Returns
-
The size of the TypeMap
Combines this TypeMap with another TypeMap.
Combines this TypeMap with another TypeMap.
Type parameters
- B
-
The type of values in the other TypeMap
Value parameters
- that
-
The TypeMap to combine with
Attributes
- Returns
-
A new TypeMap containing all key-value pairs from both TypeMaps