Modul speiger.src.collections
Klasse BooleanArrayList
java.lang.Object
java.util.AbstractCollection<Boolean>
speiger.src.collections.booleans.collections.AbstractBooleanCollection
speiger.src.collections.booleans.lists.AbstractBooleanList
speiger.src.collections.booleans.lists.BooleanArrayList
- Alle implementierten Schnittstellen:
Iterable<Boolean>,Collection<Boolean>,List<Boolean>,RandomAccess,BooleanCollection,BooleanIterable,BooleanStack,BooleanList,IBooleanArray,IArray,ISizeProvider,ITrimmable
A Type-Specific Array-based implementation of list that is written to reduce (un)boxing
This implementation is optimized to improve how data is processed with interfaces like IBooleanArray, BooleanStack
and with optimized functions that use type-specific implementations for primitives and optimized logic for bulkactions.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new ArrayList with a Empty array.BooleanArrayList(boolean... a) Creates a new ArrayList with a Copy of the arrayBooleanArrayList(boolean[] a, int length) Creates a new ArrayList with a Copy of the array with a custom lengthBooleanArrayList(boolean[] a, int offset, int length) Creates a new ArrayList with a Copy of the array with in the custom range.BooleanArrayList(int size) Creates a new ArrayList with the specific requested sizeBooleanArrayList(Collection<? extends Boolean> c) Veraltet.Creates a new ArrayList a copy with the contents of the Collection.Creates a new ArrayList a copy with the contents of the List. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanadd(boolean e) Appends the specified element to the end of this list.voidadd(int index, boolean e) Appends the specified element to the index of the listbooleanaddAll(boolean[] e, int offset, int length) A Type-Specific Array based addAll method to reduce the amount of WrappingbooleanaddAll(int index, Collection<? extends Boolean> c) Veraltet.booleanaddAll(int index, BooleanCollection c) Appends the specified elements to the index of the list.booleanaddAll(int index, BooleanList c) Appends the specified elements to the index of the list.voidaddElements(int from, boolean[] a, int offset, int length) Appends the specified array elements to the index of the list.voidclear()A function to clear all elements in the list.voidclearAndTrim(int size) Trims the collection down to the requested size and clears all elements while doing sobooleancontains(boolean e) A Type Specific implementation of the Collection#contains function.booleanVeraltet.copy()A Function that does a shallow clone of the Collection itself.intcount(BooleanPredicate filter) Helper function to reduce stream usage that allows to count the valid elements.boolean[]elements()Provides the Underlying Array in the ImplementationvoidensureCapacity(int size) Increases the capacity of this implementation instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.boolean[]extractElements(int from, int to) A function to fast extract elements out of the list, this removes the elements that were fetched.booleanfindFirst(BooleanPredicate filter) Helper function to reduce stream usage that allows to filter for the first match.<E> voidforEach(E input, ObjectBooleanConsumer<E> action) Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.voidforEach(BooleanConsumer action) A Type Specific foreach function that reduces (un)boxingbooleangetBoolean(int index) A Type-Specific get function to reduce (un)boxingboolean[]getElements(int from, boolean[] a, int offset, int length) A function to fast fetch elements from the listintindexOf(boolean e) A Type-Specific function to find the index of a given elementintVeraltet.intlastIndexOf(boolean e) A Type-Specific function to find the last index of a given elementintVeraltet.booleanmatchesAll(BooleanPredicate filter) Helper function to reduce stream usage that allows to filter for all matches.booleanmatchesAny(BooleanPredicate filter) Helper function to reduce stream usage that allows to filter for any matches.booleanmatchesNone(BooleanPredicate filter) Helper function to reduce stream usage that allows to filter for no matches.booleanpeek(int index) Provides the Selected Object from the stack.booleanpop()A Type-Specific pop function to reduce (un)boxingvoidpush(boolean e) Appends the specified element to the end of this Stack.booleanreduce(boolean identity, BooleanBooleanUnaryOperator operator) Performs a reduction on the elements of this Iterablebooleanreduce(BooleanBooleanUnaryOperator operator) Performs a reduction on the elements of this IterablebooleanremBoolean(boolean type) A Type-Specific implementation of remove.booleanremoveAll(Collection<?> c) Veraltet.booleanA function to remove all elements that were provided in the other collectionbooleanA Type-Specific removeAll function that reduces (un)boxing.booleanremoveBoolean(int index) A Type-Specific remove function to reduce (un)boxingvoidremoveElements(int from, int to) a function to fast remove elements from the list.booleanVeraltet.voidVeraltet.booleanretainAll(Collection<?> c) Veraltet.booleanA function to retain all elements that were provided in the other collection This function might delegate to a more appropriate function if necessarybooleanA Type-Specific retainAll function that reduces (un)boxing.booleanset(int index, boolean e) A Type-Specific set function to reduce (un)boxingintsize()A function to return the size of the listvoidsize(int size) A function to ensure the elements are within the requested size.voidSorts the elements specified by the Natural order either by using the Comparator or the elementsA Type Specific Type Splititerator to reduce boxing/unboxingbooleanswapRemove(int index) A Highly Optimized remove function that removes the desired element.Object[]toArray()Veraltet.<E> E[]toArray(E[] a) Veraltet.boolean[]toBooleanArray(boolean[] a) A Type-Specific implementation of toArray.booleantrim(int size) Trims the original collection down to the size of the current elements or the requested size depending which is biggervoidSorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sortstatic BooleanArrayListwrap(boolean... a) Creates a wrapped arraylist that uses the array as backing arraystatic BooleanArrayListwrap(boolean[] a, int length) Creates a wrapped arraylist that uses the array as backing array and a custom fill sizeVon Klasse geerbte Methoden speiger.src.collections.booleans.lists.AbstractBooleanList
add, addAll, addAll, addAll, equals, hashCode, indexedIterator, indexedIterator, iterator, listIterator, listIterator, reversed, subList, swapRemoveBooleanVon Klasse geerbte Methoden speiger.src.collections.booleans.collections.AbstractBooleanCollection
add, containsAll, containsAll, containsAny, containsAny, remove, toBooleanArrayVon Klasse geerbte Methoden java.util.AbstractCollection
isEmpty, toStringVon Schnittstelle geerbte Methoden speiger.src.collections.booleans.collections.BooleanCollection
addAll, addAll, containsAll, containsAny, containsAny, pour, toBooleanArrayVon Schnittstelle geerbte Methoden speiger.src.collections.booleans.collections.BooleanIterable
arrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, repeat, sortedVon Schnittstelle geerbte Methoden speiger.src.collections.booleans.lists.BooleanList
add, addElements, addElements, addIfAbsent, addIfPresent, forEachIndexed, get, getElements, getFirstBoolean, getLastBoolean, remove, remove, removeFirstBoolean, removeLastBoolean, set, sort, synchronize, synchronize, unmodifiable, unstableSortVon Schnittstelle geerbte Methoden speiger.src.collections.booleans.collections.BooleanStack
isEmpty, pushTop, toBooleanArray, topVon Schnittstelle geerbte Methoden java.util.Collection
parallelStream, stream, toArrayVon Schnittstelle geerbte Methoden speiger.src.collections.booleans.utils.IBooleanArray
elementsVon Schnittstelle geerbte Methoden speiger.src.collections.utils.ITrimmable
clearAndTrim, trimVon Schnittstelle geerbte Methoden java.util.List
containsAll, isEmpty
-
Konstruktordetails
-
BooleanArrayList
public BooleanArrayList()Creates a new ArrayList with a Empty array. -
BooleanArrayList
public BooleanArrayList(int size) Creates a new ArrayList with the specific requested size- Parameter:
size- the minimum initial size of the Backing array
-
BooleanArrayList
Veraltet.Creates a new ArrayList a copy with the contents of the Collection.- Parameter:
c- the elements that should be added into the list
-
BooleanArrayList
Creates a new ArrayList a copy with the contents of the Collection.- Parameter:
c- the elements that should be added into the list
-
BooleanArrayList
Creates a new ArrayList a copy with the contents of the List.- Parameter:
l- the elements that should be added into the list
-
BooleanArrayList
public BooleanArrayList(boolean... a) Creates a new ArrayList with a Copy of the array- Parameter:
a- the array that should be copied
-
BooleanArrayList
public BooleanArrayList(boolean[] a, int length) Creates a new ArrayList with a Copy of the array with a custom length- Parameter:
a- the array that should be copiedlength- the desired length that should be copied
-
BooleanArrayList
public BooleanArrayList(boolean[] a, int offset, int length) Creates a new ArrayList with a Copy of the array with in the custom range.- Parameter:
a- the array that should be copiedoffset- the starting offset of where the array should be copied fromlength- the desired length that should be copied- Löst aus:
IllegalStateException- if offset is smaller then 0IllegalStateException- if the offset + length exceeds the array length
-
-
Methodendetails
-
wrap
Creates a wrapped arraylist that uses the array as backing array- Parameter:
a- elements that should be wrapped- Gibt zurück:
- a Wrapped list using the input array
-
wrap
Creates a wrapped arraylist that uses the array as backing array and a custom fill size- Parameter:
a- elements that should be wrappedlength- the size of the elements within the array- Gibt zurück:
- a Wrapped list using the input array
-
add
public boolean add(boolean e) Appends the specified element to the end of this list.- Angegeben von:
addin SchnittstelleBooleanCollection- Angegeben von:
addin SchnittstelleBooleanList- Setzt außer Kraft:
addin KlasseAbstractBooleanList- Parameter:
e- element to be appended to this list- Gibt zurück:
- true (as specified by
Collection.add(E)) - Siehe auch:
-
push
public void push(boolean e) Appends the specified element to the end of this Stack.- Angegeben von:
pushin SchnittstelleBooleanStack- Parameter:
e- element to be appended to this Stack- Siehe auch:
-
add
public void add(int index, boolean e) Appends the specified element to the index of the list- Angegeben von:
addin SchnittstelleBooleanList- Parameter:
index- the index where to append the element toe- the element to append to the list- Löst aus:
IndexOutOfBoundsException- if index is outside of the lists range- Siehe auch:
-
addAll
Veraltet.Appends the specified elements to the index of the list. This function may delegate to more appropriate function if necessary- Angegeben von:
addAllin SchnittstelleList<Boolean>- Parameter:
index- the index where to append the elements toc- the elements to append to the list- Löst aus:
IndexOutOfBoundsException- if index is outside of the lists rangeNullPointerException- if collection contains a null element
-
addAll
Appends the specified elements to the index of the list. This function may delegate to more appropriate function if necessary- Angegeben von:
addAllin SchnittstelleBooleanList- Parameter:
index- the index where to append the elements toc- the elements to append to the list- Gibt zurück:
- true if the list was modified
- Löst aus:
IndexOutOfBoundsException- if index is outside of the lists range- Siehe auch:
-
addAll
Appends the specified elements to the index of the list.- Angegeben von:
addAllin SchnittstelleBooleanList- Parameter:
index- the index where to append the elements toc- the elements to append to the list- Gibt zurück:
- true if the list was modified
- Löst aus:
IndexOutOfBoundsException- if index is outside of the lists range
-
addAll
public boolean addAll(boolean[] e, int offset, int length) Beschreibung aus Schnittstelle kopiert:BooleanCollectionA Type-Specific Array based addAll method to reduce the amount of Wrapping- Angegeben von:
addAllin SchnittstelleBooleanCollection- Parameter:
e- the elements that should be addedoffset- where to start within the arraylength- how many elements of the array should be added- Gibt zurück:
- if the collection was modified
-
addElements
public void addElements(int from, boolean[] a, int offset, int length) Appends the specified array elements to the index of the list.- Angegeben von:
addElementsin SchnittstelleBooleanList- Parameter:
from- the index where to append the elements toa- the elements to append to the listoffset- where to start ino the arraylength- the amount of elements to insert- Löst aus:
IndexOutOfBoundsException- if index is outside of the lists range
-
getElements
public boolean[] getElements(int from, boolean[] a, int offset, int length) A function to fast fetch elements from the list- Angegeben von:
getElementsin SchnittstelleBooleanList- Parameter:
from- 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 from- Gibt zurück:
- the inputArray
- Löst aus:
NullPointerException- if the array is nullIndexOutOfBoundsException- if from is outside of the lists rangeIllegalStateException- if offset or length are smaller then 0 or exceed the array length
-
removeElements
public void removeElements(int from, int to) a function to fast remove elements from the list.- Angegeben von:
removeElementsin SchnittstelleBooleanList- Parameter:
from- 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)
-
extractElements
public boolean[] extractElements(int from, int to) A function to fast extract elements out of the list, this removes the elements that were fetched.- Angegeben von:
extractElementsin SchnittstelleBooleanList- Parameter:
from- 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)- Gibt zurück:
- a array of the elements that were fetched
-
contains
Veraltet.A function to find if the Element is present in this list.- Angegeben von:
containsin SchnittstelleBooleanCollection- Angegeben von:
containsin SchnittstelleBooleanList- Angegeben von:
containsin SchnittstelleCollection<Boolean>- Angegeben von:
containsin SchnittstelleList<Boolean>- Setzt außer Kraft:
containsin KlasseAbstractBooleanCollection- Parameter:
o- the element that is searched for- Gibt zurück:
- if the element was found.
-
indexOf
Veraltet.A function to find the index of a given element- Angegeben von:
indexOfin SchnittstelleBooleanList- Angegeben von:
indexOfin SchnittstelleList<Boolean>- Setzt außer Kraft:
indexOfin KlasseAbstractBooleanList- Parameter:
o- the element that is searched for- Gibt zurück:
- the index of the element if found. (if not found then -1)
-
lastIndexOf
Veraltet.A function to find the last index of a given element- Angegeben von:
lastIndexOfin SchnittstelleBooleanList- Angegeben von:
lastIndexOfin SchnittstelleList<Boolean>- Setzt außer Kraft:
lastIndexOfin KlasseAbstractBooleanList- Parameter:
o- the element that is searched for- Gibt zurück:
- the last index of the element if found. (if not found then -1)
-
contains
public boolean contains(boolean e) A Type Specific implementation of the Collection#contains function.- Angegeben von:
containsin SchnittstelleBooleanCollection- Setzt außer Kraft:
containsin KlasseAbstractBooleanCollection- Parameter:
e- the element that is searched for.- Gibt zurück:
- if the element was found
-
indexOf
public int indexOf(boolean e) A Type-Specific function to find the index of a given element- Angegeben von:
indexOfin SchnittstelleBooleanList- Setzt außer Kraft:
indexOfin KlasseAbstractBooleanList- Parameter:
e- the element that is searched for- Gibt zurück:
- the index of the element if found. (if not found then -1)
-
lastIndexOf
public int lastIndexOf(boolean e) A Type-Specific function to find the last index of a given element- Angegeben von:
lastIndexOfin SchnittstelleBooleanList- Setzt außer Kraft:
lastIndexOfin KlasseAbstractBooleanList- Parameter:
e- the element that is searched for- Gibt zurück:
- the last index of the element if found. (if not found then -1)
-
sort
Sorts the elements specified by the Natural order either by using the Comparator or the elements- Angegeben von:
sortin SchnittstelleBooleanList- Parameter:
c- the sorter of the elements, can be null- Siehe auch:
-
unstableSort
Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort- Angegeben von:
unstableSortin SchnittstelleBooleanList- Parameter:
c- the sorter of the elements, can be null- Siehe auch:
-
getBoolean
public boolean getBoolean(int index) A Type-Specific get function to reduce (un)boxing- Angegeben von:
getBooleanin SchnittstelleBooleanList- Parameter:
index- the index of the element to fetch- Gibt zurück:
- the value of the requested index
- Löst aus:
IndexOutOfBoundsException- if the index is out of range- Siehe auch:
-
peek
public boolean peek(int index) Provides the Selected Object from the stack. Top to bottom- Angegeben von:
peekin SchnittstelleBooleanStack- Parameter:
index- of the element that should be provided- Gibt zurück:
- the element that was requested
- Löst aus:
ArrayIndexOutOfBoundsException- if the index is out of bounds- Siehe auch:
-
elements
public boolean[] elements()Provides the Underlying Array in the Implementation- Angegeben von:
elementsin SchnittstelleIBooleanArray- Gibt zurück:
- underlying Array
- Löst aus:
ClassCastException- if the return type does not match the underlying array. (Only for Object Implementations)
-
forEach
A Type Specific foreach function that reduces (un)boxing- Angegeben von:
forEachin SchnittstelleBooleanIterable- Parameter:
action- The action to be performed for each element- Löst aus:
NullPointerException- if the specified action is null- Siehe auch:
- ImplSpec:
The default implementation behaves as if:
for(int i = 0;i<size;i++) action.accept(data[i]);
-
forEach
Beschreibung aus Schnittstelle kopiert:BooleanIterableHelper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.- Angegeben von:
forEachin SchnittstelleBooleanIterable- Typparameter:
E- the generic type of the Object- Parameter:
input- the object that should be includedaction- The action to be performed for each element
-
matchesAny
Beschreibung aus Schnittstelle kopiert:BooleanIterableHelper function to reduce stream usage that allows to filter for any matches.- Angegeben von:
matchesAnyin SchnittstelleBooleanIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if any matches were found
-
matchesNone
Beschreibung aus Schnittstelle kopiert:BooleanIterableHelper function to reduce stream usage that allows to filter for no matches.- Angegeben von:
matchesNonein SchnittstelleBooleanIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if no matches were found
-
matchesAll
Beschreibung aus Schnittstelle kopiert:BooleanIterableHelper function to reduce stream usage that allows to filter for all matches.- Angegeben von:
matchesAllin SchnittstelleBooleanIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if all matches.
-
findFirst
Beschreibung aus Schnittstelle kopiert:BooleanIterableHelper function to reduce stream usage that allows to filter for the first match.- Angegeben von:
findFirstin SchnittstelleBooleanIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the found value or the null equivalent variant.
-
reduce
Beschreibung aus Schnittstelle kopiert:BooleanIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleBooleanIterable- Parameter:
identity- the start valueoperator- the operation that should be applied- Gibt zurück:
- the reduction result, returns identity if nothing was found
-
reduce
Beschreibung aus Schnittstelle kopiert:BooleanIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleBooleanIterable- Parameter:
operator- the operation that should be applied- Gibt zurück:
- the reduction result, returns null value if nothing was found
-
count
Beschreibung aus Schnittstelle kopiert:BooleanIterableHelper function to reduce stream usage that allows to count the valid elements.- Angegeben von:
countin SchnittstelleBooleanIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-
set
public boolean set(int index, boolean e) A Type-Specific set function to reduce (un)boxing- Angegeben von:
setin SchnittstelleBooleanList- Parameter:
index- the index of the element to sete- the value that should be set- Gibt zurück:
- the previous element
- Löst aus:
IndexOutOfBoundsException- if the index is out of range- Siehe auch:
-
replaceAll
Veraltet.A function to replace all values in the list- Angegeben von:
replaceAllin SchnittstelleList<Boolean>- Parameter:
o- the action to replace the values- Löst aus:
NullPointerException- if o is null
-
removeBoolean
public boolean removeBoolean(int index) A Type-Specific remove function to reduce (un)boxing- Angegeben von:
removeBooleanin SchnittstelleBooleanList- Parameter:
index- the index of the element to fetch- Gibt zurück:
- the value of the requested index
- Löst aus:
IndexOutOfBoundsException- if the index is out of range- Siehe auch:
-
swapRemove
public boolean swapRemove(int index) Beschreibung aus Schnittstelle kopiert:BooleanListA Highly Optimized remove function that removes the desired element. But instead of shifting the elements to the left it moves the last element to the removed space.- Angegeben von:
swapRemovein SchnittstelleBooleanList- Parameter:
index- the index of the element to be removed- Gibt zurück:
- the element previously at the specified position
-
remBoolean
public boolean remBoolean(boolean type) A Type-Specific implementation of remove. This implementation iterates over the elements until it finds the element that is searched for or it runs out of elements. It stops after finding the first element- Angegeben von:
remBooleanin SchnittstelleBooleanCollection- Setzt außer Kraft:
remBooleanin KlasseAbstractBooleanCollection- Parameter:
type- the element that is searched for- Gibt zurück:
- true if the element was found and removed.
- Siehe auch:
-
pop
public boolean pop()A Type-Specific pop function to reduce (un)boxing- Angegeben von:
popin SchnittstelleBooleanStack- Gibt zurück:
- the value of the requested index
- Löst aus:
IndexOutOfBoundsException- if the index is out of range- Siehe auch:
-
removeAll
Veraltet.A function to remove all elements that were provided in the other collection This function might delegate to a more appropriate function if necessary- Angegeben von:
removeAllin SchnittstelleCollection<Boolean>- Angegeben von:
removeAllin SchnittstelleList<Boolean>- Setzt außer Kraft:
removeAllin KlasseAbstractCollection<Boolean>- Parameter:
c- the elements that should be removed- Gibt zurück:
- true if the collection was modified
- Löst aus:
NullPointerException- if the collection is null
-
retainAll
Veraltet.A function to retain all elements that were provided in the other collection This function might delegate to a more appropriate function if necessary- Angegeben von:
retainAllin SchnittstelleCollection<Boolean>- Angegeben von:
retainAllin SchnittstelleList<Boolean>- Setzt außer Kraft:
retainAllin KlasseAbstractCollection<Boolean>- Parameter:
c- the elements that should be kept. If empty, BooleanArrayList#clear is called.- Gibt zurück:
- true if the collection was modified
- Löst aus:
NullPointerException- if the collection is null
-
removeIf
Veraltet.A optimized List#removeIf(Predicate) that more quickly removes elements from the list then the ArrayList implementation- Angegeben von:
removeIfin SchnittstelleCollection<Boolean>- Parameter:
filter- the filter to remove elements- Gibt zurück:
- true if the list was modified
-
removeAll
A function to remove all elements that were provided in the other collection- Angegeben von:
removeAllin SchnittstelleBooleanCollection- Setzt außer Kraft:
removeAllin KlasseAbstractBooleanCollection- Parameter:
c- the elements that should be removed- Gibt zurück:
- true if the collection was modified
- Löst aus:
NullPointerException- if the collection is null- Siehe auch:
-
removeAll
Beschreibung aus Schnittstelle kopiert:BooleanCollectionA Type-Specific removeAll function that reduces (un)boxing. It also notifies the remover of which exact element is going to be removed.- Angegeben von:
removeAllin SchnittstelleBooleanCollection- Setzt außer Kraft:
removeAllin KlasseAbstractBooleanCollection- Parameter:
c- the collection of elements that should be removedr- elements that got removed- Gibt zurück:
- true if any element was removed
- Siehe auch:
-
retainAll
A function to retain all elements that were provided in the other collection This function might delegate to a more appropriate function if necessary- Angegeben von:
retainAllin SchnittstelleBooleanCollection- Setzt außer Kraft:
retainAllin KlasseAbstractBooleanCollection- Parameter:
c- the elements that should be kept. If empty, BooleanArrayList#clear is called.- Gibt zurück:
- true if the collection was modified
- Löst aus:
NullPointerException- if the collection is null- Siehe auch:
-
retainAll
Beschreibung aus Schnittstelle kopiert:BooleanCollectionA Type-Specific retainAll function that reduces (un)boxing. It also notifies the remover of which exact element is going to be removed.- Angegeben von:
retainAllin SchnittstelleBooleanCollection- Setzt außer Kraft:
retainAllin KlasseAbstractBooleanCollection- Parameter:
c- the collection of elements that should be keptr- elements that got removed- Gibt zurück:
- true if any element was removed
- Siehe auch:
-
toArray
Veraltet.A toArray implementation that ensures the Array itself is a Object.- Angegeben von:
toArrayin SchnittstelleCollection<Boolean>- Angegeben von:
toArrayin SchnittstelleList<Boolean>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Boolean>- Gibt zurück:
- a Array of the elements in the list
-
toArray
Veraltet.A toArray implementation that ensures the Array itself is a Object.- Angegeben von:
toArrayin SchnittstelleCollection<Boolean>- Angegeben von:
toArrayin SchnittstelleList<Boolean>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Boolean>- Parameter:
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 size- Gibt zurück:
- a Array of the elements in the list
-
toBooleanArray
public boolean[] toBooleanArray(boolean[] a) Beschreibung aus Klasse kopiert:AbstractBooleanCollectionA Type-Specific implementation of toArray. This implementation iterates over all elements and unwraps them into primitive type.- Angegeben von:
toBooleanArrayin SchnittstelleBooleanCollection- Angegeben von:
toBooleanArrayin SchnittstelleBooleanStack- Setzt außer Kraft:
toBooleanArrayin KlasseAbstractBooleanCollection- Parameter:
a- array that the elements should be injected to. If null or to small a new array with the right size is created- Gibt zurück:
- an array containing all of the elements in this collection
- Siehe auch:
-
size
public int size()A function to return the size of the list- Angegeben von:
sizein SchnittstelleBooleanStack- Angegeben von:
sizein SchnittstelleCollection<Boolean>- Angegeben von:
sizein SchnittstelleISizeProvider- Angegeben von:
sizein SchnittstelleList<Boolean>- Angegeben von:
sizein KlasseAbstractCollection<Boolean>- Gibt zurück:
- the size of elements in the list
-
size
public void size(int size) A function to ensure the elements are within the requested size. If smaller then the stored elements they get removed as needed. If bigger it is ensured that enough room is provided depending on the implementation- Angegeben von:
sizein SchnittstelleBooleanList- Setzt außer Kraft:
sizein KlasseAbstractBooleanList- Parameter:
size- the requested amount of elements/room for elements
-
clear
public void clear()A function to clear all elements in the list.- Angegeben von:
clearin SchnittstelleBooleanStack- Angegeben von:
clearin SchnittstelleCollection<Boolean>- Angegeben von:
clearin SchnittstelleList<Boolean>- Setzt außer Kraft:
clearin KlasseAbstractCollection<Boolean>
-
trim
public boolean trim(int size) Trims the original collection down to the size of the current elements or the requested size depending which is bigger- Angegeben von:
trimin SchnittstelleITrimmable- Parameter:
size- the requested trim size.- Gibt zurück:
- if the internal array has been trimmed.
-
clearAndTrim
public void clearAndTrim(int size) Trims the collection down to the requested size and clears all elements while doing so- Angegeben von:
clearAndTrimin SchnittstelleITrimmable- Parameter:
size- the amount of elements that should be allowed- Note:
- this will enforce minimum size of the collection itself
-
ensureCapacity
public void ensureCapacity(int size) Increases the capacity of this implementation instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.- Angegeben von:
ensureCapacityin SchnittstelleIArray- Parameter:
size- the desired minimum capacity
-
copy
Beschreibung aus Schnittstelle kopiert:BooleanCollectionA Function that does a shallow clone of the Collection itself. This function is more optimized then a copy constructor since the Collection does not have to be unsorted/resorted. It can be compared to Cloneable but with less exception risk- Angegeben von:
copyin SchnittstelleBooleanCollection- Angegeben von:
copyin SchnittstelleBooleanList- Setzt außer Kraft:
copyin KlasseAbstractBooleanList- Gibt zurück:
- a Shallow Copy of the collection
-
spliterator
A Type Specific Type Splititerator to reduce boxing/unboxing- Angegeben von:
spliteratorin SchnittstelleBooleanCollection- Angegeben von:
spliteratorin SchnittstelleBooleanIterable- Angegeben von:
spliteratorin SchnittstelleBooleanList- Angegeben von:
spliteratorin SchnittstelleCollection<Boolean>- Angegeben von:
spliteratorin SchnittstelleIterable<Boolean>- Angegeben von:
spliteratorin SchnittstelleList<Boolean>- Gibt zurück:
- type specific splititerator
- Note:
- characteristics are ordered, sized, subsized
-