public class ImmutableBooleanList extends AbstractBooleanList
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ImmutableBooleanList(boolean... a)
Creates a new Immutable copy of the contents of the Array.
|
ImmutableBooleanList(boolean[] a,
int length)
Creates a new ImmutableList copy of the array with a custom length
|
ImmutableBooleanList(boolean[] a,
int offset,
int length)
Creates a new ImmutableList copy of the array with in the custom range.
|
ImmutableBooleanList(BooleanCollection c)
Creates a new Immutable copy of the contents of the Collection.
|
ImmutableBooleanList(BooleanList l)
Creates a new Immutable copy of the contents of the List.
|
ImmutableBooleanList(java.util.Collection<? extends java.lang.Boolean> c)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(boolean e)
A Type-Specific implementation of add function that delegates to
List.add(int, Object) |
void |
add(int index,
boolean e)
A Type-Specific add Function to reduce (un)boxing
|
boolean |
addAll(boolean[] e,
int offset,
int length)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
boolean |
addAll(int index,
BooleanCollection c)
A Type-Specific addAll Function to reduce (un)boxing
|
boolean |
addAll(int index,
BooleanList c)
A Type-Specific and optimized addAll function that allows a faster transfer of elements
|
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.Boolean> c)
Deprecated.
|
void |
addElements(int from,
boolean[] a,
int offset,
int length)
A function to fast add elements to the list
|
void |
clear() |
boolean |
contains(boolean e)
A Type Specific implementation of the Collection#contains function.
|
boolean |
contains(java.lang.Object o)
Deprecated.
|
ImmutableBooleanList |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(BooleanPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
boolean[] |
extractElements(int from,
int to)
A function to fast extract elements out of the list, this removes the elements that were fetched.
|
boolean |
findFirst(BooleanPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(BooleanConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
<E> void |
forEach(E input,
ObjectBooleanConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
boolean |
getBoolean(int index)
A Type-Specific get function to reduce (un)boxing
|
boolean[] |
getElements(int from,
boolean[] a,
int offset,
int length)
A function to fast fetch elements from the list
|
int |
indexOf(boolean e)
A Type-Specific function to find the index of a given element
|
int |
indexOf(java.lang.Object o)
Deprecated.
|
int |
lastIndexOf(boolean e)
A Type-Specific function to find the last index of a given element
|
int |
lastIndexOf(java.lang.Object o)
Deprecated.
|
BooleanListIterator |
listIterator(int index)
A Type-Specific Iterator of listIterator
|
boolean |
matchesAll(BooleanPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(BooleanPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(BooleanPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
boolean |
reduce(boolean identity,
BooleanBooleanUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
reduce(BooleanBooleanUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remBoolean(boolean type)
A Type-Specific implementation of remove.
|
boolean |
removeAll(BooleanCollection c)
A Type-Specific implementation of removeAll.
|
boolean |
removeAll(BooleanCollection c,
BooleanConsumer r)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
removeBoolean(int index)
A Type-Specific remove function to reduce (un)boxing
|
void |
removeElements(int from,
int to)
a function to fast remove elements from the list.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Boolean> filter)
Deprecated.
|
void |
replaceAll(java.util.function.UnaryOperator<java.lang.Boolean> o)
Deprecated.
|
boolean |
retainAll(BooleanCollection c)
A Type-Specific implementation of retainAll.
|
boolean |
retainAll(BooleanCollection c,
BooleanConsumer r)
A Type-Specific retainAll function that reduces (un)boxing.
|
boolean |
retainAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
set(int index,
boolean e)
A Type-Specific set function to reduce (un)boxing
|
int |
size()
A function to return the size of the list
|
void |
size(int size)
A function to ensure the elements are within the requested size.
|
void |
sort(BooleanComparator c)
Sorts the elements specified by the Natural order either by using the Comparator or the elements
|
BooleanSplititerator |
spliterator()
A Type Specific Type Splititerator to reduce boxing/unboxing
|
boolean |
swapRemove(int index)
A Highly Optimized remove function that removes the desired element.
|
java.lang.Object[] |
toArray()
Deprecated.
|
<E> E[] |
toArray(E[] a)
Deprecated.
|
boolean[] |
toBooleanArray(boolean[] a)
A Type-Specific implementation of toArray.
|
void |
unstableSort(BooleanComparator c)
Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort
|
add, addAll, addAll, addAll, equals, hashCode, iterator, listIterator, subList, swapRemoveBooleanadd, containsAll, containsAll, containsAny, containsAny, remove, toBooleanArrayadd, addElements, addElements, addIfAbsent, addIfPresent, forEachIndexed, get, getElements, remove, remove, set, sort, synchronize, synchronize, unmodifiable, unstableSortaddAll, addAll, containsAll, containsAny, containsAny, pour, toBooleanArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, repeat, sortedof@Deprecated public ImmutableBooleanList(java.util.Collection<? extends java.lang.Boolean> c)
c - the elements that should be added into the listpublic ImmutableBooleanList(BooleanCollection c)
c - the elements that should be added into the listpublic ImmutableBooleanList(BooleanList l)
l - the elements that should be added into the listpublic ImmutableBooleanList(boolean... a)
a - the array that should be copiedpublic ImmutableBooleanList(boolean[] a,
int length)
a - the array that should be copiedlength - the desired length that should be copiedpublic ImmutableBooleanList(boolean[] a,
int offset,
int length)
a - the array that should be copiedoffset - the starting offset of where the array should be copied fromlength - the desired length that should be copiedjava.lang.IllegalStateException - if offset is smaller then 0java.lang.IllegalStateException - if the offset + length exceeds the array lengthpublic boolean add(boolean e)
AbstractBooleanListList.add(int, Object)add in interface BooleanCollectionadd in interface BooleanListadd in class AbstractBooleanListe - the element to addList.add(Object)public void add(int index,
boolean e)
BooleanListindex - index at which the specified element is to be insertede - the element to addList.add(int, Object)@Deprecated
public boolean addAll(int index,
java.util.Collection<? extends java.lang.Boolean> c)
public boolean addAll(int index,
BooleanCollection c)
BooleanListindex - index at which the specified elements is to be insertedc - the elements that need to be addedList.addAll(int, java.util.Collection)public boolean addAll(int index,
BooleanList c)
BooleanListindex - index at which the specified elements is to be insertedc - the elements that need to be addedpublic boolean addAll(boolean[] e,
int offset,
int length)
BooleanCollectione - the elements that should be addedoffset - where to start within the arraylength - how many elements of the array should be addedpublic void addElements(int from,
boolean[] a,
int offset,
int length)
BooleanListfrom - the index where the elements should be added into the lista - the elements that should be addedoffset - the start index of the array should be read fromlength - how many elements should be read frompublic boolean[] getElements(int from,
boolean[] a,
int offset,
int length)
BooleanListfrom - index where the list should be fetching elements froma - the array where the values should be inserted tooffset - the startIndex of where the array should be written tolength - the number of elements the values should be fetched frompublic void removeElements(int from,
int to)
BooleanListfrom - the start index of where the elements should be removed from (inclusive)to - the end index of where the elements should be removed to (exclusive)public boolean[] extractElements(int from,
int to)
BooleanListfrom - the start index of where the elements should be fetched from (inclusive)to - the end index of where the elements should be fetched to (exclusive)@Deprecated public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Boolean>contains in interface java.util.List<java.lang.Boolean>contains in interface BooleanCollectioncontains in interface BooleanListcontains in class AbstractBooleanCollectiono - the element that is searched for@Deprecated public int indexOf(java.lang.Object o)
indexOf in interface java.util.List<java.lang.Boolean>indexOf in interface BooleanListindexOf in class AbstractBooleanListo - the element that is searched for@Deprecated public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<java.lang.Boolean>lastIndexOf in interface BooleanListlastIndexOf in class AbstractBooleanListo - the element that is searched forpublic boolean contains(boolean e)
contains in interface BooleanCollectioncontains in class AbstractBooleanCollectione - the element that is searched for.public int indexOf(boolean e)
indexOf in interface BooleanListindexOf in class AbstractBooleanListe - the element that is searched forpublic int lastIndexOf(boolean e)
lastIndexOf in interface BooleanListlastIndexOf in class AbstractBooleanListe - the element that is searched forpublic void sort(BooleanComparator c)
BooleanListc - the sorter of the elements, can be nullList.sort(Comparator),
BooleanArrays.stableSort(boolean[], BooleanComparator)public void unstableSort(BooleanComparator c)
BooleanListc - the sorter of the elements, can be nullList.sort(Comparator),
BooleanArrays.unstableSort(boolean[], BooleanComparator)public boolean getBoolean(int index)
index - the index of the element to fetchjava.lang.IndexOutOfBoundsException - if the index is out of rangeList.get(int)public ImmutableBooleanList copy()
BooleanCollectioncopy in interface BooleanCollectioncopy in interface BooleanListcopy in class AbstractBooleanListpublic void forEach(BooleanConsumer action)
action - The action to be performed for each elementjava.lang.NullPointerException - if the specified action is nullIterable.forEach(java.util.function.Consumer)The default implementation behaves as if:
for(int i = 0;i<size;i++)
action.accept(data[i]);
public <E> void forEach(E input,
ObjectBooleanConsumer<E> action)
BooleanIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(BooleanPredicate filter)
BooleanIterablefilter - that should be appliedpublic boolean matchesNone(BooleanPredicate filter)
BooleanIterablefilter - that should be appliedpublic boolean matchesAll(BooleanPredicate filter)
BooleanIterablefilter - that should be appliedpublic boolean findFirst(BooleanPredicate filter)
BooleanIterablefilter - that should be appliedpublic boolean reduce(boolean identity,
BooleanBooleanUnaryOperator operator)
BooleanIterableidentity - the start valueoperator - the operation that should be appliedpublic boolean reduce(BooleanBooleanUnaryOperator operator)
BooleanIterableoperator - the operation that should be appliedpublic int count(BooleanPredicate filter)
BooleanIterablefilter - that should be appliedpublic BooleanListIterator listIterator(int index)
BooleanListlistIterator in interface java.util.List<java.lang.Boolean>listIterator in interface BooleanListlistIterator in class AbstractBooleanListList.listIterator(int)public boolean set(int index,
boolean e)
BooleanListindex - index of the element to replacee - element to be stored at the specified positionList.set(int, Object)@Deprecated public void replaceAll(java.util.function.UnaryOperator<java.lang.Boolean> o)
public boolean removeBoolean(int index)
BooleanListindex - the index of the element to be removedList.remove(int)public boolean swapRemove(int index)
BooleanListindex - the index of the element to be removedpublic boolean remBoolean(boolean type)
AbstractBooleanCollectionremBoolean in interface BooleanCollectionremBoolean in class AbstractBooleanCollectiontype - the element that is searched forCollection.remove(Object)@Deprecated public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Boolean>removeAll in interface java.util.List<java.lang.Boolean>removeAll in class java.util.AbstractCollection<java.lang.Boolean>@Deprecated public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Boolean>retainAll in interface java.util.List<java.lang.Boolean>retainAll in class java.util.AbstractCollection<java.lang.Boolean>@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Boolean> filter)
public boolean removeAll(BooleanCollection c)
AbstractBooleanCollectionremoveAll in interface BooleanCollectionremoveAll in class AbstractBooleanCollectionc - the elements that should be deletedCollection.removeAll(Collection)public boolean retainAll(BooleanCollection c)
AbstractBooleanCollectionretainAll in interface BooleanCollectionretainAll in class AbstractBooleanCollectionc - the elements that should be keptCollection.retainAll(Collection)public boolean removeAll(BooleanCollection c, BooleanConsumer r)
BooleanCollectionremoveAll in interface BooleanCollectionremoveAll in class AbstractBooleanCollectionc - the collection of elements that should be removedr - elements that got removedCollection.removeAll(Collection)public boolean retainAll(BooleanCollection c, BooleanConsumer r)
BooleanCollectionretainAll in interface BooleanCollectionretainAll in class AbstractBooleanCollectionc - the collection of elements that should be keptr - elements that got removedCollection.retainAll(Collection)@Deprecated public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Boolean>toArray in interface java.util.List<java.lang.Boolean>toArray in class java.util.AbstractCollection<java.lang.Boolean>@Deprecated public <E> E[] toArray(E[] a)
toArray in interface java.util.Collection<java.lang.Boolean>toArray in interface java.util.List<java.lang.Boolean>toArray in class java.util.AbstractCollection<java.lang.Boolean>a - original array. If null a Object array with the right size is created. If to small the Array of the same type is created with the right sizepublic boolean[] toBooleanArray(boolean[] a)
AbstractBooleanCollectiontoBooleanArray in interface BooleanCollectiontoBooleanArray in class AbstractBooleanCollectiona - array that the elements should be injected to. If null or to small a new array with the right size is createdCollection.toArray(Object[])public int size()
size in interface java.util.Collection<java.lang.Boolean>size in interface java.util.List<java.lang.Boolean>size in interface ISizeProvidersize in class java.util.AbstractCollection<java.lang.Boolean>public void size(int size)
BooleanListsize in interface BooleanListsize in class AbstractBooleanListsize - the requested amount of elements/room for elementspublic void clear()
clear in interface java.util.Collection<java.lang.Boolean>clear in interface java.util.List<java.lang.Boolean>clear in class java.util.AbstractCollection<java.lang.Boolean>public BooleanSplititerator spliterator()