| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <K1, V1, V2> ImmutableMap | 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 Map | |
| public void | clear()
Implements java. Removes all of the mappings from this map (optional operation). |
| public <K2, V2> ImmutableMap | collect(Function2<? super K, ? super V, Pair<K2, V2>> function)
Implements org. For each key and value of the map the function is evaluated. |
| public <R> ImmutableBag | collect(Function<? super V, ? extends R> function)
Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection. |
| public ImmutableBooleanBag | collectBoolean(BooleanFunction<? super V> booleanFunction)
Implements org. Returns a new primitive |
| public ImmutableByteBag | collectByte(ByteFunction<? super V> byteFunction)
Implements org. Returns a new primitive |
| public ImmutableCharBag | collectChar(CharFunction<? super V> charFunction)
Implements org. Returns a new primitive |
| public ImmutableDoubleBag | collectDouble(DoubleFunction<? super V> doubleFunction)
Implements org. Returns a new primitive |
| public ImmutableFloatBag | collectFloat(FloatFunction<? super V> floatFunction)
Implements org. Returns a new primitive |
| public <R> ImmutableBag | collectIf(Predicate<? super V> predicate, Function<? super V, ? extends R> function)
Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate. |
| public ImmutableIntBag | collectInt(IntFunction<? super V> intFunction)
Implements org. Returns a new primitive |
| public <R> ImmutableMap | collectKeysUnique(Function2<? super K, ? super V, ? extends R> function)
Implements org. For each key and value of the map the function is evaluated. |
| public ImmutableLongBag | collectLong(LongFunction<? super V> longFunction)
Implements org. Returns a new primitive |
| public ImmutableShortBag | collectShort(ShortFunction<? super V> shortFunction)
Implements org. Returns a new primitive |
| public <R> ImmutableMap | collectValues(Function2<? super K, ? super V, ? extends R> function)
Implements org. For each key and value of the map the function is evaluated. |
| public <P, VV> ImmutableBag | collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter)
Implements org. Same as |
| public <V1> ImmutableBag | countBy(Function<? super V, ? extends V1> function)
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> ImmutableBag | 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> ImmutableBag | countByWith(Function2<? super V, ? super P, ? extends V1> function, P parameter)
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 Set | entrySet()
Implements java. Returns a |
| public <R> ImmutableBag | flatCollect(Function<? super V, ? extends Iterable<R>> function)
Implements org.
|
| public ImmutableSetMultimap | flip()
Implements org. Given a map from Domain |
| public ImmutableMap | flipUniqueValues()
Implements org. Return the MapIterable that is obtained by flipping the direction of this map and making the associations from value to key. |
| public void | forEach(BiConsumer<? super K, ? super V> action)
Overrides default org. Performs the given action for each entry in this map until all entries have been processed or the action throws an exception. |
| public <VV> ImmutableBagMultimap | groupBy(Function<? super V, ? extends VV> function)
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 <VV> ImmutableBagMultimap | groupByEach(Function<? super V, ? extends Iterable<VV>> function)
Implements org. Similar to |
| public <V1> ImmutableMap | groupByUniqueKey(Function<? super V, ? extends V1> function)
Overrides default 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 Iterator | |
| public ImmutableMap | newWithAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValuePairs)
Implements org.
|
| public ImmutableMap | newWithAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues)
Implements org.
|
| public ImmutableMap | newWithKeyValue(K key, V value)
Implements org.
|
| public ImmutableMap | newWithMap(Map<? extends K, ? extends V> map)
Implements org.
|
| public ImmutableMap | newWithMapIterable(MapIterable<? extends K, ? extends V> mapIterable)
Implements org.
|
| public ImmutableMap | newWithoutAllKeys(Iterable<? extends K> keys)
Implements org.
|
| public ImmutableMap | |
| public PartitionImmutableBag | partition(Predicate<? super V> predicate)
Implements org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. |
| public <P> PartitionImmutableBag | partitionWith(Predicate2<? super V, ? super P> predicate, P parameter)
Implements org. Filters a collection into a PartitionIterable 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 ImmutableMap | reject(Predicate2<? super K, ? super V> predicate)
Implements org. For each key and value of the map the predicate is evaluated, if the result of the evaluation is false, that key and value are returned in a new map. |
| public ImmutableBag | reject(Predicate<? super V> predicate)
Implements org. Returns all elements of the source collection that return false when evaluating of the predicate. |
| public <P> ImmutableBag | rejectWith(Predicate2<? super V, ? super P> predicate, P parameter)
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 ImmutableMap | select(Predicate2<? super K, ? super V> predicate)
Implements org. For each key and value of the map the predicate is evaluated, if the result of the evaluation is true, that key and value are returned in a new map. |
| public ImmutableBag | select(Predicate<? super V> predicate)
Implements org. Returns all elements of the source collection that return true when evaluating the predicate. |
| public <S> ImmutableBag | selectInstancesOf(Class<S> clazz)
Implements org. Returns all elements of the source collection that are instances of the Class |
| public <P> ImmutableBag | selectWith(Predicate2<? super V, ? super P> predicate, P parameter)
Implements org. Similar to |
| public <V1> ImmutableObjectDoubleMap | sumByDouble(Function<? super V, ? extends V1> groupBy, DoubleFunction<? super V> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V1> ImmutableObjectDoubleMap | sumByFloat(Function<? super V, ? extends V1> groupBy, FloatFunction<? super V> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V1> ImmutableObjectLongMap | sumByInt(Function<? super V, ? extends V1> groupBy, IntFunction<? super V> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V1> ImmutableObjectLongMap | sumByLong(Function<? super V, ? extends V1> groupBy, LongFunction<? super V> function)
Implements org. Groups and sums the values using the two specified functions. |
| public ImmutableMap | tap(Procedure<? super V> procedure)
Implements org. Executes the Procedure for each value of the map and returns |
| public ImmutableMap | toImmutable()
Implements org. Converts the UnsortedMapIterable to an immutable implementation. |
| public MutableMap | |
| public <S> ImmutableBag | zip(Iterable<S> that)
Implements org.
Deprecated
in 6.0. Use
OrderedIterable#zip(Iterable) instead.
Returns a |
| public ImmutableSet | zipWithIndex()
Implements org.
Deprecated
in 6.0. Use
OrderedIterable#zipWithIndex() instead.
Zips this |