public abstract class AbstractImmutableMap<K,V> extends AbstractMapIterable<K,V> implements ImmutableMap<K,V>, Map<K,V>
| Constructor and Description |
|---|
AbstractImmutableMap() |
| Modifier and Type | Method and Description |
|---|---|
<K1,V1,V2> ImmutableMap<K1,V2> |
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) |
Map<K,V> |
castToMap() |
void |
clear() |
<R> ImmutableBag<R> |
collect(Function<? super V,? extends R> function) |
<K2,V2> ImmutableMap<K2,V2> |
collect(Function2<? super K,? super V,Pair<K2,V2>> function) |
ImmutableBooleanBag |
collectBoolean(BooleanFunction<? super V> booleanFunction) |
ImmutableByteBag |
collectByte(ByteFunction<? super V> byteFunction) |
ImmutableCharBag |
collectChar(CharFunction<? super V> charFunction) |
ImmutableDoubleBag |
collectDouble(DoubleFunction<? super V> doubleFunction) |
ImmutableFloatBag |
collectFloat(FloatFunction<? super V> floatFunction) |
<R> ImmutableBag<R> |
collectIf(Predicate<? super V> predicate,
Function<? super V,? extends R> function) |
ImmutableIntBag |
collectInt(IntFunction<? super V> intFunction) |
ImmutableLongBag |
collectLong(LongFunction<? super V> longFunction) |
ImmutableShortBag |
collectShort(ShortFunction<? super V> shortFunction) |
<R> ImmutableMap<K,R> |
collectValues(Function2<? super K,? super V,? extends R> function) |
<P,VV> ImmutableBag<VV> |
collectWith(Function2<? super V,? super P,? extends VV> function,
P parameter) |
<V1> ImmutableBag<V1> |
countBy(Function<? super V,? extends V1> function) |
<V1> ImmutableBag<V1> |
countByEach(Function<? super V,? extends Iterable<V1>> function) |
<V1,P> ImmutableBag<V1> |
countByWith(Function2<? super V,? super P,? extends V1> function,
P parameter) |
Pair<K,V> |
detect(Predicate2<? super K,? super V> predicate) |
Optional<Pair<K,V>> |
detectOptional(Predicate2<? super K,? super V> predicate) |
Set<Map.Entry<K,V>> |
entrySet() |
<R> ImmutableBag<R> |
flatCollect(Function<? super V,? extends Iterable<R>> function) |
ImmutableSetMultimap<V,K> |
flip() |
ImmutableMap<V,K> |
flipUniqueValues() |
<VV> ImmutableBagMultimap<VV,V> |
groupBy(Function<? super V,? extends VV> function) |
<VV> ImmutableBagMultimap<VV,V> |
groupByEach(Function<? super V,? extends Iterable<VV>> function) |
<V1> ImmutableMap<V1,V> |
groupByUniqueKey(Function<? super V,? extends V1> function) |
Iterator<V> |
iterator() |
ImmutableMap<K,V> |
newWithAllKeyValueArguments(Pair<? extends K,? extends V>... keyValuePairs) |
ImmutableMap<K,V> |
newWithAllKeyValues(Iterable<? extends Pair<? extends K,? extends V>> keyValues) |
ImmutableMap<K,V> |
newWithKeyValue(K key,
V value) |
ImmutableMap<K,V> |
newWithMap(Map<? extends K,? extends V> map) |
ImmutableMap<K,V> |
newWithMapIterable(MapIterable<? extends K,? extends V> mapIterable) |
ImmutableMap<K,V> |
newWithoutAllKeys(Iterable<? extends K> keys) |
ImmutableMap<K,V> |
newWithoutKey(K key) |
PartitionImmutableBag<V> |
partition(Predicate<? super V> predicate) |
<P> PartitionImmutableBag<V> |
partitionWith(Predicate2<? super V,? super P> predicate,
P parameter) |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> map) |
ImmutableBag<V> |
reject(Predicate<? super V> predicate) |
ImmutableMap<K,V> |
reject(Predicate2<? super K,? super V> predicate) |
<P> ImmutableBag<V> |
rejectWith(Predicate2<? super V,? super P> predicate,
P parameter) |
V |
remove(Object key) |
ImmutableBag<V> |
select(Predicate<? super V> predicate) |
ImmutableMap<K,V> |
select(Predicate2<? super K,? super V> predicate) |
<S> ImmutableBag<S> |
selectInstancesOf(Class<S> clazz) |
<P> ImmutableBag<V> |
selectWith(Predicate2<? super V,? super P> predicate,
P parameter) |
<V1> ImmutableObjectDoubleMap<V1> |
sumByDouble(Function<? super V,? extends V1> groupBy,
DoubleFunction<? super V> function) |
<V1> ImmutableObjectDoubleMap<V1> |
sumByFloat(Function<? super V,? extends V1> groupBy,
FloatFunction<? super V> function) |
<V1> ImmutableObjectLongMap<V1> |
sumByInt(Function<? super V,? extends V1> groupBy,
IntFunction<? super V> function) |
<V1> ImmutableObjectLongMap<V1> |
sumByLong(Function<? super V,? extends V1> groupBy,
LongFunction<? super V> function) |
ImmutableMap<K,V> |
tap(Procedure<? super V> procedure) |
ImmutableMap<K,V> |
toImmutable() |
MutableMap<K,V> |
toMap() |
<S> ImmutableBag<Pair<V,S>> |
zip(Iterable<S> that)
Deprecated.
in 6.0. Use
OrderedIterable.zip(Iterable) instead. |
ImmutableSet<Pair<V,Integer>> |
zipWithIndex()
Deprecated.
in 6.0. Use
OrderedIterable.zipWithIndex() instead. |
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asLazy, chunk, contains, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, forEachKey, forEachValue, forEachWith, forEachWithIndex, getFirst, getIfAbsent, getIfAbsentValue, getIfAbsentWith, getLast, getOnly, getOrDefault, ifPresentApply, noneSatisfy, noneSatisfyWith, toArray, toArrayappendString, appendString, collect, collectIf, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, max, max, maxBy, min, min, minBy, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaggregateBy, aggregateInPlaceBy, flatCollectWithcontainsKey, containsValue, equals, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentValue, getIfAbsentWith, getOrDefault, hashCode, ifPresentApply, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, toString, valuesViewaggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndexforEach, forEachWith, forEachWithIndexcompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuespublic Map<K,V> castToMap()
castToMap in interface ImmutableMapIterable<K,V>public MutableMap<K,V> toMap()
toMap in interface ImmutableMap<K,V>public ImmutableMap<K,V> toImmutable()
toImmutable in interface MapIterable<K,V>toImmutable in interface UnsortedMapIterable<K,V>public ImmutableSetMultimap<V,K> flip()
flip in interface ImmutableMap<K,V>flip in interface ImmutableMapIterable<K,V>flip in interface MapIterable<K,V>flip in interface UnsortedMapIterable<K,V>public ImmutableMap<K,V> newWithKeyValue(K key, V value)
newWithKeyValue in interface ImmutableMap<K,V>newWithKeyValue in interface ImmutableMapIterable<K,V>public ImmutableMap<K,V> newWithAllKeyValues(Iterable<? extends Pair<? extends K,? extends V>> keyValues)
newWithAllKeyValues in interface ImmutableMap<K,V>newWithAllKeyValues in interface ImmutableMapIterable<K,V>public ImmutableMap<K,V> newWithMap(Map<? extends K,? extends V> map)
newWithMap in interface ImmutableMap<K,V>newWithMap in interface ImmutableMapIterable<K,V>public ImmutableMap<K,V> newWithMapIterable(MapIterable<? extends K,? extends V> mapIterable)
newWithMapIterable in interface ImmutableMap<K,V>newWithMapIterable in interface ImmutableMapIterable<K,V>public ImmutableMap<K,V> newWithAllKeyValueArguments(Pair<? extends K,? extends V>... keyValuePairs)
newWithAllKeyValueArguments in interface ImmutableMap<K,V>newWithAllKeyValueArguments in interface ImmutableMapIterable<K,V>public ImmutableMap<K,V> newWithoutKey(K key)
newWithoutKey in interface ImmutableMap<K,V>newWithoutKey in interface ImmutableMapIterable<K,V>public ImmutableMap<K,V> newWithoutAllKeys(Iterable<? extends K> keys)
newWithoutAllKeys in interface ImmutableMap<K,V>newWithoutAllKeys in interface ImmutableMapIterable<K,V>public ImmutableMap<V,K> flipUniqueValues()
flipUniqueValues in interface ImmutableMap<K,V>flipUniqueValues in interface ImmutableMapIterable<K,V>flipUniqueValues in interface MapIterable<K,V>flipUniqueValues in interface UnsortedMapIterable<K,V>public <K2,V2> ImmutableMap<K2,V2> collect(Function2<? super K,? super V,Pair<K2,V2>> function)
collect in interface ImmutableMap<K,V>collect in interface ImmutableMapIterable<K,V>collect in interface MapIterable<K,V>collect in interface UnsortedMapIterable<K,V>public <R> ImmutableMap<K,R> collectValues(Function2<? super K,? super V,? extends R> function)
collectValues in interface ImmutableMap<K,V>collectValues in interface ImmutableMapIterable<K,V>collectValues in interface MapIterable<K,V>collectValues in interface UnsortedMapIterable<K,V>public ImmutableMap<K,V> select(Predicate2<? super K,? super V> predicate)
select in interface ImmutableMap<K,V>select in interface ImmutableMapIterable<K,V>select in interface MapIterable<K,V>select in interface UnsortedMapIterable<K,V>public ImmutableMap<K,V> reject(Predicate2<? super K,? super V> predicate)
reject in interface ImmutableMap<K,V>reject in interface ImmutableMapIterable<K,V>reject in interface MapIterable<K,V>reject in interface UnsortedMapIterable<K,V>public Pair<K,V> detect(Predicate2<? super K,? super V> predicate)
detect in interface MapIterable<K,V>public Optional<Pair<K,V>> detectOptional(Predicate2<? super K,? super V> predicate)
detectOptional in interface MapIterable<K,V>public <R> ImmutableBag<R> collect(Function<? super V,? extends R> function)
collect in interface ImmutableMap<K,V>collect in interface UnsortedMapIterable<K,V>collect in interface RichIterable<V>public <P,VV> ImmutableBag<VV> collectWith(Function2<? super V,? super P,? extends VV> function, P parameter)
collectWith in interface ImmutableMap<K,V>collectWith in interface UnsortedMapIterable<K,V>collectWith in interface RichIterable<V>public ImmutableBooleanBag collectBoolean(BooleanFunction<? super V> booleanFunction)
collectBoolean in interface ImmutableMap<K,V>collectBoolean in interface UnsortedMapIterable<K,V>collectBoolean in interface RichIterable<V>public ImmutableByteBag collectByte(ByteFunction<? super V> byteFunction)
collectByte in interface ImmutableMap<K,V>collectByte in interface UnsortedMapIterable<K,V>collectByte in interface RichIterable<V>public ImmutableCharBag collectChar(CharFunction<? super V> charFunction)
collectChar in interface ImmutableMap<K,V>collectChar in interface UnsortedMapIterable<K,V>collectChar in interface RichIterable<V>public ImmutableDoubleBag collectDouble(DoubleFunction<? super V> doubleFunction)
collectDouble in interface ImmutableMap<K,V>collectDouble in interface UnsortedMapIterable<K,V>collectDouble in interface RichIterable<V>public ImmutableFloatBag collectFloat(FloatFunction<? super V> floatFunction)
collectFloat in interface ImmutableMap<K,V>collectFloat in interface UnsortedMapIterable<K,V>collectFloat in interface RichIterable<V>public ImmutableIntBag collectInt(IntFunction<? super V> intFunction)
collectInt in interface ImmutableMap<K,V>collectInt in interface UnsortedMapIterable<K,V>collectInt in interface RichIterable<V>public ImmutableLongBag collectLong(LongFunction<? super V> longFunction)
collectLong in interface ImmutableMap<K,V>collectLong in interface UnsortedMapIterable<K,V>collectLong in interface RichIterable<V>public ImmutableShortBag collectShort(ShortFunction<? super V> shortFunction)
collectShort in interface ImmutableMap<K,V>collectShort in interface UnsortedMapIterable<K,V>collectShort in interface RichIterable<V>public <R> ImmutableBag<R> collectIf(Predicate<? super V> predicate, Function<? super V,? extends R> function)
collectIf in interface ImmutableMap<K,V>collectIf in interface UnsortedMapIterable<K,V>collectIf in interface RichIterable<V>public <R> ImmutableBag<R> flatCollect(Function<? super V,? extends Iterable<R>> function)
flatCollect in interface ImmutableMap<K,V>flatCollect in interface UnsortedMapIterable<K,V>flatCollect in interface RichIterable<V>public ImmutableBag<V> select(Predicate<? super V> predicate)
select in interface ImmutableMap<K,V>select in interface ImmutableMapIterable<K,V>select in interface UnsortedMapIterable<K,V>select in interface RichIterable<V>public <P> ImmutableBag<V> selectWith(Predicate2<? super V,? super P> predicate, P parameter)
selectWith in interface ImmutableMap<K,V>selectWith in interface ImmutableMapIterable<K,V>selectWith in interface UnsortedMapIterable<K,V>selectWith in interface RichIterable<V>public ImmutableMap<K,V> tap(Procedure<? super V> procedure)
tap in interface ImmutableMap<K,V>tap in interface ImmutableMapIterable<K,V>tap in interface MapIterable<K,V>tap in interface UnsortedMapIterable<K,V>tap in interface RichIterable<V>public ImmutableBag<V> reject(Predicate<? super V> predicate)
reject in interface ImmutableMap<K,V>reject in interface ImmutableMapIterable<K,V>reject in interface UnsortedMapIterable<K,V>reject in interface RichIterable<V>public <P> ImmutableBag<V> rejectWith(Predicate2<? super V,? super P> predicate, P parameter)
rejectWith in interface ImmutableMap<K,V>rejectWith in interface ImmutableMapIterable<K,V>rejectWith in interface UnsortedMapIterable<K,V>rejectWith in interface RichIterable<V>public PartitionImmutableBag<V> partition(Predicate<? super V> predicate)
partition in interface ImmutableMap<K,V>partition in interface ImmutableMapIterable<K,V>partition in interface UnsortedMapIterable<K,V>partition in interface RichIterable<V>public <P> PartitionImmutableBag<V> partitionWith(Predicate2<? super V,? super P> predicate, P parameter)
partitionWith in interface ImmutableMap<K,V>partitionWith in interface UnsortedMapIterable<K,V>partitionWith in interface RichIterable<V>public <S> ImmutableBag<S> selectInstancesOf(Class<S> clazz)
selectInstancesOf in interface ImmutableMap<K,V>selectInstancesOf in interface ImmutableMapIterable<K,V>selectInstancesOf in interface UnsortedMapIterable<K,V>selectInstancesOf in interface RichIterable<V>@Deprecated public <S> ImmutableBag<Pair<V,S>> zip(Iterable<S> that)
OrderedIterable.zip(Iterable) instead.zip in interface ImmutableMap<K,V>zip in interface ImmutableMapIterable<K,V>zip in interface UnsortedMapIterable<K,V>zip in interface RichIterable<V>@Deprecated public ImmutableSet<Pair<V,Integer>> zipWithIndex()
OrderedIterable.zipWithIndex() instead.zipWithIndex in interface ImmutableMap<K,V>zipWithIndex in interface ImmutableMapIterable<K,V>zipWithIndex in interface UnsortedMapIterable<K,V>zipWithIndex in interface RichIterable<V>public <VV> ImmutableBagMultimap<VV,V> groupBy(Function<? super V,? extends VV> function)
groupBy in interface ImmutableMap<K,V>groupBy in interface ImmutableMapIterable<K,V>groupBy in interface UnsortedMapIterable<K,V>groupBy in interface RichIterable<V>public <VV> ImmutableBagMultimap<VV,V> groupByEach(Function<? super V,? extends Iterable<VV>> function)
groupByEach in interface ImmutableMap<K,V>groupByEach in interface ImmutableMapIterable<K,V>groupByEach in interface UnsortedMapIterable<K,V>groupByEach in interface RichIterable<V>public <V1> ImmutableMap<V1,V> groupByUniqueKey(Function<? super V,? extends V1> function)
groupByUniqueKey in interface ImmutableMap<K,V>groupByUniqueKey in interface ImmutableMapIterable<K,V>groupByUniqueKey in interface UnsortedMapIterable<K,V>groupByUniqueKey in interface RichIterable<V>public <K1,V1,V2> ImmutableMap<K1,V2> 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)
aggregateBy in interface ImmutableMap<K,V>aggregateBy in interface ImmutableMapIterable<K,V>aggregateBy in interface MapIterable<K,V>public <V1> ImmutableObjectLongMap<V1> sumByInt(Function<? super V,? extends V1> groupBy, IntFunction<? super V> function)
sumByInt in interface RichIterable<V>public <V1> ImmutableObjectDoubleMap<V1> sumByFloat(Function<? super V,? extends V1> groupBy, FloatFunction<? super V> function)
sumByFloat in interface RichIterable<V>public <V1> ImmutableObjectLongMap<V1> sumByLong(Function<? super V,? extends V1> groupBy, LongFunction<? super V> function)
sumByLong in interface RichIterable<V>public <V1> ImmutableObjectDoubleMap<V1> sumByDouble(Function<? super V,? extends V1> groupBy, DoubleFunction<? super V> function)
sumByDouble in interface RichIterable<V>public <V1> ImmutableBag<V1> countBy(Function<? super V,? extends V1> function)
countBy in interface ImmutableMapIterable<K,V>countBy in interface RichIterable<V>public <V1,P> ImmutableBag<V1> countByWith(Function2<? super V,? super P,? extends V1> function, P parameter)
countByWith in interface ImmutableMapIterable<K,V>countByWith in interface RichIterable<V>public <V1> ImmutableBag<V1> countByEach(Function<? super V,? extends Iterable<V1>> function)
countByEach in interface ImmutableMapIterable<K,V>countByEach in interface RichIterable<V>countByEach in class AbstractRichIterable<V>Copyright © 2004–2022. All rights reserved.