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 a
MutableBooleanList. 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
Modifier and Type Method Description booleanaddAllAtIndex(int index, boolean... source)booleanaddAllAtIndex(int index, BooleanIterable source)voidaddAtIndex(int index, boolean element)LazyBooleanIterableasLazy()Returns a LazyBooleanIterable adapter wrapping the source BooleanIterable.LazyBooleanIterableasReversed()MutableBooleanListasSynchronized()MutableBooleanListasUnmodifiable()<V> MutableList<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.<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)Follows the same general contract asList.equals(Object).voidforEachWithIndex(BooleanIntProcedure procedure)booleanget(int index)booleangetFirst()booleangetLast()inthashCode()Follows the same general contract asList.hashCode().intindexOf(boolean value)<T> TinjectIntoWithIndex(T injectedValue, ObjectBooleanIntToObjectFunction<? super T,? extends T> function)intlastIndexOf(boolean value)MutableBooleanListnewEmpty()Creates a new empty mutable version of the same List type.MutableBooleanListreject(BooleanPredicate predicate)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.booleanremoveAtIndex(int index)MutableBooleanListreverseThis()MutableBooleanListselect(BooleanPredicate predicate)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.booleanset(int index, boolean element)MutableBooleanListsubList(int fromIndex, int toIndex)ImmutableBooleanListtoImmutable()Returns an immutable copy of this list.MutableBooleanListtoReversed()SynchronizedBooleanListwith(boolean element)SynchronizedBooleanListwithAll(BooleanIterable elements)SynchronizedBooleanListwithout(boolean element)SynchronizedBooleanListwithoutAll(BooleanIterable elements)<T> MutableList<BooleanObjectPair<T>>zip(Iterable<T> iterable)Returns aMutableListformed from thisMutableBooleanListand aListIterableby combining corresponding elements in pairs.MutableList<BooleanBooleanPair>zipBoolean(BooleanIterable iterable)Returns aMutableListformed from thisMutableBooleanListand anotherBooleanListby combining corresponding elements in pairs.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, count, detectIfNone, each, forEach, injectInto, isEmpty, makeString, makeString, makeString, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, toArray, toArray, toBag, toList, toSet, toStringMethods inherited from interface org.eclipse.collections.api.BooleanIterable
allSatisfy, anySatisfy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, noneSatisfy, reduce, reduceIfEmpty, reject, select, toArray, toArray, toBag, toList, toSetMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableBooleanCollection
add, addAll, addAll, booleanIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAllMethods inherited from interface org.eclipse.collections.api.list.primitive.MutableBooleanList
swap, tapMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Constructor Details
-
Method Details
-
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
- 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
- Specified by:
within interfaceMutableBooleanCollection- Specified by:
within interfaceMutableBooleanList- Overrides:
within classAbstractSynchronizedBooleanCollection
-
without
- Specified by:
withoutin interfaceMutableBooleanCollection- Specified by:
withoutin interfaceMutableBooleanList- Overrides:
withoutin classAbstractSynchronizedBooleanCollection
-
withAll
- Specified by:
withAllin interfaceMutableBooleanCollection- Specified by:
withAllin interfaceMutableBooleanList- Overrides:
withAllin classAbstractSynchronizedBooleanCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableBooleanCollection- Specified by:
withoutAllin interfaceMutableBooleanList- Overrides:
withoutAllin classAbstractSynchronizedBooleanCollection
-
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 interfaceBooleanList- Specified by:
selectin interfaceMutableBooleanCollection- Specified by:
selectin interfaceMutableBooleanList- Specified by:
selectin interfaceOrderedBooleanIterable- Specified by:
selectin interfaceReversibleBooleanIterable- Overrides:
selectin classAbstractSynchronizedBooleanCollection
-
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 interfaceBooleanList- Specified by:
rejectin interfaceMutableBooleanCollection- Specified by:
rejectin interfaceMutableBooleanList- Specified by:
rejectin interfaceOrderedBooleanIterable- Specified by:
rejectin interfaceReversibleBooleanIterable- Overrides:
rejectin classAbstractSynchronizedBooleanCollection
-
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 interfaceBooleanList- Specified by:
collectin interfaceMutableBooleanCollection- Specified by:
collectin interfaceMutableBooleanList- Specified by:
collectin interfaceOrderedBooleanIterable- Specified by:
collectin interfaceReversibleBooleanIterable- Overrides:
collectin classAbstractSynchronizedBooleanCollection
-
equals
Description copied from interface:BooleanListFollows the same general contract asList.equals(Object).- Specified by:
equalsin interfaceBooleanList- Overrides:
equalsin classObject
-
hashCode
public int hashCode()Description copied from interface:BooleanListFollows the same general contract asList.hashCode().- Specified by:
hashCodein interfaceBooleanList- Overrides:
hashCodein classObject
-
asLazy
Description copied from interface:BooleanIterableReturns a LazyBooleanIterable adapter wrapping the source BooleanIterable.- Specified by:
asLazyin interfaceBooleanIterable- Overrides:
asLazyin classAbstractSynchronizedBooleanCollection
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableBooleanCollection- Specified by:
asUnmodifiablein interfaceMutableBooleanList- Overrides:
asUnmodifiablein classAbstractSynchronizedBooleanCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableBooleanCollection- Specified by:
asSynchronizedin interfaceMutableBooleanList- Overrides:
asSynchronizedin classAbstractSynchronizedBooleanCollection
-
toImmutable
Description copied from interface:MutableBooleanListReturns an immutable copy of this list.- Specified by:
toImmutablein interfaceBooleanList- Specified by:
toImmutablein interfaceMutableBooleanCollection- Specified by:
toImmutablein interfaceMutableBooleanList- Overrides:
toImmutablein classAbstractSynchronizedBooleanCollection
-
newEmpty
Description copied from interface:MutableBooleanListCreates a new empty mutable version of the same List type.- Specified by:
newEmptyin interfaceMutableBooleanCollection- Specified by:
newEmptyin interfaceMutableBooleanList- Since:
- 9.2.
-
reverseThis
- Specified by:
reverseThisin interfaceMutableBooleanList
-
toReversed
- Specified by:
toReversedin interfaceBooleanList- Specified by:
toReversedin interfaceMutableBooleanList- Specified by:
toReversedin interfaceReversibleBooleanIterable
-
asReversed
- Specified by:
asReversedin interfaceReversibleBooleanIterable
-
forEachWithIndex
- 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
- Specified by:
distinctin interfaceBooleanList- Specified by:
distinctin interfaceMutableBooleanList- Specified by:
distinctin interfaceReversibleBooleanIterable- Since:
- 6.0.
-
subList
- Specified by:
subListin interfaceBooleanList- Specified by:
subListin interfaceMutableBooleanList- See Also:
List.subList(int fromIndex, int toIndex)
-
zipBoolean
Description copied from interface:MutableBooleanListReturns aMutableListformed from thisMutableBooleanListand anotherBooleanListby combining corresponding elements in pairs. If one of the twoBooleanLists is longer than the other, its remaining elements are ignored.- Specified by:
zipBooleanin interfaceBooleanList- Specified by:
zipBooleanin interfaceMutableBooleanList- Since:
- 9.1.
-
zip
Description copied from interface:MutableBooleanListReturns aMutableListformed from thisMutableBooleanListand aListIterableby combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Specified by:
zipin interfaceBooleanList- Specified by:
zipin interfaceMutableBooleanList- Since:
- 9.1.
-
collectWithIndex
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.
-