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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(BooleanPredicate predicate) Returns true if all of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(BooleanPredicate predicate) Returns true if any of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.voidappendString(Appendable appendable, String start, String separator, String end) Prints a string representation of this collection onto the givenAppendable.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.booleancontains(boolean value) Returns true if the value is contained in the BooleanIterable, and false if it is not.booleancontainsAll(BooleanIterable source) Returns true if all of the values specified in the source BooleanIterable are contained in the BooleanIterable, and false if they are not.intcount(BooleanPredicate predicate) Returns a count of the number of elements in the BooleanIterable that return true for the specified predicate.booleandetectIfNone(BooleanPredicate predicate, boolean value) voideach(BooleanProcedure procedure) A synonym for forEach.voidforEach(BooleanProcedure procedure) Applies the BooleanProcedure to each element in the BooleanIterable.voidforEachValue(BooleanProcedure procedure) Iterates through each value in this map.<V> VinjectInto(V injectedValue, ObjectBooleanToObjectFunction<? super V, ? extends V> function) booleanisEmpty()Returns true if this iterable has zero items.booleannoneSatisfy(BooleanPredicate predicate) Returns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.booleannotEmpty()The English equivalent of !this.isEmpty()reject(BooleanPredicate predicate) Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.select(BooleanPredicate predicate) Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.intsize()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, toBag, toList, toSet, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.collections.api.BooleanIterable
asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, reduce, reduceIfEmpty, reject, select, toBag, toList, toSetMethods inherited from interface org.eclipse.collections.api.map.primitive.BooleanValuesMap
containsValue, tap, valuesMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableBooleanValuesMap
booleanIterator, clearMethods 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:BooleanIterableReturns true if the value is contained in the BooleanIterable, and false if it is not.- Specified by:
containsin interfaceBooleanIterable
-
containsAll
Description copied from interface:BooleanIterableReturns true if all of the values specified in the source BooleanIterable are contained in the BooleanIterable, and false if they are not.- Specified by:
containsAllin interfaceBooleanIterable
-
size
public int size()Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
forEach
Description copied from interface:BooleanIterableApplies the BooleanProcedure to each element in the BooleanIterable.- Specified by:
forEachin interfaceBooleanIterable
-
each
Description copied from interface:BooleanIterableA synonym for forEach.- Specified by:
eachin interfaceBooleanIterable- Since:
- 7.0.
-
forEachValue
Description copied from interface:BooleanValuesMapIterates through each value in this map.- Specified by:
forEachValuein 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:
injectIntoin interfaceBooleanIterable
-
chunk
Description copied from interface:BooleanIterablePartitions elements in fixed size chunks.- Specified by:
chunkin interfaceBooleanIterable- Parameters:
size- the number of elements per chunk- Returns:
- A
RichIterablecontainingBooleanIterables of sizesize, except the last will be truncated if the elements don't divide evenly.
-
appendString
Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString(String, String, String).- Specified by:
appendStringin interfacePrimitiveIterable
-
select
Description copied from interface:BooleanIterableReturns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.- Specified by:
selectin interfaceBooleanIterable- Specified by:
selectin interfaceBooleanValuesMap- Specified by:
selectin interfaceMutableBooleanValuesMap
-
reject
Description copied from interface:BooleanIterableReturns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.- Specified by:
rejectin interfaceBooleanIterable- Specified by:
rejectin interfaceBooleanValuesMap- Specified by:
rejectin interfaceMutableBooleanValuesMap
-
collect
Description copied from interface:BooleanIterableReturns 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:
collectin interfaceBooleanIterable- Specified by:
collectin interfaceBooleanValuesMap- Specified by:
collectin interfaceMutableBooleanValuesMap
-
detectIfNone
- Specified by:
detectIfNonein interfaceBooleanIterable
-
count
Description copied from interface:BooleanIterableReturns a count of the number of elements in the BooleanIterable that return true for the specified predicate.- Specified by:
countin interfaceBooleanIterable
-
anySatisfy
Description copied from interface:BooleanIterableReturns true if any of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceBooleanIterable
-
allSatisfy
Description copied from interface:BooleanIterableReturns true if all of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceBooleanIterable
-
noneSatisfy
Description copied from interface:BooleanIterableReturns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfyin interfaceBooleanIterable
-
toArray
public boolean[] toArray()Description copied from interface:BooleanIterableConverts the BooleanIterable to a primitive boolean array.- Specified by:
toArrayin interfaceBooleanIterable
-
toArray
public boolean[] toArray(boolean[] array) Description copied from interface:BooleanIterableConverts 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:
toArrayin interfaceBooleanIterable
-