Interface FloatBooleanMap
-
- All Superinterfaces:
BooleanIterable
,BooleanValuesMap
,PrimitiveIterable
- All Known Subinterfaces:
ImmutableFloatBooleanMap
,MutableFloatBooleanMap
- All Known Implementing Classes:
FloatBooleanHashMap
,ImmutableFloatBooleanEmptyMap
,ImmutableFloatBooleanHashMap
,ImmutableFloatBooleanSingletonMap
,SynchronizedFloatBooleanMap
,UnmodifiableFloatBooleanMap
public interface FloatBooleanMap extends BooleanValuesMap
This file was automatically generated from template file primitivePrimitiveMap.stg.- Since:
- 3.0.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
containsKey(float key)
Returns whether or not the key is present in the map.boolean
equals(java.lang.Object o)
Follows the same general contract asMap.equals(Object)
.void
forEachKey(FloatProcedure procedure)
Iterates through each key in the map, invoking the procedure for each.void
forEachKeyValue(FloatBooleanProcedure procedure)
Iterates through each key/value pair in the map, invoking the procedure for each.boolean
get(float key)
Retrieves the value associated with the key.boolean
getIfAbsent(float key, boolean ifAbsent)
Retrieves the value associated with the key, returning the specified default value if no such mapping exists.boolean
getOrThrow(float key)
Retrieves the value associated with the key, throwing anIllegalStateException
if no such mapping exists.int
hashCode()
Follows the same general contract asMap.hashCode()
.default <IV> IV
injectIntoKeyValue(IV injectedValue, ObjectFloatBooleanToObjectFunction<? super IV,? extends IV> function)
Implements the injectInto pattern with each key/value pair of the map.MutableFloatSet
keySet()
Returns a set containing all the keys in this map.LazyFloatIterable
keysView()
Returns a view of the keys in this map.RichIterable<FloatBooleanPair>
keyValuesView()
Returns a view of the key/value pairs in this map.FloatBooleanMap
reject(FloatBooleanPredicate predicate)
Return a copy of this map containing only the key/value pairs that do not match the predicate.FloatBooleanMap
select(FloatBooleanPredicate predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.ImmutableFloatBooleanMap
toImmutable()
Returns a copy of this map that is immutable (if this map is mutable) or itself if it is already immutable.java.lang.String
toString()
Follows the same general contract asAbstractMap.toString()
-
Methods inherited from interface org.eclipse.collections.api.BooleanIterable
allSatisfy, anySatisfy, asLazy, booleanIterator, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, noneSatisfy, reduce, reduceIfEmpty, reject, select, toArray, toArray, toBag, toList, toSet
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.BooleanValuesMap
collect, containsValue, forEachValue, reject, select, tap, values
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Method Detail
-
get
boolean get(float key)
Retrieves the value associated with the key. If no mapping exists for the key, the default value (usually0
) is returned.- Parameters:
key
- the key- Returns:
- the value associated with the key, or the default value if no such mapping exists
-
getIfAbsent
boolean getIfAbsent(float key, boolean ifAbsent)
Retrieves the value associated with the key, returning the specified default value if no such mapping exists.- Parameters:
key
- the keyifAbsent
- the default value to return if no mapping exists forkey
- Returns:
- the value associated with the key, or
ifAbsent
if no such mapping exists.
-
getOrThrow
boolean getOrThrow(float key)
Retrieves the value associated with the key, throwing anIllegalStateException
if no such mapping exists.- Parameters:
key
- the key- Returns:
- the value associated with the key
- Throws:
java.lang.IllegalStateException
- if no mapping exists for the key
-
containsKey
boolean containsKey(float key)
Returns whether or not the key is present in the map.- Parameters:
key
- the key- Returns:
- if a mapping exists in this map for the key
-
forEachKey
void forEachKey(FloatProcedure procedure)
Iterates through each key in the map, invoking the procedure for each.- Parameters:
procedure
- the procedure to invoke for each key
-
forEachKeyValue
void forEachKeyValue(FloatBooleanProcedure procedure)
Iterates through each key/value pair in the map, invoking the procedure for each.- Parameters:
procedure
- the procedure to invoke for each key/value pair
-
injectIntoKeyValue
default <IV> IV injectIntoKeyValue(IV injectedValue, ObjectFloatBooleanToObjectFunction<? super IV,? extends IV> function)
Implements the injectInto pattern with each key/value pair of the map.- Parameters:
value
- to be injected into the mapfunction
- to apply to the injected value and key/value pairs- Returns:
- result of injecting the injectedValue into the map
- Since:
- 11.1
-
keysView
LazyFloatIterable keysView()
Returns a view of the keys in this map. This iterable is backed by the map, so any modifications to the underlying map will be reflected in the keys returned by the iterable.- Returns:
- a view of the keys in this map
- Since:
- 5.0
-
keyValuesView
RichIterable<FloatBooleanPair> keyValuesView()
Returns a view of the key/value pairs in this map. This iterable is backed by the map, so any modifications to the underlying map will be reflected in the pairs returned by the iterable.- Returns:
- a view of the keys in this map
- Since:
- 5.0
-
select
FloatBooleanMap select(FloatBooleanPredicate predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.- Parameters:
predicate
- the predicate to determine which key/value pairs in this map should be included in the returned map- Returns:
- a copy of this map with the matching key/value pairs
-
reject
FloatBooleanMap reject(FloatBooleanPredicate predicate)
Return a copy of this map containing only the key/value pairs that do not match the predicate.- Parameters:
predicate
- the predicate to determine which key/value pairs in this map should be excluded from the returned map- Returns:
- a copy of this map without the matching key/value pairs
-
equals
boolean equals(java.lang.Object o)
Follows the same general contract asMap.equals(Object)
.- Overrides:
equals
in classjava.lang.Object
-
hashCode
int hashCode()
Follows the same general contract asMap.hashCode()
.- Overrides:
hashCode
in classjava.lang.Object
-
toString
java.lang.String toString()
Follows the same general contract asAbstractMap.toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this FloatBooleanMap
- See Also:
AbstractCollection.toString()
-
toImmutable
ImmutableFloatBooleanMap toImmutable()
Returns a copy of this map that is immutable (if this map is mutable) or itself if it is already immutable.- Returns:
- an immutable map that is equivalent to this one
-
keySet
MutableFloatSet keySet()
Returns a set containing all the keys in this map. The set is backed by the map, so any modifications to the returned set will affect this map.- Returns:
- a mutable set containing the keys in this map
-
-