public interface FloatObjectMap<V> extends PrimitiveObjectMap<V>
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(float key)
Returns whether or not the key is present in the map.
|
ObjectFloatMap<V> |
flipUniqueValues()
Return the ObjectFloatMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(FloatProcedure procedure)
Iterates through each key in the map, invoking the procedure for each.
|
void |
forEachKeyValue(FloatObjectProcedure<? super V> procedure)
Iterates through each key/value pair in the map, invoking the procedure for each.
|
V |
get(float key)
Retrieves the value associated with the key.
|
V |
getIfAbsent(float 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.
|
MutableFloatSet |
keySet()
Returns a set containing all the keys in this map.
|
LazyFloatIterable |
keysView()
Returns a view of the keys in this map.
|
RichIterable<FloatObjectPair<V>> |
keyValuesView()
Returns a view of the key/value pairs in this map.
|
FloatObjectMap<V> |
reject(FloatObjectPredicate<? super V> predicate)
Return a copy of this map containing only the key/value pairs that do not match the
predicate.
|
FloatObjectMap<V> |
select(FloatObjectPredicate<? super V> predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.
|
FloatObjectMap<V> |
tap(Procedure<? super V> procedure)
Executes the Procedure for each element in the iterable and returns
this. |
ImmutableFloatObjectMap<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, containsBy, 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, 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, sumByDouble, sumByFloat, sumByInt, sumByLong, 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, zipWithIndexforEach, forEachWith, forEachWithIndexV get(float key)
null is returned.key - the keyV getIfAbsent(float key, Function0<? extends V> ifAbsent)
key - the keyfunction - the supplier that provides the value if no mapping exists for keyifAbsent if notboolean containsKey(float key)
key - the keyFloatObjectMap<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>RichIterable.each(Procedure),
RichIterable.forEach(Procedure)void forEachKey(FloatProcedure procedure)
procedure - the procedure to invoke for each keyvoid forEachKeyValue(FloatObjectProcedure<? super V> procedure)
procedure - the procedure to invoke for each key/value pairFloatObjectMap<V> select(FloatObjectPredicate<? super V> predicate)
predicate - the predicate to determine which key/value pairs in this map should be
included in the returned mapFloatObjectMap<V> reject(FloatObjectPredicate<? super V> predicate)
predicate - the predicate to determine which key/value pairs in this map should be
excluded from the returned mapImmutableFloatObjectMap<V> toImmutable()
MutableFloatSet keySet()
LazyFloatIterable keysView()
RichIterable<FloatObjectPair<V>> keyValuesView()
ObjectFloatMap<V> flipUniqueValues()
IllegalStateException - if the ObjectFloatMap contains duplicate values.Copyright © 2004–2020. All rights reserved.