@NotThreadSafe public final class BooleanArrayList extends Object implements MutableBooleanList, Externalizable
FastList, and is memory-optimized for boolean primitives.| Constructor and Description |
|---|
BooleanArrayList() |
BooleanArrayList(boolean... array) |
BooleanArrayList(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(boolean newItem) |
boolean |
addAll(boolean... source) |
boolean |
addAll(BooleanIterable source) |
boolean |
addAllAtIndex(int index,
boolean... source) |
boolean |
addAllAtIndex(int index,
BooleanIterable source) |
void |
addAtIndex(int index,
boolean element) |
boolean |
allSatisfy(BooleanPredicate predicate) |
boolean |
anySatisfy(BooleanPredicate predicate) |
void |
appendString(Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable. |
LazyBooleanIterable |
asLazy() |
LazyBooleanIterable |
asReversed() |
MutableBooleanList |
asSynchronized() |
MutableBooleanList |
asUnmodifiable() |
MutableBooleanIterator |
booleanIterator() |
void |
clear() |
<V> MutableList<V> |
collect(BooleanToObjectFunction<? extends V> function) |
boolean |
contains(boolean value) |
boolean |
containsAll(boolean... source) |
boolean |
containsAll(BooleanIterable source) |
int |
count(BooleanPredicate predicate) |
boolean |
detectIfNone(BooleanPredicate predicate,
boolean ifNone) |
MutableBooleanList |
distinct() |
void |
each(BooleanProcedure procedure) |
boolean |
equals(Object otherList)
Follows the same general contract as
List.equals(Object). |
void |
forEach(BooleanProcedure procedure) |
void |
forEachWithIndex(BooleanIntProcedure procedure) |
boolean |
get(int index) |
boolean |
getFirst() |
boolean |
getLast() |
int |
hashCode()
Follows the same general contract as
List.hashCode(). |
int |
indexOf(boolean object) |
<T> T |
injectInto(T injectedValue,
ObjectBooleanToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectBooleanIntToObjectFunction<? super T,? extends T> function) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
int |
lastIndexOf(boolean object) |
String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
String |
makeString(String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
String |
makeString(String start,
String separator,
String end)
Returns a string representation of this collection.
|
static BooleanArrayList |
newList(BooleanIterable source) |
static BooleanArrayList |
newListWith(boolean... array) |
boolean |
noneSatisfy(BooleanPredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
void |
readExternal(ObjectInput in) |
BooleanArrayList |
reject(BooleanPredicate predicate) |
boolean |
remove(boolean value) |
boolean |
removeAll(boolean... source) |
boolean |
removeAll(BooleanIterable source) |
boolean |
removeAtIndex(int index) |
boolean |
retainAll(boolean... source) |
boolean |
retainAll(BooleanIterable source) |
BooleanArrayList |
reverseThis() |
BooleanArrayList |
select(BooleanPredicate predicate) |
boolean |
set(int index,
boolean element) |
int |
size()
Returns the number of items in this iterable.
|
MutableBooleanList |
subList(int fromIndex,
int toIndex) |
boolean[] |
toArray() |
MutableBooleanBag |
toBag() |
ImmutableBooleanList |
toImmutable()
Returns an immutable copy of this list.
|
MutableBooleanList |
toList() |
BooleanArrayList |
toReversed() |
MutableBooleanSet |
toSet() |
String |
toString()
Returns a string representation of this PrimitiveIterable.
|
BooleanArrayList |
with(boolean element) |
BooleanArrayList |
with(boolean element1,
boolean element2) |
BooleanArrayList |
with(boolean element1,
boolean element2,
boolean element3) |
BooleanArrayList |
with(boolean element1,
boolean element2,
boolean element3,
boolean... elements) |
BooleanArrayList |
withAll(BooleanIterable elements) |
BooleanArrayList |
without(boolean element) |
BooleanArrayList |
withoutAll(BooleanIterable elements) |
void |
writeExternal(ObjectOutput out) |
public BooleanArrayList()
public BooleanArrayList(int initialCapacity)
public BooleanArrayList(boolean... array)
public static BooleanArrayList newListWith(boolean... array)
public static BooleanArrayList newList(BooleanIterable source)
public int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic void clear()
clear in interface MutableBooleanCollectionpublic boolean contains(boolean value)
contains in interface BooleanIterablepublic boolean containsAll(boolean... source)
containsAll in interface BooleanIterablepublic boolean containsAll(BooleanIterable source)
containsAll in interface BooleanIterablepublic boolean get(int index)
get in interface BooleanListpublic boolean getFirst()
getFirst in interface OrderedBooleanIterablepublic boolean getLast()
getLast in interface ReversibleBooleanIterablepublic int indexOf(boolean object)
indexOf in interface OrderedBooleanIterablepublic int lastIndexOf(boolean object)
lastIndexOf in interface BooleanListpublic boolean add(boolean newItem)
add in interface MutableBooleanCollectionpublic boolean addAll(boolean... source)
addAll in interface MutableBooleanCollectionpublic boolean addAll(BooleanIterable source)
addAll in interface MutableBooleanCollectionpublic void addAtIndex(int index,
boolean element)
addAtIndex in interface MutableBooleanListpublic boolean addAllAtIndex(int index,
boolean... source)
addAllAtIndex in interface MutableBooleanListpublic boolean addAllAtIndex(int index,
BooleanIterable source)
addAllAtIndex in interface MutableBooleanListpublic boolean remove(boolean value)
remove in interface MutableBooleanCollectionpublic boolean removeAll(BooleanIterable source)
removeAll in interface MutableBooleanCollectionpublic boolean removeAll(boolean... source)
removeAll in interface MutableBooleanCollectionpublic boolean retainAll(BooleanIterable source)
retainAll in interface MutableBooleanCollectionCollection.retainAll(Collection)public boolean retainAll(boolean... source)
retainAll in interface MutableBooleanCollectionCollection.retainAll(Collection)public boolean removeAtIndex(int index)
removeAtIndex in interface MutableBooleanListpublic boolean set(int index,
boolean element)
set in interface MutableBooleanListpublic BooleanArrayList with(boolean element)
with in interface MutableBooleanCollectionwith in interface MutableBooleanListpublic BooleanArrayList without(boolean element)
without in interface MutableBooleanCollectionwithout in interface MutableBooleanListpublic BooleanArrayList withAll(BooleanIterable elements)
withAll in interface MutableBooleanCollectionwithAll in interface MutableBooleanListpublic BooleanArrayList withoutAll(BooleanIterable elements)
withoutAll in interface MutableBooleanCollectionwithoutAll in interface MutableBooleanListpublic BooleanArrayList with(boolean element1, boolean element2)
public BooleanArrayList with(boolean element1, boolean element2, boolean element3)
public BooleanArrayList with(boolean element1, boolean element2, boolean element3, boolean... elements)
public MutableBooleanIterator booleanIterator()
booleanIterator in interface BooleanIterablebooleanIterator in interface MutableBooleanCollectionpublic void forEach(BooleanProcedure procedure)
forEach in interface BooleanIterablepublic void each(BooleanProcedure procedure)
each in interface BooleanIterablepublic void forEachWithIndex(BooleanIntProcedure procedure)
forEachWithIndex in interface OrderedBooleanIterablepublic <T> T injectInto(T injectedValue,
ObjectBooleanToObjectFunction<? super T,? extends T> function)
injectInto in interface BooleanIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectBooleanIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedBooleanIterableinjectIntoWithIndex in interface ReversibleBooleanIterablepublic int count(BooleanPredicate predicate)
count in interface BooleanIterablepublic boolean anySatisfy(BooleanPredicate predicate)
anySatisfy in interface BooleanIterablepublic boolean allSatisfy(BooleanPredicate predicate)
allSatisfy in interface BooleanIterablepublic boolean noneSatisfy(BooleanPredicate predicate)
noneSatisfy in interface BooleanIterablepublic BooleanArrayList select(BooleanPredicate predicate)
select in interface BooleanIterableselect in interface MutableBooleanCollectionselect in interface BooleanListselect in interface MutableBooleanListselect in interface OrderedBooleanIterableselect in interface ReversibleBooleanIterablepublic BooleanArrayList reject(BooleanPredicate predicate)
reject in interface BooleanIterablereject in interface MutableBooleanCollectionreject in interface BooleanListreject in interface MutableBooleanListreject in interface OrderedBooleanIterablereject in interface ReversibleBooleanIterablepublic LazyBooleanIterable asReversed()
asReversed in interface ReversibleBooleanIterablepublic BooleanArrayList reverseThis()
reverseThis in interface MutableBooleanListpublic MutableBooleanList asUnmodifiable()
asUnmodifiable in interface MutableBooleanCollectionasUnmodifiable in interface MutableBooleanListpublic MutableBooleanList asSynchronized()
asSynchronized in interface MutableBooleanCollectionasSynchronized in interface MutableBooleanListpublic ImmutableBooleanList toImmutable()
MutableBooleanListtoImmutable in interface MutableBooleanCollectiontoImmutable in interface BooleanListtoImmutable in interface MutableBooleanListpublic MutableBooleanList subList(int fromIndex, int toIndex)
subList in interface BooleanListsubList in interface MutableBooleanListList#subList(int fromIndex, int toIndex)}public BooleanArrayList toReversed()
toReversed in interface BooleanListtoReversed in interface MutableBooleanListtoReversed in interface ReversibleBooleanIterablepublic MutableBooleanList distinct()
distinct in interface BooleanListdistinct in interface MutableBooleanListdistinct in interface ReversibleBooleanIterablepublic boolean detectIfNone(BooleanPredicate predicate, boolean ifNone)
detectIfNone in interface BooleanIterablepublic <V> MutableList<V> collect(BooleanToObjectFunction<? extends V> function)
collect in interface BooleanIterablecollect in interface MutableBooleanCollectioncollect in interface BooleanListcollect in interface MutableBooleanListcollect in interface OrderedBooleanIterablecollect in interface ReversibleBooleanIterablepublic boolean[] toArray()
toArray in interface BooleanIterablepublic boolean equals(Object otherList)
BooleanListList.equals(Object).equals in interface BooleanListequals in class Objectpublic int hashCode()
BooleanListList.hashCode().hashCode in interface BooleanListhashCode in class Objectpublic String toString()
PrimitiveIterabletoString in interface PrimitiveIterabletoString in class Objectpublic String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic MutableBooleanList toList()
toList in interface BooleanIterablepublic MutableBooleanSet toSet()
toSet in interface BooleanIterablepublic MutableBooleanBag toBag()
toBag in interface BooleanIterablepublic LazyBooleanIterable asLazy()
asLazy in interface BooleanIterablepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionCopyright © 2004–2016. All rights reserved.