ByteObjectMap<V>
, InternalIterable<V>
, Iterable<V>
, MutablePrimitiveObjectMap<V>
, PrimitiveObjectMap<V>
, RichIterable<V>
ByteObjectHashMap
, SynchronizedByteObjectMap
, UnmodifiableByteObjectMap
public interface MutableByteObjectMap<V> extends ByteObjectMap<V>, MutablePrimitiveObjectMap<V>
Modifier and Type | Method | Description |
---|---|---|
MutableByteObjectMap<V> |
asSynchronized() |
|
MutableByteObjectMap<V> |
asUnmodifiable() |
|
MutableObjectByteMap<V> |
flipUniqueValues() |
Return the ObjectByteMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
V |
getIfAbsentPut(byte key,
Function0<? extends V> function) |
|
V |
getIfAbsentPut(byte key,
V value) |
|
<P> V |
getIfAbsentPutWith(byte key,
Function<? super P,? extends V> function,
P parameter) |
|
V |
getIfAbsentPutWithKey(byte key,
ByteToObjectFunction<? extends V> function) |
|
V |
put(byte key,
V value) |
|
void |
putAll(ByteObjectMap<? extends V> map) |
|
default V |
putPair(ByteObjectPair<V> keyValuePair) |
This method allows MutableByteObjectMap the ability to add an element in the form of
ByteObjectPair<V> . |
MutableByteObjectMap<V> |
reject(ByteObjectPredicate<? super V> predicate) |
|
V |
remove(byte key) |
|
V |
removeKey(byte key) |
|
MutableByteObjectMap<V> |
select(ByteObjectPredicate<? super V> predicate) |
|
MutableByteObjectMap<V> |
tap(Procedure<? super V> procedure) |
Executes the Procedure for each element in the iterable and returns
this . |
V |
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. |
<P> V |
updateValueWith(byte key,
Function0<? extends V> factory,
Function2<? super V,? super P,? extends V> function,
P parameter) |
Same as
updateValue(byte, Function0, Function) with a Function2 and specified parameter which is
passed to the function. |
default MutableByteObjectMap<V> |
withAllKeyValues(Iterable<ByteObjectPair<V>> keyValuePairs) |
|
MutableByteObjectMap<V> |
withKeyValue(byte key,
V value) |
|
MutableByteObjectMap<V> |
withoutAllKeys(ByteIterable keys) |
|
MutableByteObjectMap<V> |
withoutKey(byte key) |
containsKey, forEachKey, forEachKeyValue, get, getIfAbsent, keySet, keysView, keyValuesView, toImmutable
forEach, forEachWith, forEachWithIndex
aggregateBy, 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, zipWithIndex
containsValue, equals, forEachValue, hashCode, parallelStream, spliterator, stream, 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, countBy, countBy, countByEach, countByEach, countByWith, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectWith, forEach, getAny, 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, toBiMap, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndex
default V putPair(ByteObjectPair<V> keyValuePair)
ByteObjectPair<V>
.put(byte, Object)
void putAll(ByteObjectMap<? extends V> map)
V removeKey(byte key)
V remove(byte key)
V getIfAbsentPutWithKey(byte key, ByteToObjectFunction<? extends V> function)
<P> V getIfAbsentPutWith(byte key, Function<? super P,? extends V> function, P parameter)
V updateValue(byte 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(byte key, Function0<? extends V> factory, Function2<? super V,? super P,? extends V> function, P parameter)
updateValue(byte, Function0, Function)
with a Function2 and specified parameter which is
passed to the function.MutableObjectByteMap<V> flipUniqueValues()
ByteObjectMap
flipUniqueValues
in interface ByteObjectMap<V>
MutableByteObjectMap<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 ByteObjectMap<V>
tap
in interface RichIterable<V>
RichIterable.each(Procedure)
,
RichIterable.forEach(Procedure)
MutableByteObjectMap<V> select(ByteObjectPredicate<? super V> predicate)
select
in interface ByteObjectMap<V>
MutableByteObjectMap<V> reject(ByteObjectPredicate<? super V> predicate)
reject
in interface ByteObjectMap<V>
MutableByteObjectMap<V> withKeyValue(byte key, V value)
MutableByteObjectMap<V> withoutKey(byte key)
MutableByteObjectMap<V> withoutAllKeys(ByteIterable keys)
default MutableByteObjectMap<V> withAllKeyValues(Iterable<ByteObjectPair<V>> keyValuePairs)
MutableByteObjectMap<V> asUnmodifiable()
MutableByteObjectMap<V> asSynchronized()
Copyright © 2004–2019. All rights reserved.