| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public V | add(Pair<? extends K, ? extends V> keyValuePair)
Overrides default org. This method allows mutable map the ability to add an element in the form of |
| public <KK, VV> MutableMapIterable | aggregateBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Function2<? super VV, ? super V, ? extends VV> nonMutatingAggregator)
Overrides org. Overrides default org. Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function. |
| public <K1, V1, V2> MutableMapIterable | aggregateBy(Function<? super K, ? extends K1> keyFunction, Function<? super V, ? extends V1> valueFunction, Function0<? extends V2> zeroValueFactory, Function2<? super V2, ? super V1, ? extends V2> nonMutatingAggregator)
Overrides default org. Applies an aggregate function over the map grouping results into a map based on the specific key and value groupBy functions. |
| public <KK, VV> MutableMapIterable | aggregateInPlaceBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Procedure2<? super VV, ? super V> mutatingAggregator)
Overrides org. Overrides default org. Applies an aggregate procedure over the iterable grouping results into a Map based on the specific groupBy function. |
| public void | clear()
Implements java. Removes all of the mappings from this map (optional operation). |
| public boolean | containsKey(Object key)
Implements org. Returns |
| public boolean | containsValue(Object value)
Implements org. Returns |
| public <V1> MutableBag | countBy(Function<? super V, ? extends V1> function)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V1> MutableBag | countByEach(Function<? super V, ? extends Iterable<V1>> function)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V1, P> MutableBag | countByWith(Function2<? super V, ? super P, ? extends V1> function, P parameter)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection with the specified parameter as the second argument. |
| public Pair | detect(Predicate2<? super K, ? super V> predicate)
Implements org. Return the first key and value of the map for which the predicate evaluates to true when they are given as arguments. |
| public Optional | detectOptional(Predicate2<? super K, ? super V> predicate)
Implements org. Return the first key and value of the map as an Optional for which the predicate evaluates to true when they are given as arguments. |
| public void | forEachKey(Procedure<? super K> procedure)
Implements org. Calls the |
| public void | forEachKeyValue(Procedure2<? super K, ? super V> procedure2)
Implements org. Calls the |
| public void | forEachValue(Procedure<? super V> procedure)
Implements org. Calls the procedure with each value of the map. |
| public V | get(Object key)
Implements org. Returns the value to which the specified key is mapped,
or |
| protected MutableMapIterable | |
| public V | getIfAbsent(K key, Function0<? extends V> function)
Implements org. Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified Function0. |
| public V | getIfAbsentPut(K key, Function0<? extends V> function)
Implements org. Get and return the value in the Map at the specified key. |
| public V | getIfAbsentPut(K key, V value)
Implements org. Get and return the value in the Map at the specified key. |
| public <P> V | getIfAbsentPutWith(K key, Function<? super P, ? extends V> function, P parameter)
Implements org. Get and return the value in the Map at the specified key. |
| public V | getIfAbsentPutWithKey(K key, Function<? super K, ? extends V> function)
Implements org. Get and return the value in the Map at the specified key. |
| public V | getIfAbsentValue(K key, V value)
Implements org. Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return |
| public <P> V | getIfAbsentWith(K key, Function<? super P, ? extends V> function, P parameter)
Implements org. Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified function and parameter. |
| public <V1> MutableMultimap | groupBy(Function<? super V, ? extends V1> function)
Overrides org. Implements org. For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable. |
| public <V1> MutableMultimap | groupByEach(Function<? super V, ? extends Iterable<V1>> function)
Overrides org. Implements org. Similar to |
| public <VV> MutableMapIterable | groupByUniqueKey(Function<? super V, ? extends VV> function)
Overrides org. Implements org. For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key. |
| public <A> A | ifPresentApply(K key, Function<? super V, ? extends A> function)
Implements org. If there is a value in the Map that corresponds to the specified key return the result of applying the specified Function on the value, otherwise return null. |
| public RichIterable | keysView()
Implements org. Returns an unmodifiable lazy iterable wrapped around the keySet for the map. |
| public RichIterable | keyValuesView()
Implements org. Returns an unmodifiable lazy iterable of key/value pairs wrapped around the entrySet for the map. |
| public V | merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction)
Overrides default java. If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value (optional operation). |
| public PartitionMutableCollection | partition(Predicate<? super V> predicate)
Overrides org. Implements org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. |
| public V | put(K key, V value)
Implements java. Associates the specified value with the specified key in this map (optional operation). |
| public void | putAll(Map<? extends K, ? extends V> map)
Implements java. Copies all of the mappings from the specified map to this map (optional operation). |
| public V | putPair(Pair<? extends K, ? extends V> keyValuePair)
Overrides default org. This method allows mutable map the ability to add an element in the form of |
| public <KK> MutableMapIterable | reduceBy(Function<? super V, ? extends KK> groupBy, Function2<? super V, ? super V, ? extends V> reduceFunction)
Overrides org. Overrides default org. Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function. |
| public MutableCollection | reject(Predicate<? super V> predicate)
Overrides org. Implements org. Returns all elements of the source collection that return false when evaluating of the predicate. |
| public <P> MutableCollection | rejectWith(Predicate2<? super V, ? super P> predicate, P parameter)
Overrides org. Implements org. Similar to |
| public V | remove(Object key)
Implements java. Removes the mapping for a key from this map if it is present (optional operation). |
| public boolean | removeAllKeys(Set<? extends K> keys)
Overrides default org. Remove entries from the map at the specified |
| public boolean | removeIf(Predicate2<? super K, ? super V> predicate)
Overrides default org. Remove an entry from the map if the |
| public V | removeKey(K key)
Implements org. Remove an entry from the map at the specified |
| public MutableCollection | select(Predicate<? super V> predicate)
Overrides org. Implements org. Returns all elements of the source collection that return true when evaluating the predicate. |
| public <S> MutableCollection | selectInstancesOf(Class<S> clazz)
Overrides org. Implements org. Returns all elements of the source collection that are instances of the Class |
| public <P> MutableCollection | selectWith(Predicate2<? super V, ? super P> predicate, P parameter)
Overrides org. Implements org. Similar to |
| public <V1> MutableObjectDoubleMap | sumByDouble(Function<? super V, ? extends V1> groupBy, DoubleFunction<? super V> function)
Overrides org. Implements org. Groups and sums the values using the two specified functions. |
| public <V1> MutableObjectDoubleMap | sumByFloat(Function<? super V, ? extends V1> groupBy, FloatFunction<? super V> function)
Overrides org. Implements org. Groups and sums the values using the two specified functions. |
| public <V1> MutableObjectLongMap | sumByInt(Function<? super V, ? extends V1> groupBy, IntFunction<? super V> function)
Overrides org. Implements org. Groups and sums the values using the two specified functions. |
| public <V1> MutableObjectLongMap | sumByLong(Function<? super V, ? extends V1> groupBy, LongFunction<? super V> function)
Overrides org. Implements org. Groups and sums the values using the two specified functions. |
| public MutableMapIterable | tap(Procedure<? super V> procedure)
Overrides org. Implements org. Executes the Procedure for each value of the map and returns |
| public V | updateValue(K key, Function0<? extends V> factory, Function<? super V, ? extends V> function)
Implements org. Looks up the value associated with |
| public <P> V | updateValueWith(K key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter)
Implements org. Same as |
| public RichIterable | valuesView()
Implements org. Returns an unmodifiable lazy iterable wrapped around the values for the map. |
| public <S> MutableCollection | zip(Iterable<S> that)
Overrides org. Implements org. Returns a |
| public MutableCollection | zipWithIndex()
Overrides org. Implements org. Zips this |