Class AbstractMutableBooleanValuesMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractBooleanIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableBooleanValuesMap
- All Implemented Interfaces:
BooleanIterable
,BooleanValuesMap
,MutableBooleanValuesMap
,PrimitiveIterable
- Direct Known Subclasses:
ByteBooleanHashMap
,CharBooleanHashMap
,DoubleBooleanHashMap
,FloatBooleanHashMap
,IntBooleanHashMap
,LongBooleanHashMap
,ShortBooleanHashMap
public abstract class AbstractMutableBooleanValuesMap extends AbstractBooleanIterable implements MutableBooleanValuesMap
-
Constructor Summary
Constructors Constructor Description AbstractMutableBooleanValuesMap()
-
Method Summary
Modifier and Type Method Description boolean
allSatisfy(BooleanPredicate predicate)
Returns true if all of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy(BooleanPredicate predicate)
Returns true if any of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.void
appendString(Appendable appendable, String start, String separator, String end)
Prints a string representation of this collection onto the givenAppendable
.RichIterable<BooleanIterable>
chunk(int size)
Partitions elements in fixed size chunks.<V> MutableBag<V>
collect(BooleanToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
contains(boolean value)
Returns true if the value is contained in the BooleanIterable, and false if it is not.boolean
containsAll(BooleanIterable source)
Returns true if the all of the values specified in the source BooleanIterable are contained in the BooleanIterable, and false if they are not.int
count(BooleanPredicate predicate)
Returns a count of the number of elements in the BooleanIterable that return true for the specified predicate.boolean
detectIfNone(BooleanPredicate predicate, boolean value)
void
each(BooleanProcedure procedure)
A synonym for forEach.void
forEach(BooleanProcedure procedure)
Applies the BooleanProcedure to each element in the BooleanIterable.void
forEachValue(BooleanProcedure procedure)
Iterates through each value in this map.<V> V
injectInto(V injectedValue, ObjectBooleanToObjectFunction<? super V,? extends V> function)
boolean
isEmpty()
Returns true if this iterable has zero items.boolean
noneSatisfy(BooleanPredicate predicate)
Returns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.boolean
notEmpty()
The English equivalent of !this.isEmpty()MutableBooleanBag
reject(BooleanPredicate predicate)
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.MutableBooleanBag
select(BooleanPredicate predicate)
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.int
size()
Returns the number of items in this iterable.boolean[]
toArray()
Converts the BooleanIterable to a primitive boolean array.boolean[]
toArray(boolean[] array)
Converts the BooleanIterable to a primitive boolean array.Methods inherited from class org.eclipse.collections.impl.primitive.AbstractBooleanIterable
asLazy, containsAll, toBag, toList, toSet, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.collections.api.BooleanIterable
asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, flatCollect, reduce, reduceIfEmpty, reject, select, toBag, toList, toSet
Methods inherited from interface org.eclipse.collections.api.map.primitive.BooleanValuesMap
containsValue, tap, values
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableBooleanValuesMap
booleanIterator, clear
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
AbstractMutableBooleanValuesMap
public AbstractMutableBooleanValuesMap()
-
-
Method Details
-
contains
public boolean contains(boolean value)Description copied from interface:BooleanIterable
Returns true if the value is contained in the BooleanIterable, and false if it is not.- Specified by:
contains
in interfaceBooleanIterable
-
containsAll
Description copied from interface:BooleanIterable
Returns true if the all of the values specified in the source BooleanIterable are contained in the BooleanIterable, and false if they are not.- Specified by:
containsAll
in interfaceBooleanIterable
- Overrides:
containsAll
in classAbstractBooleanIterable
-
size
public int size()Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
-
forEach
Description copied from interface:BooleanIterable
Applies the BooleanProcedure to each element in the BooleanIterable.- Specified by:
forEach
in interfaceBooleanIterable
-
each
Description copied from interface:BooleanIterable
A synonym for forEach.- Specified by:
each
in interfaceBooleanIterable
- Since:
- 7.0.
-
forEachValue
Description copied from interface:BooleanValuesMap
Iterates through each value in this map.- Specified by:
forEachValue
in interfaceBooleanValuesMap
- Parameters:
procedure
- the procedure to invoke for each value in this map.
-
injectInto
public <V> V injectInto(V injectedValue, ObjectBooleanToObjectFunction<? super V,? extends V> function)- Specified by:
injectInto
in interfaceBooleanIterable
-
chunk
Description copied from interface:BooleanIterable
Partitions elements in fixed size chunks.- Specified by:
chunk
in interfaceBooleanIterable
- Parameters:
size
- the number of elements per chunk- Returns:
- A
RichIterable
containingBooleanIterable
s of sizesize
, except the last will be truncated if the elements don't divide evenly.
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String, String, String)
.- Specified by:
appendString
in interfacePrimitiveIterable
-
select
Description copied from interface:BooleanIterable
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.- Specified by:
select
in interfaceBooleanIterable
- Specified by:
select
in interfaceBooleanValuesMap
- Specified by:
select
in interfaceMutableBooleanValuesMap
-
reject
Description copied from interface:BooleanIterable
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.- Specified by:
reject
in interfaceBooleanIterable
- Specified by:
reject
in interfaceBooleanValuesMap
- Specified by:
reject
in interfaceMutableBooleanValuesMap
-
collect
Description copied from interface:BooleanIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceBooleanIterable
- Specified by:
collect
in interfaceBooleanValuesMap
- Specified by:
collect
in interfaceMutableBooleanValuesMap
-
detectIfNone
- Specified by:
detectIfNone
in interfaceBooleanIterable
-
count
Description copied from interface:BooleanIterable
Returns a count of the number of elements in the BooleanIterable that return true for the specified predicate.- Specified by:
count
in interfaceBooleanIterable
-
anySatisfy
Description copied from interface:BooleanIterable
Returns true if any of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceBooleanIterable
-
allSatisfy
Description copied from interface:BooleanIterable
Returns true if all of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceBooleanIterable
-
noneSatisfy
Description copied from interface:BooleanIterable
Returns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceBooleanIterable
-
toArray
public boolean[] toArray()Description copied from interface:BooleanIterable
Converts the BooleanIterable to a primitive boolean array.- Specified by:
toArray
in interfaceBooleanIterable
-
toArray
public boolean[] toArray(boolean[] array)Description copied from interface:BooleanIterable
Converts the BooleanIterable to a primitive boolean array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.- Specified by:
toArray
in interfaceBooleanIterable
-