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 boolean
addAllAtIndex(int index, boolean... source)
boolean
addAllAtIndex(int index, BooleanIterable source)
void
addAtIndex(int index, boolean element)
LazyBooleanIterable
asLazy()
Returns a LazyBooleanIterable adapter wrapping the source BooleanIterable.LazyBooleanIterable
asReversed()
MutableBooleanList
asSynchronized()
MutableBooleanList
asUnmodifiable()
<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.MutableBooleanList
distinct()
boolean
equals(Object otherList)
Follows the same general contract asList.equals(Object)
.void
forEachWithIndex(BooleanIntProcedure procedure)
boolean
get(int index)
boolean
getFirst()
boolean
getLast()
int
hashCode()
Follows the same general contract asList.hashCode()
.int
indexOf(boolean value)
<T> T
injectIntoWithIndex(T injectedValue, ObjectBooleanIntToObjectFunction<? super T,? extends T> function)
int
lastIndexOf(boolean value)
MutableBooleanList
newEmpty()
Creates a new empty mutable version of the same List type.MutableBooleanList
reject(BooleanPredicate predicate)
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.boolean
removeAtIndex(int index)
MutableBooleanList
reverseThis()
MutableBooleanList
select(BooleanPredicate predicate)
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.boolean
set(int index, boolean element)
MutableBooleanList
subList(int fromIndex, int toIndex)
ImmutableBooleanList
toImmutable()
Returns an immutable copy of this list.MutableBooleanList
toReversed()
SynchronizedBooleanList
with(boolean element)
SynchronizedBooleanList
withAll(BooleanIterable elements)
SynchronizedBooleanList
without(boolean element)
SynchronizedBooleanList
withoutAll(BooleanIterable elements)
<T> MutableList<BooleanObjectPair<T>>
zip(Iterable<T> iterable)
Returns aMutableList
formed from thisMutableBooleanList
and aListIterable
by combining corresponding elements in pairs.MutableList<BooleanBooleanPair>
zipBoolean(BooleanIterable iterable)
Returns aMutableList
formed from thisMutableBooleanList
and anotherBooleanList
by 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, 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, count, detectIfNone, each, flatCollect, forEach, injectInto, 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 Details
-
Method Details
-
get
public boolean get(int index)- Specified by:
get
in interfaceBooleanList
-
getFirst
public boolean getFirst()- Specified by:
getFirst
in interfaceOrderedBooleanIterable
-
getLast
public boolean getLast()- Specified by:
getLast
in interfaceReversibleBooleanIterable
-
indexOf
public int indexOf(boolean value)- Specified by:
indexOf
in interfaceOrderedBooleanIterable
-
lastIndexOf
public int lastIndexOf(boolean value)- Specified by:
lastIndexOf
in interfaceBooleanList
-
addAtIndex
public void addAtIndex(int index, boolean element)- Specified by:
addAtIndex
in interfaceMutableBooleanList
-
addAllAtIndex
public boolean addAllAtIndex(int index, boolean... source)- Specified by:
addAllAtIndex
in interfaceMutableBooleanList
-
addAllAtIndex
- Specified by:
addAllAtIndex
in interfaceMutableBooleanList
-
removeAtIndex
public boolean removeAtIndex(int index)- Specified by:
removeAtIndex
in interfaceMutableBooleanList
-
set
public boolean set(int index, boolean element)- Specified by:
set
in interfaceMutableBooleanList
-
with
- Specified by:
with
in interfaceMutableBooleanCollection
- Specified by:
with
in interfaceMutableBooleanList
- Overrides:
with
in classAbstractSynchronizedBooleanCollection
-
without
- Specified by:
without
in interfaceMutableBooleanCollection
- Specified by:
without
in interfaceMutableBooleanList
- Overrides:
without
in classAbstractSynchronizedBooleanCollection
-
withAll
- Specified by:
withAll
in interfaceMutableBooleanCollection
- Specified by:
withAll
in interfaceMutableBooleanList
- Overrides:
withAll
in classAbstractSynchronizedBooleanCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableBooleanCollection
- Specified by:
withoutAll
in interfaceMutableBooleanList
- Overrides:
withoutAll
in classAbstractSynchronizedBooleanCollection
-
select
Description copied from interface:BooleanIterable
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.- Specified by:
select
in interfaceBooleanIterable
- Specified by:
select
in interfaceBooleanList
- Specified by:
select
in interfaceMutableBooleanCollection
- Specified by:
select
in interfaceMutableBooleanList
- Specified by:
select
in interfaceOrderedBooleanIterable
- Specified by:
select
in interfaceReversibleBooleanIterable
- Overrides:
select
in classAbstractSynchronizedBooleanCollection
-
reject
Description copied from interface:BooleanIterable
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.- Specified by:
reject
in interfaceBooleanIterable
- Specified by:
reject
in interfaceBooleanList
- Specified by:
reject
in interfaceMutableBooleanCollection
- Specified by:
reject
in interfaceMutableBooleanList
- Specified by:
reject
in interfaceOrderedBooleanIterable
- Specified by:
reject
in interfaceReversibleBooleanIterable
- Overrides:
reject
in classAbstractSynchronizedBooleanCollection
-
collect
Description copied from interface:BooleanIterable
Returns 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:
collect
in interfaceBooleanIterable
- Specified by:
collect
in interfaceBooleanList
- Specified by:
collect
in interfaceMutableBooleanCollection
- Specified by:
collect
in interfaceMutableBooleanList
- Specified by:
collect
in interfaceOrderedBooleanIterable
- Specified by:
collect
in interfaceReversibleBooleanIterable
- Overrides:
collect
in classAbstractSynchronizedBooleanCollection
-
equals
Description copied from interface:BooleanList
Follows the same general contract asList.equals(Object)
.- Specified by:
equals
in interfaceBooleanList
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()Description copied from interface:BooleanList
Follows the same general contract asList.hashCode()
.- Specified by:
hashCode
in interfaceBooleanList
- Overrides:
hashCode
in classObject
-
asLazy
Description copied from interface:BooleanIterable
Returns a LazyBooleanIterable adapter wrapping the source BooleanIterable.- Specified by:
asLazy
in interfaceBooleanIterable
- Overrides:
asLazy
in classAbstractSynchronizedBooleanCollection
-
asUnmodifiable
- Specified by:
asUnmodifiable
in interfaceMutableBooleanCollection
- Specified by:
asUnmodifiable
in interfaceMutableBooleanList
- Overrides:
asUnmodifiable
in classAbstractSynchronizedBooleanCollection
-
asSynchronized
- Specified by:
asSynchronized
in interfaceMutableBooleanCollection
- Specified by:
asSynchronized
in interfaceMutableBooleanList
- Overrides:
asSynchronized
in classAbstractSynchronizedBooleanCollection
-
toImmutable
Description copied from interface:MutableBooleanList
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceBooleanList
- Specified by:
toImmutable
in interfaceMutableBooleanCollection
- Specified by:
toImmutable
in interfaceMutableBooleanList
- Overrides:
toImmutable
in classAbstractSynchronizedBooleanCollection
-
newEmpty
Description copied from interface:MutableBooleanList
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableBooleanCollection
- Specified by:
newEmpty
in interfaceMutableBooleanList
- Since:
- 9.2.
-
reverseThis
- Specified by:
reverseThis
in interfaceMutableBooleanList
-
toReversed
- Specified by:
toReversed
in interfaceBooleanList
- Specified by:
toReversed
in interfaceMutableBooleanList
- Specified by:
toReversed
in interfaceReversibleBooleanIterable
-
asReversed
- Specified by:
asReversed
in interfaceReversibleBooleanIterable
-
forEachWithIndex
- Specified by:
forEachWithIndex
in interfaceOrderedBooleanIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectBooleanIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndex
in interfaceOrderedBooleanIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleBooleanIterable
-
distinct
- Specified by:
distinct
in interfaceBooleanList
- Specified by:
distinct
in interfaceMutableBooleanList
- Specified by:
distinct
in interfaceReversibleBooleanIterable
- Since:
- 6.0.
-
subList
- Specified by:
subList
in interfaceBooleanList
- Specified by:
subList
in interfaceMutableBooleanList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipBoolean
Description copied from interface:MutableBooleanList
Returns aMutableList
formed from thisMutableBooleanList
and anotherBooleanList
by combining corresponding elements in pairs. If one of the twoBooleanList
s is longer than the other, its remaining elements are ignored.- Specified by:
zipBoolean
in interfaceBooleanList
- Specified by:
zipBoolean
in interfaceMutableBooleanList
- Since:
- 9.1.
-
zip
Description copied from interface:MutableBooleanList
Returns aMutableList
formed from thisMutableBooleanList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Specified by:
zip
in interfaceBooleanList
- Specified by:
zip
in 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:
collectWithIndex
in interfaceBooleanList
- Specified by:
collectWithIndex
in interfaceMutableBooleanList
- Specified by:
collectWithIndex
in interfaceOrderedBooleanIterable
- Specified by:
collectWithIndex
in 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:
collectWithIndex
in interfaceOrderedBooleanIterable
- Since:
- 9.1.
-