| Package | Description |
|---|---|
| com.gs.collections.api |
This package contains interfaces for GS Collections API.
|
| com.gs.collections.api.bag.sorted |
This package contains interfaces for SortedBag API.
|
| com.gs.collections.api.collection | |
| com.gs.collections.api.factory.list |
This package contains factory API for creating instances of type
ListIterable. |
| com.gs.collections.api.map |
This package contains interfaces for map API which enhance the performance and functionality of
Map |
| com.gs.collections.api.map.primitive |
This package contains API for primitive to primitive maps, primitive to object maps and object to primitive maps with mutable and immutable variants.
|
| com.gs.collections.api.map.sorted |
This package contains mutable and immutable sorted map interfaces.
|
| com.gs.collections.api.multimap |
This package contains interfaces for
Multimap. |
| Modifier and Type | Method and Description |
|---|---|
<K,V> MapIterable<K,V> |
ParallelIterable.aggregateBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator) |
<K,V> MapIterable<K,V> |
RichIterable.aggregateBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator)
Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function.
|
<K,V> MapIterable<K,V> |
ParallelIterable.aggregateInPlaceBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator) |
<K,V> MapIterable<K,V> |
RichIterable.aggregateInPlaceBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator)
Applies an aggregate procedure over the iterable grouping results into a Map based on the specific groupBy function.
|
T |
ParallelIterable.detectIfNone(Predicate<? super T> predicate,
Function0<? extends T> function) |
T |
RichIterable.detectIfNone(Predicate<? super T> predicate,
Function0<? extends T> function)
Returns the first element of the iterable for which the predicate evaluates to true.
|
<P> T |
ParallelIterable.detectWithIfNone(Predicate2<? super T,? super P> predicate,
P parameter,
Function0<? extends T> function) |
<P> T |
RichIterable.detectWithIfNone(Predicate2<? super T,? super P> predicate,
P parameter,
Function0<? extends T> function)
Returns the first element of the iterable that evaluates to true for the specified predicate2 and parameter, or
returns the value of evaluating the specified function.
|
| Modifier and Type | Method and Description |
|---|---|
<K,V> ImmutableMap<K,V> |
ImmutableSortedBag.aggregateBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator)
Can return an ImmutableMap that's backed by a LinkedHashMap.
|
<K,V> MutableMap<K,V> |
MutableSortedBag.aggregateBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator)
Can return an MutableMap that's backed by a LinkedHashMap.
|
<K,V> MapIterable<K,V> |
SortedBag.aggregateBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator)
Can return an MapIterable that's backed by a LinkedHashMap.
|
<K,V> ImmutableMap<K,V> |
ImmutableSortedBag.aggregateInPlaceBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator)
Can return an ImmutableMap that's backed by a LinkedHashMap.
|
<K,V> MutableMap<K,V> |
MutableSortedBag.aggregateInPlaceBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator)
Can return an MutableMap that's backed by a LinkedHashMap.
|
<K,V> MapIterable<K,V> |
SortedBag.aggregateInPlaceBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator)
Can return an MapIterable that's backed by a LinkedHashMap.
|
| Modifier and Type | Method and Description |
|---|---|
<K,V> ImmutableMap<K,V> |
ImmutableCollection.aggregateBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator) |
<K,V> MutableMap<K,V> |
MutableCollection.aggregateBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator) |
<K,V> ImmutableMap<K,V> |
ImmutableCollection.aggregateInPlaceBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator) |
<K,V> MutableMap<K,V> |
MutableCollection.aggregateInPlaceBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator) |
| Modifier and Type | Method and Description |
|---|---|
<T> MutableList<T> |
MutableListFactory.withNValues(int size,
Function0<T> factory) |
| Modifier and Type | Method and Description |
|---|---|
<K2,V2> ImmutableMap<K2,V2> |
ImmutableMap.aggregateBy(Function<? super V,? extends K2> groupBy,
Function0<? extends V2> zeroValueFactory,
Function2<? super V2,? super V,? extends V2> nonMutatingAggregator) |
<K2,V2> MutableMap<K2,V2> |
MutableMap.aggregateBy(Function<? super V,? extends K2> groupBy,
Function0<? extends V2> zeroValueFactory,
Function2<? super V2,? super V,? extends V2> nonMutatingAggregator) |
<K2,V2> ImmutableMap<K2,V2> |
ImmutableMap.aggregateInPlaceBy(Function<? super V,? extends K2> groupBy,
Function0<? extends V2> zeroValueFactory,
Procedure2<? super V2,? super V> mutatingAggregator) |
<K2,V2> MutableMap<K2,V2> |
MutableMap.aggregateInPlaceBy(Function<? super V,? extends K2> groupBy,
Function0<? extends V2> zeroValueFactory,
Procedure2<? super V2,? super V> mutatingAggregator) |
V |
MapIterable.getIfAbsent(K key,
Function0<? extends V> function)
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.
|
V |
MutableMap.getIfAbsentPut(K key,
Function0<? extends V> function)
Get and return the value in the Map at the specified key.
|
V |
MutableMap.updateValue(K key,
Function0<? extends V> factory,
Function<? super V,? extends V> function)
Looks up the value associated with
key, applies the function to it, and replaces the value. |
<P> V |
MutableMap.updateValueWith(K key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter)
Same as
MutableMap.updateValue(Object, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
| Modifier and Type | Method and Description |
|---|---|
<K,VV> MutableMap<K,VV> |
MutablePrimitiveObjectMap.aggregateBy(Function<? super V,? extends K> groupBy,
Function0<? extends VV> zeroValueFactory,
Function2<? super VV,? super V,? extends VV> nonMutatingAggregator) |
<K,VV> MutableMap<K,VV> |
MutablePrimitiveObjectMap.aggregateInPlaceBy(Function<? super V,? extends K> groupBy,
Function0<? extends VV> zeroValueFactory,
Procedure2<? super VV,? super V> mutatingAggregator) |
V |
ByteObjectMap.getIfAbsent(byte key,
Function0<? extends V> ifAbsent) |
V |
CharObjectMap.getIfAbsent(char key,
Function0<? extends V> ifAbsent) |
V |
DoubleObjectMap.getIfAbsent(double key,
Function0<? extends V> ifAbsent) |
V |
FloatObjectMap.getIfAbsent(float key,
Function0<? extends V> ifAbsent) |
V |
IntObjectMap.getIfAbsent(int key,
Function0<? extends V> ifAbsent) |
V |
LongObjectMap.getIfAbsent(long key,
Function0<? extends V> ifAbsent) |
V |
ShortObjectMap.getIfAbsent(short key,
Function0<? extends V> ifAbsent) |
V |
MutableByteObjectMap.getIfAbsentPut(byte key,
Function0<? extends V> function) |
V |
MutableCharObjectMap.getIfAbsentPut(char key,
Function0<? extends V> function) |
V |
MutableDoubleObjectMap.getIfAbsentPut(double key,
Function0<? extends V> function) |
V |
MutableFloatObjectMap.getIfAbsentPut(float key,
Function0<? extends V> function) |
V |
MutableIntObjectMap.getIfAbsentPut(int key,
Function0<? extends V> function) |
V |
MutableLongObjectMap.getIfAbsentPut(long key,
Function0<? extends V> function) |
V |
MutableShortObjectMap.getIfAbsentPut(short key,
Function0<? extends V> function) |
V |
MutableByteObjectMap.updateValue(byte key,
Function0<? extends V> factory,
Function<? super V,? extends V> function)
Look up the value associated with
key, apply the function to it, and replace the value. |
V |
MutableCharObjectMap.updateValue(char key,
Function0<? extends V> factory,
Function<? super V,? extends V> function)
Look up the value associated with
key, apply the function to it, and replace the value. |
V |
MutableDoubleObjectMap.updateValue(double key,
Function0<? extends V> factory,
Function<? super V,? extends V> function)
Look up the value associated with
key, apply the function to it, and replace the value. |
V |
MutableFloatObjectMap.updateValue(float key,
Function0<? extends V> factory,
Function<? super V,? extends V> function)
Look up the value associated with
key, apply the function to it, and replace the value. |
V |
MutableIntObjectMap.updateValue(int key,
Function0<? extends V> factory,
Function<? super V,? extends V> function)
Look up the value associated with
key, apply the function to it, and replace the value. |
V |
MutableLongObjectMap.updateValue(long key,
Function0<? extends V> factory,
Function<? super V,? extends V> function)
Look up the value associated with
key, apply the function to it, and replace the value. |
V |
MutableShortObjectMap.updateValue(short key,
Function0<? extends V> factory,
Function<? super V,? extends V> function)
Look up the value associated with
key, apply the function to it, and replace the value. |
<P> V |
MutableByteObjectMap.updateValueWith(byte key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter)
Same as
MutableByteObjectMap.updateValue(byte, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
<P> V |
MutableCharObjectMap.updateValueWith(char key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter)
Same as
MutableCharObjectMap.updateValue(char, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
<P> V |
MutableDoubleObjectMap.updateValueWith(double key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter)
Same as
MutableDoubleObjectMap.updateValue(double, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
<P> V |
MutableFloatObjectMap.updateValueWith(float key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter)
Same as
MutableFloatObjectMap.updateValue(float, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
<P> V |
MutableIntObjectMap.updateValueWith(int key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter)
Same as
MutableIntObjectMap.updateValue(int, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
<P> V |
MutableLongObjectMap.updateValueWith(long key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter)
Same as
MutableLongObjectMap.updateValue(long, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
<P> V |
MutableShortObjectMap.updateValueWith(short key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter)
Same as
MutableShortObjectMap.updateValue(short, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
| Modifier and Type | Method and Description |
|---|---|
<K2,V2> ImmutableMap<K2,V2> |
ImmutableSortedMap.aggregateBy(Function<? super V,? extends K2> groupBy,
Function0<? extends V2> zeroValueFactory,
Function2<? super V2,? super V,? extends V2> nonMutatingAggregator) |
<K2,V2> MutableMap<K2,V2> |
MutableSortedMap.aggregateBy(Function<? super V,? extends K2> groupBy,
Function0<? extends V2> zeroValueFactory,
Function2<? super V2,? super V,? extends V2> nonMutatingAggregator) |
<K2,V2> ImmutableMap<K2,V2> |
ImmutableSortedMap.aggregateInPlaceBy(Function<? super V,? extends K2> groupBy,
Function0<? extends V2> zeroValueFactory,
Procedure2<? super V2,? super V> mutatingAggregator) |
<K2,V2> MutableMap<K2,V2> |
MutableSortedMap.aggregateInPlaceBy(Function<? super V,? extends K2> groupBy,
Function0<? extends V2> zeroValueFactory,
Procedure2<? super V2,? super V> mutatingAggregator) |
V |
MutableSortedMap.getIfAbsentPut(K key,
Function0<? extends V> function)
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, and put that value in the
map at the specified key.
|
| Modifier and Type | Method and Description |
|---|---|
<R extends java.util.Collection<V>> |
Multimap.toMap(Function0<R> collectionFactory)
Returns a new
MutableMap of keys from this Multimap to the mapped values as a RichIterable. |