InternalIterable<V>
, IntObjectMap<V>
, Iterable<V>
, MutablePrimitiveObjectMap<V>
, PrimitiveObjectMap<V>
, RichIterable<V>
IntObjectHashMap
, SynchronizedIntObjectMap
, UnmodifiableIntObjectMap
public interface MutableIntObjectMap<V> extends IntObjectMap<V>, MutablePrimitiveObjectMap<V>
Modifier and Type | Method | Description |
---|---|---|
MutableIntObjectMap<V> |
asSynchronized() |
|
MutableIntObjectMap<V> |
asUnmodifiable() |
|
V |
getIfAbsentPut(int key,
Function0<? extends V> function) |
|
V |
getIfAbsentPut(int key,
V value) |
|
<P> V |
getIfAbsentPutWith(int key,
Function<? super P,? extends V> function,
P parameter) |
|
V |
getIfAbsentPutWithKey(int key,
IntToObjectFunction<? extends V> function) |
|
V |
put(int key,
V value) |
|
void |
putAll(IntObjectMap<? extends V> map) |
|
MutableIntObjectMap<V> |
reject(IntObjectPredicate<? super V> predicate) |
|
V |
remove(int key) |
|
V |
removeKey(int key) |
|
MutableIntObjectMap<V> |
select(IntObjectPredicate<? super V> predicate) |
|
MutableIntObjectMap<V> |
tap(Procedure<? super V> procedure) |
Executes the Procedure for each element in the iterable and returns
this . |
V |
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. |
<P> V |
updateValueWith(int key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter) |
Same as
updateValue(int, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
MutableIntObjectMap<V> |
withKeyValue(int key,
V value) |
|
MutableIntObjectMap<V> |
withoutAllKeys(IntIterable keys) |
|
MutableIntObjectMap<V> |
withoutKey(int key) |
forEach, forEachWith, forEachWithIndex
containsKey, forEachKey, forEachKeyValue, get, getIfAbsent, keySet, keysView, keyValuesView, toImmutable
forEach, iterator, spliterator
aggregateBy, aggregateInPlaceBy, clear, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, groupBy, groupByEach, groupByUniqueKey, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, zip, zipWithIndex
containsValue, equals, forEachValue, hashCode, toString, values
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, 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, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndex
void putAll(IntObjectMap<? extends V> map)
V removeKey(int key)
V remove(int key)
V getIfAbsentPutWithKey(int key, IntToObjectFunction<? extends V> function)
<P> V getIfAbsentPutWith(int key, Function<? super P,? extends V> function, P parameter)
V updateValue(int key, Function0<? extends V> factory, Function<? super V,? extends V> function)
key
, apply the function
to it, and replace the value. If there
is no value associated with key
, start it off with a value supplied by factory
.<P> V updateValueWith(int key, Function0<? extends V> factory, Function2<? super V,? super P,? extends V> function, P parameter)
updateValue(int, Function0, Function)
with a Function2 and specified parameter which is
passed to the function.MutableIntObjectMap<V> tap(Procedure<? super V> procedure)
RichIterable
this
.
Example using a Java 8 lambda expression:
RichIterable<Person> tapped = people.tap(person -> LOGGER.info(person.getName()));
Example using an anonymous inner class:
RichIterable<Person> tapped = people.tap(new Procedure<Person>() { public void value(Person person) { LOGGER.info(person.getName()); } });
tap
in interface IntObjectMap<V>
tap
in interface RichIterable<V>
RichIterable.each(Procedure)
,
InternalIterable.forEach(Procedure)
MutableIntObjectMap<V> select(IntObjectPredicate<? super V> predicate)
select
in interface IntObjectMap<V>
MutableIntObjectMap<V> reject(IntObjectPredicate<? super V> predicate)
reject
in interface IntObjectMap<V>
MutableIntObjectMap<V> withKeyValue(int key, V value)
MutableIntObjectMap<V> withoutKey(int key)
MutableIntObjectMap<V> withoutAllKeys(IntIterable keys)
MutableIntObjectMap<V> asUnmodifiable()
MutableIntObjectMap<V> asSynchronized()
Copyright © 2004–2017. All rights reserved.