public interface ByteObjectMap<V> extends PrimitiveObjectMap<V>
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(byte key)
Returns whether or not the key is present in the map.
|
ObjectByteMap<V> |
flipUniqueValues()
Return the ObjectByteMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(ByteProcedure procedure)
Iterates through each key in the map, invoking the procedure for each.
|
void |
forEachKeyValue(ByteObjectProcedure<? super V> procedure)
Iterates through each key/value pair in the map, invoking the procedure for each.
|
V |
get(byte key)
Retrieves the value associated with the key.
|
V |
getIfAbsent(byte key,
Function0<? extends V> ifAbsent)
Retrieves the value associated with the key if one exists; if it does not,
returns the result of invoking the value supplier.
|
default <IV> IV |
injectIntoKeyValue(IV injectedValue,
ObjectByteObjectToObjectFunction<? super IV,? super V,? extends IV> function)
Implements the injectInto pattern with each key/value pair of the map.
|
MutableByteSet |
keySet()
Returns a set containing all the keys in this map.
|
LazyByteIterable |
keysView()
Returns a view of the keys in this map.
|
RichIterable<ByteObjectPair<V>> |
keyValuesView()
Returns a view of the key/value pairs in this map.
|
ByteObjectMap<V> |
reject(ByteObjectPredicate<? super V> predicate)
Return a copy of this map containing only the key/value pairs that do not match the
predicate.
|
ByteObjectMap<V> |
select(ByteObjectPredicate<? super V> predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.
|
ByteObjectMap<V> |
tap(Procedure<? super V> procedure)
Executes the Procedure for each element in the iterable and returns
this. |
ImmutableByteObjectMap<V> |
toImmutable()
Returns a copy of this map that is immutable (if this map is mutable) or
itself if it is already immutable.
|
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsValue, equals, flatCollect, flatCollectWith, forEachValue, groupBy, groupByEach, groupByUniqueKey, hashCode, parallelStream, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, spliterator, stream, toString, values, zip, zipWithIndexaggregateBy, aggregateBy, aggregateInPlaceBy, 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, countBy, countByEach, countByEach, countByWith, 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, sumByDouble, sumByFloat, sumByInt, sumByLong, 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, forEachWithIndexV get(byte key)
null is returned.key - the keyV getIfAbsent(byte key, Function0<? extends V> ifAbsent)
key - the keyfunction - the supplier that provides the value if no mapping exists for keyifAbsent if notboolean containsKey(byte key)
key - the keyByteObjectMap<V> tap(Procedure<? super V> procedure)
RichIterablethis.
Example using a Java 8 lambda expression:
RichIterable<Person> tapped =
people.tap(person -> LOGGER.info(person.getName()));
tap in interface RichIterable<V>RichIterable.each(Procedure),
RichIterable.forEach(Procedure)void forEachKey(ByteProcedure procedure)
procedure - the procedure to invoke for each keyvoid forEachKeyValue(ByteObjectProcedure<? super V> procedure)
procedure - the procedure to invoke for each key/value pairdefault <IV> IV injectIntoKeyValue(IV injectedValue,
ObjectByteObjectToObjectFunction<? super IV,? super V,? extends IV> function)
value - to be injected into the mapfunction - to apply to the injected value and key/value pairsByteObjectMap<V> select(ByteObjectPredicate<? super V> predicate)
predicate - the predicate to determine which key/value pairs in this map should be
included in the returned mapByteObjectMap<V> reject(ByteObjectPredicate<? super V> predicate)
predicate - the predicate to determine which key/value pairs in this map should be
excluded from the returned mapImmutableByteObjectMap<V> toImmutable()
MutableByteSet keySet()
LazyByteIterable keysView()
RichIterable<ByteObjectPair<V>> keyValuesView()
ObjectByteMap<V> flipUniqueValues()
IllegalStateException - if the ObjectByteMap contains duplicate values.Copyright © 2004–2023. All rights reserved.