public interface ImmutableLongObjectMap<V> extends LongObjectMap<V>, ImmutablePrimitiveObjectMap<V>
| Modifier and Type | Method and Description |
|---|---|
ImmutableObjectLongMap<V> |
flipUniqueValues()
Return the ObjectLongMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
ImmutableLongObjectMap<V> |
newWithKeyValue(long key,
V value)
Copy this map, associate the value with the key (replacing the value if one
already exists for
key), and return the copy as new immutable map. |
ImmutableLongObjectMap<V> |
newWithoutAllKeys(LongIterable keys)
Copy this map, remove any associated values with the specified keys (if any exist),
and return the copy as a new immutable map.
|
ImmutableLongObjectMap<V> |
newWithoutKey(long key)
Copy this map, remove any associated value with the key (if one exists), and
return the copy as a new immutable map.
|
ImmutableLongObjectMap<V> |
reject(LongObjectPredicate<? super V> predicate)
Return a copy of this map containing only the key/value pairs that do not match the
predicate.
|
ImmutableLongObjectMap<V> |
select(LongObjectPredicate<? super V> predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.
|
ImmutableLongObjectMap<V> |
tap(Procedure<? super V> procedure)
Executes the Procedure for each element in the iterable and returns
this. |
containsKey, forEachKey, forEachKeyValue, get, getIfAbsent, injectIntoKeyValue, keySet, keysView, keyValuesView, toImmutableaggregateBy, aggregateInPlaceBy, 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, valuesaggregateBy, 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, 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, forEachWithIndexImmutableLongObjectMap<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 LongObjectMap<V>tap in interface RichIterable<V>RichIterable.each(Procedure),
RichIterable.forEach(Procedure)ImmutableLongObjectMap<V> select(LongObjectPredicate<? super V> predicate)
LongObjectMapselect in interface LongObjectMap<V>predicate - the predicate to determine which key/value pairs in this map should be
included in the returned mapImmutableLongObjectMap<V> reject(LongObjectPredicate<? super V> predicate)
LongObjectMapreject in interface LongObjectMap<V>predicate - the predicate to determine which key/value pairs in this map should be
excluded from the returned mapImmutableLongObjectMap<V> newWithKeyValue(long key, V value)
key), and return the copy as new immutable map.
A copy is always made even if key is already associated with value.key - the key to addvalue - the value to associate with the key in the copyvalue associated with keyImmutableLongObjectMap<V> newWithoutKey(long key)
key - the key to removekey removedImmutableLongObjectMap<V> newWithoutAllKeys(LongIterable keys)
keys - the keys to removekeys removedImmutableObjectLongMap<V> flipUniqueValues()
LongObjectMapflipUniqueValues in interface LongObjectMap<V>Copyright © 2004–2022. All rights reserved.