Class BooleanArrayList
java.lang.Object
org.eclipse.collections.impl.list.mutable.primitive.BooleanArrayList
- All Implemented Interfaces:
Externalizable,Serializable,BooleanIterable,MutableBooleanCollection,BooleanList,MutableBooleanList,OrderedBooleanIterable,ReversibleBooleanIterable,PrimitiveIterable
BooleanArrayList is similar to
FastList, and is memory-optimized for boolean primitives.- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(boolean newItem) booleanaddAll(boolean... source) booleanaddAll(BooleanIterable source) booleanaddAllAtIndex(int index, boolean... source) booleanaddAllAtIndex(int index, BooleanIterable source) voidaddAtIndex(int index, boolean element) booleanallSatisfy(BooleanPredicate predicate) booleananySatisfy(BooleanPredicate predicate) voidappendString(Appendable appendable) voidappendString(Appendable appendable, String separator) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()boxed()chunk(int size) voidclear()<V> MutableList<V>collect(BooleanToObjectFunction<? extends V> function) booleancontains(boolean value) booleancontainsAll(boolean... source) booleancontainsAll(BooleanIterable source) intcount(BooleanPredicate predicate) booleandetectIfNone(BooleanPredicate predicate, boolean ifNone) distinct()voideach(BooleanProcedure procedure) booleanvoidforEachWithIndex(BooleanIntProcedure procedure) booleanget(int index) booleangetFirst()booleangetLast()inthashCode()intindexOf(boolean object) <T> TinjectInto(T injectedValue, ObjectBooleanToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectBooleanIntToObjectFunction<? super T, ? extends T> function) booleanisEmpty()intlastIndexOf(boolean object) makeString(String separator) makeString(String start, String separator, String end) static BooleanArrayListnewList(BooleanIterable source) static BooleanArrayListnewListWith(boolean... array) static BooleanArrayListnewWithNValues(int size, boolean value) booleannoneSatisfy(BooleanPredicate predicate) booleannotEmpty()voidreject(BooleanPredicate predicate) booleanremove(boolean value) booleanremoveAll(boolean... source) booleanremoveAll(BooleanIterable source) booleanremoveAtIndex(int index) booleanremoveIf(BooleanPredicate predicate) booleanretainAll(boolean... source) booleanretainAll(BooleanIterable source) select(BooleanPredicate predicate) booleanset(int index, boolean element) intsize()subList(int fromIndex, int toIndex) boolean[]toArray()boolean[]toArray(boolean[] target) toBag()toList()toSet()toStack()toString()with(boolean element) with(boolean element1, boolean element2) with(boolean element1, boolean element2, boolean element3) with(boolean element1, boolean element2, boolean element3, boolean... elements) withAll(BooleanIterable elements) without(boolean element) withoutAll(BooleanIterable elements) voidMethods inherited from interface org.eclipse.collections.api.BooleanIterable
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, reduce, reduceIfEmpty, reject, selectMethods inherited from interface org.eclipse.collections.api.list.primitive.BooleanList
forEachInBothMethods inherited from interface org.eclipse.collections.api.list.primitive.MutableBooleanList
collectWithIndex, newEmpty, rejectWithIndex, selectWithIndex, swap, tap, zip, zipBooleanMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedBooleanIterable
collectWithIndex, rejectWithIndex, selectWithIndex
-
Constructor Details
-
BooleanArrayList
public BooleanArrayList() -
BooleanArrayList
public BooleanArrayList(int initialCapacity) -
BooleanArrayList
public BooleanArrayList(boolean... array)
-
-
Method Details
-
newListWith
-
newList
-
newWithNValues
- Since:
- 8.0
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableBooleanCollection
-
contains
public boolean contains(boolean value) - Specified by:
containsin interfaceBooleanIterable
-
containsAll
public boolean containsAll(boolean... source) - Specified by:
containsAllin interfaceBooleanIterable
-
containsAll
- Specified by:
containsAllin interfaceBooleanIterable
-
get
public boolean get(int index) - Specified by:
getin interfaceBooleanList
-
getFirst
public boolean getFirst()- Specified by:
getFirstin interfaceOrderedBooleanIterable
-
getLast
public boolean getLast()- Specified by:
getLastin interfaceReversibleBooleanIterable
-
indexOf
public int indexOf(boolean object) - Specified by:
indexOfin interfaceOrderedBooleanIterable
-
lastIndexOf
public int lastIndexOf(boolean object) - Specified by:
lastIndexOfin interfaceBooleanList
-
add
public boolean add(boolean newItem) - Specified by:
addin interfaceMutableBooleanCollection
-
addAll
public boolean addAll(boolean... source) - Specified by:
addAllin interfaceMutableBooleanCollection
-
addAll
- Specified by:
addAllin interfaceMutableBooleanCollection
-
addAtIndex
public void addAtIndex(int index, boolean element) - Specified by:
addAtIndexin interfaceMutableBooleanList
-
addAllAtIndex
public boolean addAllAtIndex(int index, boolean... source) - Specified by:
addAllAtIndexin interfaceMutableBooleanList
-
addAllAtIndex
- Specified by:
addAllAtIndexin interfaceMutableBooleanList
-
remove
public boolean remove(boolean value) - Specified by:
removein interfaceMutableBooleanCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableBooleanCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableBooleanCollection
-
removeAll
public boolean removeAll(boolean... source) - Specified by:
removeAllin interfaceMutableBooleanCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableBooleanCollection
-
retainAll
public boolean retainAll(boolean... source) - Specified by:
retainAllin interfaceMutableBooleanCollection
-
removeAtIndex
public boolean removeAtIndex(int index) - Specified by:
removeAtIndexin interfaceMutableBooleanList
-
set
public boolean set(int index, boolean element) - Specified by:
setin interfaceMutableBooleanList
-
with
- Specified by:
within interfaceMutableBooleanCollection- Specified by:
within interfaceMutableBooleanList
-
without
- Specified by:
withoutin interfaceMutableBooleanCollection- Specified by:
withoutin interfaceMutableBooleanList
-
withAll
- Specified by:
withAllin interfaceMutableBooleanCollection- Specified by:
withAllin interfaceMutableBooleanList
-
withoutAll
- Specified by:
withoutAllin interfaceMutableBooleanCollection- Specified by:
withoutAllin interfaceMutableBooleanList
-
with
-
with
-
with
public BooleanArrayList with(boolean element1, boolean element2, boolean element3, boolean... elements) -
booleanIterator
- Specified by:
booleanIteratorin interfaceBooleanIterable- Specified by:
booleanIteratorin interfaceMutableBooleanCollection
-
each
- Specified by:
eachin interfaceBooleanIterable- Since:
- 7.0.
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedBooleanIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectBooleanToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceBooleanIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectBooleanIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedBooleanIterable- Specified by:
injectIntoWithIndexin interfaceReversibleBooleanIterable
-
chunk
- Specified by:
chunkin interfaceBooleanIterable
-
count
- Specified by:
countin interfaceBooleanIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceBooleanIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceBooleanIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceBooleanIterable
-
select
- Specified by:
selectin interfaceBooleanIterable- Specified by:
selectin interfaceBooleanList- Specified by:
selectin interfaceMutableBooleanCollection- Specified by:
selectin interfaceMutableBooleanList- Specified by:
selectin interfaceOrderedBooleanIterable- Specified by:
selectin interfaceReversibleBooleanIterable
-
reject
- Specified by:
rejectin interfaceBooleanIterable- Specified by:
rejectin interfaceBooleanList- Specified by:
rejectin interfaceMutableBooleanCollection- Specified by:
rejectin interfaceMutableBooleanList- Specified by:
rejectin interfaceOrderedBooleanIterable- Specified by:
rejectin interfaceReversibleBooleanIterable
-
asReversed
- Specified by:
asReversedin interfaceReversibleBooleanIterable
-
reverseThis
- Specified by:
reverseThisin interfaceMutableBooleanList
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableBooleanCollection- Specified by:
asUnmodifiablein interfaceMutableBooleanList
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableBooleanCollection- Specified by:
asSynchronizedin interfaceMutableBooleanList
-
toImmutable
- Specified by:
toImmutablein interfaceBooleanList- Specified by:
toImmutablein interfaceMutableBooleanCollection- Specified by:
toImmutablein interfaceMutableBooleanList
-
subList
- Specified by:
subListin interfaceBooleanList- Specified by:
subListin interfaceMutableBooleanList
-
toReversed
- Specified by:
toReversedin interfaceBooleanList- Specified by:
toReversedin interfaceMutableBooleanList- Specified by:
toReversedin interfaceReversibleBooleanIterable
-
distinct
- Specified by:
distinctin interfaceBooleanList- Specified by:
distinctin interfaceMutableBooleanList- Specified by:
distinctin interfaceReversibleBooleanIterable- Since:
- 6.0
-
detectIfNone
- Specified by:
detectIfNonein interfaceBooleanIterable
-
collect
- Specified by:
collectin interfaceBooleanIterable- Specified by:
collectin interfaceBooleanList- Specified by:
collectin interfaceMutableBooleanCollection- Specified by:
collectin interfaceMutableBooleanList- Specified by:
collectin interfaceOrderedBooleanIterable- Specified by:
collectin interfaceReversibleBooleanIterable
-
toArray
public boolean[] toArray()- Specified by:
toArrayin interfaceBooleanIterable
-
toArray
public boolean[] toArray(boolean[] target) - Specified by:
toArrayin interfaceBooleanIterable
-
equals
- Specified by:
equalsin interfaceBooleanList- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceBooleanList- Overrides:
hashCodein classObject
-
toString
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
toList
- Specified by:
toListin interfaceBooleanIterable
-
toSet
- Specified by:
toSetin interfaceBooleanIterable
-
toBag
- Specified by:
toBagin interfaceBooleanIterable
-
asLazy
- Specified by:
asLazyin interfaceBooleanIterable
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
toStack
- Specified by:
toStackin interfaceOrderedBooleanIterable
-
boxed
- Specified by:
boxedin interfaceMutableBooleanList
-