Class UnmodifiableBooleanList
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableBooleanCollection
-
- org.eclipse.collections.impl.list.mutable.primitive.UnmodifiableBooleanList
-
- All Implemented Interfaces:
java.io.Serializable,BooleanIterable,MutableBooleanCollection,BooleanList,MutableBooleanList,OrderedBooleanIterable,ReversibleBooleanIterable,PrimitiveIterable
public class UnmodifiableBooleanList extends AbstractUnmodifiableBooleanCollection implements MutableBooleanList
This file was automatically generated from template file unmodifiablePrimitiveList.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description UnmodifiableBooleanList(MutableBooleanList list)
-
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)LazyBooleanIterableasReversed()MutableBooleanListasSynchronized()MutableBooleanListasUnmodifiable()MutableList<java.lang.Boolean>boxed()<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 java.util.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(java.lang.Object otherList)Follows the same general contract asList.equals(Object).voidforEachWithIndex(BooleanIntProcedure procedure)booleanget(int index)booleangetFirst()booleangetLast()private MutableBooleanListgetMutableBooleanList()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.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)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified 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()Returns an immutable copy of this list.MutableBooleanListtoReversed()MutableBooleanStacktoStack()Converts the collection to a BooleanStack.UnmodifiableBooleanListwith(boolean element)UnmodifiableBooleanListwithAll(BooleanIterable elements)UnmodifiableBooleanListwithout(boolean element)UnmodifiableBooleanListwithoutAll(BooleanIterable elements)<T> MutableList<BooleanObjectPair<T>>zip(java.lang.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.AbstractUnmodifiableBooleanCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, booleanIterator, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, getBooleanCollection, 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.BooleanIterable
allSatisfy, anySatisfy, asLazy, 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.list.primitive.BooleanList
forEachInBoth
-
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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnmodifiableBooleanList
public UnmodifiableBooleanList(MutableBooleanList list)
-
-
Method Detail
-
getMutableBooleanList
private MutableBooleanList getMutableBooleanList()
-
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
-
boxed
public MutableList<java.lang.Boolean> boxed()
- Specified by:
boxedin interfaceMutableBooleanList
-
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 UnmodifiableBooleanList with(boolean element)
- Specified by:
within interfaceMutableBooleanCollection- Specified by:
within interfaceMutableBooleanList- Overrides:
within classAbstractUnmodifiableBooleanCollection
-
without
public UnmodifiableBooleanList without(boolean element)
- Specified by:
withoutin interfaceMutableBooleanCollection- Specified by:
withoutin interfaceMutableBooleanList- Overrides:
withoutin classAbstractUnmodifiableBooleanCollection
-
withAll
public UnmodifiableBooleanList withAll(BooleanIterable elements)
- Specified by:
withAllin interfaceMutableBooleanCollection- Specified by:
withAllin interfaceMutableBooleanList- Overrides:
withAllin classAbstractUnmodifiableBooleanCollection
-
withoutAll
public UnmodifiableBooleanList withoutAll(BooleanIterable elements)
- Specified by:
withoutAllin interfaceMutableBooleanCollection- Specified by:
withoutAllin interfaceMutableBooleanList- Overrides:
withoutAllin classAbstractUnmodifiableBooleanCollection
-
select
public MutableBooleanList select(BooleanPredicate predicate)
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 classAbstractUnmodifiableBooleanCollection
-
reject
public MutableBooleanList reject(BooleanPredicate predicate)
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 classAbstractUnmodifiableBooleanCollection
-
collect
public <V> MutableList<V> collect(BooleanToObjectFunction<? extends V> function)
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 classAbstractUnmodifiableBooleanCollection
-
equals
public boolean equals(java.lang.Object otherList)
Description copied from interface:BooleanListFollows the same general contract asList.equals(Object).- Specified by:
equalsin interfaceBooleanList- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Description copied from interface:BooleanListFollows the same general contract asList.hashCode().- Specified by:
hashCodein interfaceBooleanList- Overrides:
hashCodein classjava.lang.Object
-
asUnmodifiable
public MutableBooleanList asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableBooleanCollection- Specified by:
asUnmodifiablein interfaceMutableBooleanList- Overrides:
asUnmodifiablein classAbstractUnmodifiableBooleanCollection
-
asSynchronized
public MutableBooleanList asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableBooleanCollection- Specified by:
asSynchronizedin interfaceMutableBooleanList- Overrides:
asSynchronizedin classAbstractUnmodifiableBooleanCollection
-
toImmutable
public ImmutableBooleanList 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 classAbstractUnmodifiableBooleanCollection
-
newEmpty
public MutableBooleanList 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
public MutableBooleanList reverseThis()
- Specified by:
reverseThisin interfaceMutableBooleanList
-
toReversed
public MutableBooleanList toReversed()
- Specified by:
toReversedin interfaceBooleanList- Specified by:
toReversedin interfaceMutableBooleanList- Specified by:
toReversedin interfaceReversibleBooleanIterable
-
forEachWithIndex
public void forEachWithIndex(BooleanIntProcedure procedure)
- Specified by:
forEachWithIndexin interfaceOrderedBooleanIterable
-
asReversed
public LazyBooleanIterable asReversed()
- Specified by:
asReversedin interfaceReversibleBooleanIterable
-
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- See Also:
List.subList(int fromIndex, int toIndex)
-
zipBoolean
public MutableList<BooleanBooleanPair> zipBoolean(BooleanIterable iterable)
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
public <T> MutableList<BooleanObjectPair<T>> zip(java.lang.Iterable<T> iterable)
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.
-
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 java.util.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.
-
toStack
public MutableBooleanStack toStack()
Description copied from interface:OrderedBooleanIterableConverts the collection to a BooleanStack.- Specified by:
toStackin interfaceOrderedBooleanIterable
-
-