-
-
Method Summary
Modifier and Type Method Description abstract Unitadd(K key, V value)Adds the given value to this MutableListMap. abstract Unitadd(K key, V values)Adds the given values to this MutableListMap. abstract Unitadd(K key, Iterable<V> values)Adds the given values to this MutableListMap. abstract Unitadd(Map<K, Iterable<V>> values)Adds the given values to this MutableListMap. abstract Unitset(K key, V value)Sets the given value to this MutableListMap. abstract Unitset(K key, V values)Sets the given values to this MutableListMap. abstract Unitset(K key, Iterable<V> values)Sets the given values to this MutableListMap. abstract Unitset(Map<K, Iterable<V>> values)Sets the given values to this MutableListMap. abstract ListMap<K, V>toImmutable()Creates and returns an immutable ListMap copy of this MutableListMap. -
Methods inherited from class org.veupathdb.lib.s3.s34k.util.ListMap
contains, get, getSize, getTotalSize, isEmpty, isNotEmpty, stream, toMap -
Methods inherited from class kotlin.collections.Iterable
forEach, iterator, spliterator -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
add
abstract Unit add(K key, V value)
Adds the given value to this MutableListMap.
If the given key already exists in this map, the given value will be appended to the list at that key.
Example
listMap == { "foo" = ["bar", "fizz", "buzz"] } key == "foo" value == "happy" listMap.add(key, value) listMap == { "foo" = ["bar", "fizz", "buzz", "happy"] }- Parameters:
key- Key of the value to add.value- Value to add.
-
add
abstract Unit add(K key, V values)
Adds the given values to this MutableListMap.
If the given key already exists in this map, the given values will be appended to the list at that key.
Example
listMap == { "foo" = ["bar", "fizz", "buzz"] } key == "foo" values == ["happy", "sad"] listMap.add(key, values) listMap == { "foo" = ["bar", "fizz", "buzz", "happy", "sad"] }- Parameters:
key- Key of the value to add.values- Values to add.
-
add
abstract Unit add(K key, Iterable<V> values)
Adds the given values to this MutableListMap.
If the given key already exists in this map, the given values will be appended to the list at that key.
Example
listMap == { "foo" = ["bar", "fizz", "buzz"] } key == "foo" values == ["happy", "sad"] listMap.add(key, values) listMap == { "foo" = ["bar", "fizz", "buzz", "happy", "sad"] }- Parameters:
key- Key of the value to add.values- Values to add.
-
add
abstract Unit add(Map<K, Iterable<V>> values)
Adds the given values to this MutableListMap.
If any key in the given Map overlaps with a key in this MutableListMap, the values in the input map will be appended to the list at the overlapping key in this map.
Example
listMap == { "foo" = ["bar", "fizz", "buzz"] } input == { "foo" = ["happy", "sad"] } listMap.add(input) listMap == { "foo" = ["bar", "fizz", "buzz", "happy", "sad"] }- Parameters:
values- Map of values to add to this MutableListMap
-
set
abstract Unit set(K key, V value)
Sets the given value to this MutableListMap.
If the given key already exists in this map it will be overwritten with a new list containing only the given value.
Example
listMap == { "foo" = ["bar", "fizz", "buzz"] } key == "foo" value == "happy" listMap.add(key, value) listMap == { "foo" = ["happy"] }- Parameters:
key- Key of the value to add.value- Value to add.
-
set
abstract Unit set(K key, V values)
Sets the given values to this MutableListMap.
If the given key already exists in this map, it will be overwritten with the given array of values.
Example
listMap == { "foo" = ["bar", "fizz", "buzz"] } key == "foo" values == ["happy", "sad"] listMap.add(key, values) listMap == { "foo" = ["happy", "sad"] }- Parameters:
key- Key of the value to add.values- Values to add.
-
set
abstract Unit set(K key, Iterable<V> values)
Sets the given values to this MutableListMap.
If the given key already exists in this map, it will be overwritten with the given collection of values.
Example
listMap == { "foo" = ["bar", "fizz", "buzz"] } key == "foo" values == ["happy", "sad"] listMap.add(key, values) listMap == { "foo" = ["happy", "sad"] }- Parameters:
key- Key of the value to add.values- Values to add.
-
set
abstract Unit set(Map<K, Iterable<V>> values)
Sets the given values to this MutableListMap.
If any key in the given Map overlaps with a key in this MutableListMap, the values in this MutableListMap will be replaced by value in the input map the list at the overlapping key.
Example
listMap == { "foo" = ["bar", "fizz", "buzz"] } input == { "foo" = ["happy", "sad"] } listMap.add(input) listMap == { "foo" = ["happy", "sad"] }- Parameters:
values- Map of values to add to this MutableListMap
-
toImmutable
abstract ListMap<K, V> toImmutable()
Creates and returns an immutable ListMap copy of this MutableListMap.
-
-
-
-