public interface ObjectBooleanMap<K> extends BooleanIterable
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(Object key)
Returns whether or not the key is present in the map.
|
boolean |
containsValue(boolean value)
Returns whether or not this map contains the value.
|
void |
forEachKey(Procedure<? super K> procedure)
Iterates through each key in the map, invoking the procedure for each.
|
void |
forEachKeyValue(ObjectBooleanProcedure<? super K> procedure)
Iterates through each key/value pair in the map, invoking the procedure for each.
|
void |
forEachValue(BooleanProcedure procedure)
Iterates through each value in this map.
|
boolean |
get(Object key)
Retrieves the value associated with the key.
|
boolean |
getIfAbsent(Object key,
boolean ifAbsent)
Retrieves the value associated with the key, returning the specified default
value if no such mapping exists.
|
boolean |
getOrThrow(Object key)
Retrieves the value associated with the key, throwing an
IllegalStateException
if no such mapping exists. |
default <IV> IV |
injectIntoKeyValue(IV injectedValue,
ObjectObjectBooleanToObjectFunction<? super IV,? super K,? extends IV> function)
Implements the injectInto pattern with each key/value pair of the map.
|
Set<K> |
keySet()
Returns a set containing all the keys in this map.
|
LazyIterable<K> |
keysView()
Returns a view of the keys in this map.
|
RichIterable<ObjectBooleanPair<K>> |
keyValuesView()
Returns a view of the key/value pairs in this map.
|
ObjectBooleanMap<K> |
reject(ObjectBooleanPredicate<? super K> predicate)
Return a copy of this map containing only the key/value pairs that do not match the
predicate.
|
ObjectBooleanMap<K> |
select(ObjectBooleanPredicate<? super K> predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.
|
default ObjectBooleanMap<K> |
tap(BooleanProcedure procedure) |
ImmutableObjectBooleanMap<K> |
toImmutable()
Returns a copy of this map that is immutable (if this map is mutable) or
itself if it is already immutable.
|
String |
toString()
Follows the same general contract as
AbstractMap.toString() |
MutableBooleanCollection |
values()
Returns the values in this map as a separate collection.
|
allSatisfy, anySatisfy, asLazy, booleanIterator, chunk, collect, 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, reject, select, select, toArray, toArray, toBag, toList, toSetappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeboolean get(Object key)
0) is returned.key - the keyboolean getOrThrow(Object key)
IllegalStateException
if no such mapping exists.key - the keyIllegalStateException - if no mapping exists for the keyboolean getIfAbsent(Object key, boolean ifAbsent)
key - the keyifAbsent - the default value to return if no mapping exists for keyifAbsent if no such
mapping exists.boolean containsKey(Object key)
key - the keyboolean containsValue(boolean value)
value - the value to testvoid forEachValue(BooleanProcedure procedure)
procedure - the procedure to invoke for each value in this map.void forEachKey(Procedure<? super K> procedure)
procedure - the procedure to invoke for each keyvoid forEachKeyValue(ObjectBooleanProcedure<? super K> procedure)
procedure - the procedure to invoke for each key/value pairdefault <IV> IV injectIntoKeyValue(IV injectedValue,
ObjectObjectBooleanToObjectFunction<? super IV,? super K,? extends IV> function)
value - to be injected into the mapfunction - to apply to the injected value and key/value pairsObjectBooleanMap<K> select(ObjectBooleanPredicate<? super K> predicate)
predicate - the predicate to determine which key/value pairs in this map should be
included in the returned mapObjectBooleanMap<K> reject(ObjectBooleanPredicate<? super K> predicate)
predicate - the predicate to determine which key/value pairs in this map should be
excluded from the returned mapdefault ObjectBooleanMap<K> tap(BooleanProcedure procedure)
tap in interface BooleanIterableString toString()
AbstractMap.toString()toString in interface PrimitiveIterabletoString in class ObjectAbstractCollection.toString()ImmutableObjectBooleanMap<K> toImmutable()
Set<K> keySet()
MutableBooleanCollection values()
LazyIterable<K> keysView()
RichIterable<ObjectBooleanPair<K>> keyValuesView()
Copyright © 2004–2022. All rights reserved.