InternalIterable<V>, java.lang.Iterable<V>, MutablePrimitiveObjectMap<V>, PrimitiveObjectMap<V>, RichIterable<V>, ShortObjectMap<V>ShortObjectHashMap, SynchronizedShortObjectMap, UnmodifiableShortObjectMappublic interface MutableShortObjectMap<V> extends ShortObjectMap<V>, MutablePrimitiveObjectMap<V>
| Modifier and Type | Method | Description |
|---|---|---|
MutableShortObjectMap<V> |
asSynchronized() |
|
MutableShortObjectMap<V> |
asUnmodifiable() |
|
MutableObjectShortMap<V> |
flipUniqueValues() |
Return the ObjectShortMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
V |
getIfAbsentPut(short key,
Function0<? extends V> function) |
|
V |
getIfAbsentPut(short key,
V value) |
|
<P> V |
getIfAbsentPutWith(short key,
Function<? super P,? extends V> function,
P parameter) |
|
V |
getIfAbsentPutWithKey(short key,
ShortToObjectFunction<? extends V> function) |
|
V |
put(short key,
V value) |
|
void |
putAll(ShortObjectMap<? extends V> map) |
|
default V |
putPair(ShortObjectPair<V> keyValuePair) |
This method allows MutableShortObjectMap the ability to add an element in the form of ShortObjectPair
|
MutableShortObjectMap<V> |
reject(ShortObjectPredicate<? super V> predicate) |
|
V |
remove(short key) |
|
V |
removeKey(short key) |
|
MutableShortObjectMap<V> |
select(ShortObjectPredicate<? super V> predicate) |
|
MutableShortObjectMap<V> |
tap(Procedure<? super V> procedure) |
Executes the Procedure for each element in the iterable and returns
this. |
V |
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 |
updateValueWith(short key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter) |
Same as
updateValue(short, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
MutableShortObjectMap<V> |
withKeyValue(short key,
V value) |
|
MutableShortObjectMap<V> |
withoutAllKeys(ShortIterable keys) |
|
MutableShortObjectMap<V> |
withoutKey(short key) |
forEach, forEach, forEachWith, forEachWithIndexaggregateBy, aggregateInPlaceBy, clear, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, flatCollectWith, groupBy, groupByEach, groupByUniqueKey, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, zip, zipWithIndexcontainsValue, equals, forEachValue, hashCode, parallelStream, spliterator, stream, toString, valuesallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countBy, countBy, countByWith, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectWith, 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, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndexcontainsKey, forEachKey, forEachKeyValue, get, getIfAbsent, keySet, keysView, keyValuesView, toImmutabledefault V putPair(ShortObjectPair<V> keyValuePair)
put(short, Object)void putAll(ShortObjectMap<? extends V> map)
V removeKey(short key)
V remove(short key)
V getIfAbsentPutWithKey(short key, ShortToObjectFunction<? extends V> function)
<P> V getIfAbsentPutWith(short key, Function<? super P,? extends V> function, P parameter)
V updateValue(short 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(short key, Function0<? extends V> factory, Function2<? super V,? super P,? extends V> function, P parameter)
updateValue(short, Function0, Function) with a Function2 and specified parameter which is
passed to the function.MutableObjectShortMap<V> flipUniqueValues()
ShortObjectMapflipUniqueValues in interface ShortObjectMap<V>MutableShortObjectMap<V> tap(Procedure<? super V> procedure)
RichIterablethis.
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 RichIterable<V>tap in interface ShortObjectMap<V>RichIterable.each(Procedure),
InternalIterable.forEach(Procedure)MutableShortObjectMap<V> select(ShortObjectPredicate<? super V> predicate)
select in interface ShortObjectMap<V>MutableShortObjectMap<V> reject(ShortObjectPredicate<? super V> predicate)
reject in interface ShortObjectMap<V>MutableShortObjectMap<V> withKeyValue(short key, V value)
MutableShortObjectMap<V> withoutKey(short key)
MutableShortObjectMap<V> withoutAllKeys(ShortIterable keys)
MutableShortObjectMap<V> asUnmodifiable()
MutableShortObjectMap<V> asSynchronized()
Copyright © 2004–2018. All rights reserved.