class MultiMap[Key, Value] extends AnyRef
Represents a data structure of mappings for multiple values.
- Key
The key used to go from Key -> Seq[Id]
- Value
The value yielded from Key or any Id
- Alphabetic
- By Inheritance
- MultiMap
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new MultiMap()
Type Members
-
type
Id = String
Represents an id to map key to value
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(key: Key): Option[Seq[Value]]
Retrieves all values for the specified key.
Retrieves all values for the specified key.
- key
The key whose values to retrieve
- returns
Some collection of values if the key exists, otherwise None
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getIdsWithKey(key: Key): Option[Seq[Id]]
Retrieves the collection of ids for an key.
Retrieves the collection of ids for an key.
- key
The key whose ids to retrieve
- returns
Some collection of ids if the key exists, otherwise None
-
def
getIdsWithKeyPredicate(predicate: (Key) ⇒ Boolean): Seq[Id]
Retrieves the collection of ids for all keys that satisfy the predicate.
Retrieves the collection of ids for all keys that satisfy the predicate.
- predicate
The predicate to use when evaluating keys
- returns
The collection of ids whose keys satisfy the predicate
-
def
getIdsWithValuePredicate(predicate: (Value) ⇒ Boolean): Seq[Id]
Retrieves the collection of ids for all values that satisfy the predicate.
Retrieves the collection of ids for all values that satisfy the predicate.
- predicate
The predicate to use when evaluating values
- returns
The collection of ids whose values satisfy the predicate
-
def
getKeyWithId(id: Id): Option[Key]
Retrieves the key that uses the specified id to map to a value.
Retrieves the key that uses the specified id to map to a value.
- id
The id used to associate a value with the desired key
- returns
Some key if the id exists, otherwise None
-
def
getWithId(id: Id): Option[Value]
Retrieves the value for the specified id.
Retrieves the value for the specified id.
- id
The id of the value to retrieve
- returns
Some value if the id exists, otherwise None
-
def
getWithKeyPredicate(predicate: (Key) ⇒ Boolean): Seq[Value]
Retrieves all values whose key satisfies the specified predicate.
Retrieves all values whose key satisfies the specified predicate.
- predicate
The predicate to use when evaluating keys
- returns
The collection of values whose keys satisfied the predicate
-
def
getWithValuePredicate(predicate: (Value) ⇒ Boolean): Seq[Value]
Retrieves all values that satisfy the specified predicate.
Retrieves all values that satisfy the specified predicate.
- predicate
The predicate to use when evaluating values
- returns
The collection of values that satisfied the predicate
-
def
has(key: Key): Boolean
Determines if the specified key exists in the map.
Determines if the specified key exists in the map.
- key
The key to check
- returns
True if the key exists, otherwise false
-
def
hasWithId(id: Id): Boolean
Determines if the specified id exists in the map.
Determines if the specified id exists in the map.
- id
The id to check
- returns
True if the id exists, otherwise false
-
def
hasWithKeyPredicate(predicate: (Key) ⇒ Boolean): Boolean
Determines if any key satisfies the specified predicate.
Determines if any key satisfies the specified predicate.
- predicate
The predicate to use when evaluating keys
- returns
True if a key satisfies the predicate, otherwise false
-
def
hasWithValuePredicate(predicate: (Value) ⇒ Boolean): Boolean
Determines if any value satisfies the specified predicate.
Determines if any value satisfies the specified predicate.
- predicate
The predicate to use when evaluating values
- returns
True if a value satisfies the predicate, otherwise false
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
ids: Seq[Id]
Retrieves all underlying ids stored in this map used to link keys to values.
Retrieves all underlying ids stored in this map used to link keys to values.
- returns
The collection of ids
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
keys: Seq[Key]
Retrieves all keys stored in this map.
Retrieves all keys stored in this map.
- returns
The collection of keys
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newId(): Id
Generates a new id.
Generates a new id.
- returns
The new id from a UUID
- Attributes
- protected
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
put(key: Key, value: Value): Id
Adds the value with the specified key to the map.
Adds the value with the specified key to the map.
- key
The key to use when looking up and removing the value
- value
The value to store in the map
- returns
The underlying id used to link the key with the value
-
def
putWithId(id: Id, key: Key, value: Value): Id
Adds the value with the specified key to the map.
Adds the value with the specified key to the map. Uses the specified id to link the key with the value.
- id
The id to use to link the key with the value
- key
The key to use when looking up and removing the value
- value
The value to store in the map
- returns
The underlying id used to link the key with the value
-
def
remove(key: Key): Option[Seq[Value]]
Removes the values with the specified key.
Removes the values with the specified key. Also, removes the underlying ids linking the key to the collection of values.
- key
The key of the values to remove
- returns
Some collection of values if the key exists, otherwise None
-
def
removeWithId(id: Id): Option[Value]
Removes the value with the specified id.
Removes the value with the specified id. Also, removes the association between a key and the value via the id.
- id
The id of the value to remove
- returns
Some value if the id exists, otherwise None
-
def
removeWithKeyPredicate(predicate: (Key) ⇒ Boolean): Seq[Value]
Removes all values whose key satisfies the specified predicate.
Removes all values whose key satisfies the specified predicate.
- predicate
The predicate to use when evaluating keys
- returns
The collection of removed values
-
def
removeWithValuePredicate(predicate: (Value) ⇒ Boolean): Seq[Value]
Removes all values that satisfy the specified predicate.
Removes all values that satisfy the specified predicate.
- predicate
The predicate to use when evaluating values
- returns
The collection of removed values
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
values: Seq[Value]
Retrieves all values stored in this map.
Retrieves all values stored in this map.
- returns
The collection of values
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )