Class SynchronizedBooleanList
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedBooleanCollection
-
- org.eclipse.collections.impl.list.mutable.primitive.SynchronizedBooleanList
-
- All Implemented Interfaces:
Serializable,BooleanIterable,MutableBooleanCollection,BooleanList,MutableBooleanList,OrderedBooleanIterable,ReversibleBooleanIterable,PrimitiveIterable
public class SynchronizedBooleanList extends AbstractSynchronizedBooleanCollection implements MutableBooleanList
A synchronized view of aMutableBooleanList. It is imperative that the user manually synchronize on the on the collection when iterating over it using an iterator or stream.This file was automatically generated from template file synchronizedPrimitiveList.stg.
- Since:
- 3.1.
- See Also:
MutableBooleanList.asSynchronized(),MutableList.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedBooleanList(MutableBooleanList list)SynchronizedBooleanList(MutableBooleanList list, Object newLock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAllAtIndex(int index, boolean... source)booleanaddAllAtIndex(int index, BooleanIterable source)voidaddAtIndex(int index, boolean element)LazyBooleanIterableasLazy()LazyBooleanIterableasReversed()MutableBooleanListasSynchronized()MutableBooleanListasUnmodifiable()MutableList<Boolean>boxed()<V> MutableList<V>collect(BooleanToObjectFunction<? extends V> function)<V> MutableList<V>collectWithIndex(BooleanIntToObjectFunction<? extends V> function)Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.<V,R extends Collection<V>>
RcollectWithIndex(BooleanIntToObjectFunction<? extends V> function, R target)Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.MutableBooleanListdistinct()booleanequals(Object otherList)voidforEachInBoth(BooleanList other, BooleanBooleanProcedure procedure)voidforEachWithIndex(BooleanIntProcedure procedure)booleanget(int index)booleangetFirst()booleangetLast()inthashCode()intindexOf(boolean value)<T> TinjectIntoWithIndex(T injectedValue, ObjectBooleanIntToObjectFunction<? super T,? extends T> function)intlastIndexOf(boolean value)MutableBooleanListnewEmpty()MutableBooleanListreject(BooleanPredicate predicate)MutableBooleanListrejectWithIndex(BooleanIntPredicate predicate)Returns a new MutableBooleanList excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableBooleanCollection>
RrejectWithIndex(BooleanIntPredicate predicate, R target)Returns a new MutableBooleanCollection excluding all elements with corresponding indexes matching the specified predicate.booleanremoveAtIndex(int index)MutableBooleanListreverseThis()MutableBooleanListselect(BooleanPredicate predicate)MutableBooleanListselectWithIndex(BooleanIntPredicate predicate)Returns a new MutableBooleanList including all elements with corresponding indexes matching the specified predicate.<R extends MutableBooleanCollection>
RselectWithIndex(BooleanIntPredicate predicate, R target)Returns a new MutableBooleanCollection including all elements with corresponding indexes matching the specified predicate.booleanset(int index, boolean element)MutableBooleanListsubList(int fromIndex, int toIndex)ImmutableBooleanListtoImmutable()MutableBooleanListtoReversed()SynchronizedBooleanListwith(boolean element)SynchronizedBooleanListwithAll(BooleanIterable elements)SynchronizedBooleanListwithout(boolean element)SynchronizedBooleanListwithoutAll(BooleanIterable elements)<T> MutableList<BooleanObjectPair<T>>zip(Iterable<T> iterable)MutableList<BooleanBooleanPair>zipBoolean(BooleanIterable iterable)-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedBooleanCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, booleanIterator, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, isEmpty, makeString, makeString, makeString, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, toArray, toArray, toBag, toList, toSet, toString
-
Methods inherited from interface org.eclipse.collections.api.BooleanIterable
allSatisfy, anySatisfy, chunk, 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, select, toArray, toArray, toBag, toList, toSet
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableBooleanCollection
add, addAll, addAll, booleanIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.MutableBooleanList
swap, tap
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Constructor Detail
-
SynchronizedBooleanList
public SynchronizedBooleanList(MutableBooleanList list)
-
SynchronizedBooleanList
public SynchronizedBooleanList(MutableBooleanList list, Object newLock)
-
-
Method Detail
-
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 value)
- Specified by:
indexOfin interfaceOrderedBooleanIterable
-
lastIndexOf
public int lastIndexOf(boolean value)
- Specified by:
lastIndexOfin interfaceBooleanList
-
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
public boolean addAllAtIndex(int index, BooleanIterable source)- Specified by:
addAllAtIndexin interfaceMutableBooleanList
-
removeAtIndex
public boolean removeAtIndex(int index)
- Specified by:
removeAtIndexin interfaceMutableBooleanList
-
set
public boolean set(int index, boolean element)- Specified by:
setin interfaceMutableBooleanList
-
with
public SynchronizedBooleanList with(boolean element)
- Specified by:
within interfaceMutableBooleanCollection- Specified by:
within interfaceMutableBooleanList- Overrides:
within classAbstractSynchronizedBooleanCollection
-
without
public SynchronizedBooleanList without(boolean element)
- Specified by:
withoutin interfaceMutableBooleanCollection- Specified by:
withoutin interfaceMutableBooleanList- Overrides:
withoutin classAbstractSynchronizedBooleanCollection
-
withAll
public SynchronizedBooleanList withAll(BooleanIterable elements)
- Specified by:
withAllin interfaceMutableBooleanCollection- Specified by:
withAllin interfaceMutableBooleanList- Overrides:
withAllin classAbstractSynchronizedBooleanCollection
-
withoutAll
public SynchronizedBooleanList withoutAll(BooleanIterable elements)
- Specified by:
withoutAllin interfaceMutableBooleanCollection- Specified by:
withoutAllin interfaceMutableBooleanList- Overrides:
withoutAllin classAbstractSynchronizedBooleanCollection
-
select
public MutableBooleanList select(BooleanPredicate predicate)
- Specified by:
selectin interfaceBooleanIterable- Specified by:
selectin interfaceBooleanList- Specified by:
selectin interfaceMutableBooleanCollection- Specified by:
selectin interfaceMutableBooleanList- Specified by:
selectin interfaceOrderedBooleanIterable- Specified by:
selectin interfaceReversibleBooleanIterable- Overrides:
selectin classAbstractSynchronizedBooleanCollection
-
boxed
public MutableList<Boolean> boxed()
- Specified by:
boxedin interfaceMutableBooleanList
-
reject
public MutableBooleanList reject(BooleanPredicate predicate)
- Specified by:
rejectin interfaceBooleanIterable- Specified by:
rejectin interfaceBooleanList- Specified by:
rejectin interfaceMutableBooleanCollection- Specified by:
rejectin interfaceMutableBooleanList- Specified by:
rejectin interfaceOrderedBooleanIterable- Specified by:
rejectin interfaceReversibleBooleanIterable- Overrides:
rejectin classAbstractSynchronizedBooleanCollection
-
collect
public <V> MutableList<V> collect(BooleanToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceBooleanIterable- Specified by:
collectin interfaceBooleanList- Specified by:
collectin interfaceMutableBooleanCollection- Specified by:
collectin interfaceMutableBooleanList- Specified by:
collectin interfaceOrderedBooleanIterable- Specified by:
collectin interfaceReversibleBooleanIterable- Overrides:
collectin classAbstractSynchronizedBooleanCollection
-
equals
public boolean equals(Object otherList)
- Specified by:
equalsin interfaceBooleanList- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceBooleanList- Overrides:
hashCodein classObject
-
asLazy
public LazyBooleanIterable asLazy()
- Specified by:
asLazyin interfaceBooleanIterable- Overrides:
asLazyin classAbstractSynchronizedBooleanCollection
-
asUnmodifiable
public MutableBooleanList asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableBooleanCollection- Specified by:
asUnmodifiablein interfaceMutableBooleanList- Overrides:
asUnmodifiablein classAbstractSynchronizedBooleanCollection
-
asSynchronized
public MutableBooleanList asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableBooleanCollection- Specified by:
asSynchronizedin interfaceMutableBooleanList- Overrides:
asSynchronizedin classAbstractSynchronizedBooleanCollection
-
toImmutable
public ImmutableBooleanList toImmutable()
- Specified by:
toImmutablein interfaceBooleanList- Specified by:
toImmutablein interfaceMutableBooleanCollection- Specified by:
toImmutablein interfaceMutableBooleanList- Overrides:
toImmutablein classAbstractSynchronizedBooleanCollection
-
newEmpty
public MutableBooleanList newEmpty()
- Specified by:
newEmptyin interfaceMutableBooleanCollection- Specified by:
newEmptyin interfaceMutableBooleanList- Since:
- 9.2.
-
reverseThis
public MutableBooleanList reverseThis()
- Specified by:
reverseThisin interfaceMutableBooleanList
-
toReversed
public MutableBooleanList toReversed()
- Specified by:
toReversedin interfaceBooleanList- Specified by:
toReversedin interfaceMutableBooleanList- Specified by:
toReversedin interfaceReversibleBooleanIterable
-
asReversed
public LazyBooleanIterable asReversed()
- Specified by:
asReversedin interfaceReversibleBooleanIterable
-
forEachInBoth
public void forEachInBoth(BooleanList other, BooleanBooleanProcedure procedure)
- Specified by:
forEachInBothin interfaceBooleanList
-
forEachWithIndex
public void forEachWithIndex(BooleanIntProcedure procedure)
- Specified by:
forEachWithIndexin interfaceOrderedBooleanIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectBooleanIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndexin interfaceOrderedBooleanIterable- Specified by:
injectIntoWithIndexin interfaceReversibleBooleanIterable
-
distinct
public MutableBooleanList distinct()
- Specified by:
distinctin interfaceBooleanList- Specified by:
distinctin interfaceMutableBooleanList- Specified by:
distinctin interfaceReversibleBooleanIterable- Since:
- 6.0.
-
subList
public MutableBooleanList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceBooleanList- Specified by:
subListin interfaceMutableBooleanList
-
zipBoolean
public MutableList<BooleanBooleanPair> zipBoolean(BooleanIterable iterable)
- Specified by:
zipBooleanin interfaceBooleanList- Specified by:
zipBooleanin interfaceMutableBooleanList- Since:
- 9.1.
-
zip
public <T> MutableList<BooleanObjectPair<T>> zip(Iterable<T> iterable)
- Specified by:
zipin interfaceBooleanList- Specified by:
zipin interfaceMutableBooleanList- Since:
- 9.1.
-
selectWithIndex
public MutableBooleanList selectWithIndex(BooleanIntPredicate predicate)
Returns a new MutableBooleanList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceBooleanList- Specified by:
selectWithIndexin interfaceMutableBooleanList- Specified by:
selectWithIndexin interfaceOrderedBooleanIterable- Specified by:
selectWithIndexin interfaceReversibleBooleanIterable- Since:
- 11.1.
-
selectWithIndex
public <R extends MutableBooleanCollection> R selectWithIndex(BooleanIntPredicate predicate, R target)
Returns a new MutableBooleanCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedBooleanIterable- Since:
- 11.1.
-
rejectWithIndex
public MutableBooleanList rejectWithIndex(BooleanIntPredicate predicate)
Returns a new MutableBooleanList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceBooleanList- Specified by:
rejectWithIndexin interfaceMutableBooleanList- Specified by:
rejectWithIndexin interfaceOrderedBooleanIterable- Specified by:
rejectWithIndexin interfaceReversibleBooleanIterable- Since:
- 11.1.
-
rejectWithIndex
public <R extends MutableBooleanCollection> R rejectWithIndex(BooleanIntPredicate predicate, R target)
Returns a new MutableBooleanCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedBooleanIterable- Since:
- 11.1.
-
collectWithIndex
public <V> MutableList<V> collectWithIndex(BooleanIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceBooleanList- Specified by:
collectWithIndexin interfaceMutableBooleanList- Specified by:
collectWithIndexin interfaceOrderedBooleanIterable- Specified by:
collectWithIndexin interfaceReversibleBooleanIterable- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(BooleanIntToObjectFunction<? extends V> function, R target)
Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceOrderedBooleanIterable- Since:
- 9.1.
-
-