Modul speiger.src.collections
Klasse ObjectLinkedList<T>
java.lang.Object
java.util.AbstractCollection<T>
speiger.src.collections.objects.collections.AbstractObjectCollection<T>
speiger.src.collections.objects.lists.AbstractObjectList<T>
speiger.src.collections.objects.lists.ObjectLinkedList<T>
- Typparameter:
T- the keyType of elements maintained by this Collection
- Alle implementierten Schnittstellen:
Iterable<T>,Collection<T>,List<T>,ObjectCollection<T>,ObjectIterable<T>,ObjectList<T>,ObjectPriorityDequeue<T>,ObjectPriorityQueue<T>,ISizeProvider,Stack<T>
public class ObjectLinkedList<T>
extends AbstractObjectList<T>
implements ObjectPriorityDequeue<T>, Stack<T>
A Type-Specific LinkedList implementation of list that is written to reduce (un)boxing
This implementation is optimized to improve how data is processed with interfaces like Stack
and with optimized functions that use type-specific implementations for primitives and optimized logic for bulk actions.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new LinkedList.ObjectLinkedList(Collection<? extends T> c) Veraltet.Creates a new LinkedList a copy with the contents of the Collection.Creates a new LinkedList a copy with the contents of the List.ObjectLinkedList(T... a) Creates a new LinkedList with a Copy of the arrayObjectLinkedList(T[] a, int length) Creates a new LinkedList with a Copy of the array with a custom lengthObjectLinkedList(T[] a, int offset, int length) Creates a new LinkedList with a Copy of the array with in the custom range. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidbooleanA Type-Specific implementation of add function that delegates toList.add(int, Object)booleanaddAll(int index, Collection<? extends T> c) booleanaddAll(int index, ObjectCollection<T> c) A Type-Specific addAll Function to reduce (un)boxingbooleanaddAll(int index, ObjectList<T> c) A Type-Specific and optimized addAll function that allows a faster transfer of elementsbooleanA Type-Specific Array based addAll method to reduce the amount of WrappingvoidaddElements(int from, T[] a, int offset, int length) A function to fast add elements to the listvoidclear()clears all elements within the PriorityQueue, this does not resize the backing arraysbooleanMethod to find out if a element is part of the queuecopy()A Function that does a shallow clone of the Collection itself.intHelper function to reduce stream usage that allows to count the valid elements.dequeue()Method to extract a element from the PriorityQueueA Method to remove a element from the last place instead of the firstvoidMethod to insert a element into the PriorityQueuevoidenqueueFirst(T e) Method to insert a element into the first Index instead of the last.<K> K[]extractElements(int from, int to, Class<K> type) A function to fast extract elements out of the list, this removes the elements that were fetched.Helper function to reduce stream usage that allows to filter for the first match.first()Shows the element that is to be returned next<E> voidforEach(E input, ObjectObjectConsumer<E, T> action) Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.voidvoidforEachIndexed(IntObjectConsumer<T> action) A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.get(int index) T[]getElements(int from, T[] a, int offset, int length) A function to fast fetch elements from the listgetFirst()Helper method that returns the first element of a List.getLast()Helper method that returns the last element of a List.intThe IndexOf implementation iterates over all elements and compares them to the search value.last()Peeking function for the last elementintThe lastIndexOf implementation iterates over all elements and compares them to the search value.listIterator(int index) A Type-Specific Iterator of listIteratorbooleanmatchesAll(Predicate<T> filter) Helper function to reduce stream usage that allows to filter for all matches.booleanmatchesAny(Predicate<T> filter) Helper function to reduce stream usage that allows to filter for any matches.booleanmatchesNone(Predicate<T> filter) Helper function to reduce stream usage that allows to filter for no matches.voidAllows to notify the Queue to be revalidate its datapeek(int index) Peeking function to see whats inside the queue.pop()Removes the Object on top of the stack.voidInserts a given Object on top of the stack<E> Ereduce(E identity, BiFunction<E, T, E> operator) Performs a reduction on the elements of this Iterablereduce(ObjectObjectUnaryOperator<T, T> operator) Performs a reduction on the elements of this Iterableremove(int index) booleanbooleanremoveAll(Collection<?> c) booleanA Type-Specific implementation of removeAll.booleanremoveAll(ObjectCollection<T> c, Consumer<T> r) A Type-Specific removeAll function that reduces (un)boxing.voidremoveElements(int from, int to) a function to fast remove elements from the list.Helper method that removes and returns the first element of a List.booleanremoveFirst(T e) Removes the first found element in the queuebooleanHelper method that removes and returns the last element of a List.booleanremoveLast(T e) Removes the last found element in the queuevoidreplaceAll(UnaryOperator<T> o) A function to replace all values in the listbooleanretainAll(Collection<?> c) booleanA Type-Specific implementation of retainAll.booleanretainAll(ObjectCollection<T> c, Consumer<T> r) A Type-Specific retainAll function that reduces (un)boxing.intsize()Provides the amount of elements currently in the stackA Type Specific Type Splititerator to reduce boxing/unboxingswapRemove(int index) A Highly Optimized remove function that removes the desired element.booleanswapRemove(T e) A Highly Optimized remove function that removes the desired element.Object[]toArray()A method to drop the contents of the Queue without clearing the queue<E> E[]toArray(E[] a) A method to drop the contents of the Queue without clearing the queue<E> E[]toArray(IntFunction<E[]> action) A Helper function that simplifies the process of creating a new Array.Von Klasse geerbte Methoden speiger.src.collections.objects.lists.AbstractObjectList
addAll, addAll, addAll, equals, hashCode, indexedIterator, indexedIterator, iterator, listIterator, reversed, size, subListVon Klasse geerbte Methoden speiger.src.collections.objects.collections.AbstractObjectCollection
containsAll, containsAll, containsAny, containsAnyVon Klasse geerbte Methoden java.util.AbstractCollection
isEmpty, toStringVon Schnittstelle geerbte Methoden java.util.Collection
parallelStream, streamVon Schnittstelle geerbte Methoden java.util.List
containsAll, isEmptyVon Schnittstelle geerbte Methoden speiger.src.collections.objects.collections.ObjectCollection
addAll, addAll, containsAll, containsAny, containsAny, pourVon Schnittstelle geerbte Methoden speiger.src.collections.objects.collections.ObjectIterable
arrayflatMap, asAsync, distinct, filter, flatMap, limit, map, mapToBoolean, mapToByte, mapToDouble, mapToFloat, mapToInt, mapToLong, mapToShort, peek, pourAsList, pourAsSet, repeat, sortedVon Schnittstelle geerbte Methoden speiger.src.collections.objects.lists.ObjectList
addElements, addElements, addIfAbsent, addIfPresent, getElements, sort, synchronize, synchronize, unmodifiable, unstableSortVon Schnittstelle geerbte Methoden speiger.src.collections.objects.queues.ObjectPriorityDequeue
enqueueAllFirst, enqueueAllFirst, enqueueAllFirst, enqueueAllFirst, enqueueAllFirst, synchronizeQueue, synchronizeQueueVon Schnittstelle geerbte Methoden speiger.src.collections.objects.queues.ObjectPriorityQueue
enqueueAll, enqueueAll, enqueueAll, enqueueAll, enqueueAll, isEmpty, iterator
-
Konstruktordetails
-
ObjectLinkedList
public ObjectLinkedList()Creates a new LinkedList. -
ObjectLinkedList
Veraltet.Creates a new LinkedList a copy with the contents of the Collection.- Parameter:
c- the elements that should be added into the list
-
ObjectLinkedList
Creates a new LinkedList a copy with the contents of the Collection.- Parameter:
c- the elements that should be added into the list
-
ObjectLinkedList
Creates a new LinkedList a copy with the contents of the List.- Parameter:
l- the elements that should be added into the list
-
ObjectLinkedList
Creates a new LinkedList with a Copy of the array- Parameter:
a- the array that should be copied
-
ObjectLinkedList
Creates a new LinkedList 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
-
ObjectLinkedList
Creates a new LinkedList 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
-
add
Beschreibung aus Klasse kopiert:AbstractObjectListA Type-Specific implementation of add function that delegates toList.add(int, Object)- Angegeben von:
addin SchnittstelleCollection<T>- Angegeben von:
addin SchnittstelleList<T>- Setzt außer Kraft:
addin KlasseAbstractObjectList<T>
-
add
-
addAll
Beschreibung aus Schnittstelle kopiert:ObjectListA Type-Specific addAll Function to reduce (un)boxing- Angegeben von:
addAllin SchnittstelleObjectList<T>- Parameter:
index- index at which the specified elements is to be insertedc- the elements that need to be added- Gibt zurück:
- true if the list was modified
- Siehe auch:
-
addAll
Beschreibung aus Schnittstelle kopiert:ObjectListA Type-Specific and optimized addAll function that allows a faster transfer of elements- Angegeben von:
addAllin SchnittstelleObjectList<T>- Parameter:
index- index at which the specified elements is to be insertedc- the elements that need to be added- Gibt zurück:
- true if the list was modified
-
addAll
-
enqueue
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueMethod to insert a element into the PriorityQueue- Angegeben von:
enqueuein SchnittstelleObjectPriorityQueue<T>- Parameter:
e- the element that should be inserted
-
enqueueFirst
Beschreibung aus Schnittstelle kopiert:ObjectPriorityDequeueMethod to insert a element into the first Index instead of the last.- Angegeben von:
enqueueFirstin SchnittstelleObjectPriorityDequeue<T>- Parameter:
e- the element that should be inserted into the first place
-
push
Beschreibung aus Schnittstelle kopiert:StackInserts a given Object on top of the stack -
addAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific Array based addAll method to reduce the amount of Wrapping- Angegeben von:
addAllin SchnittstelleObjectCollection<T>- 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
Beschreibung aus Schnittstelle kopiert:ObjectListA function to fast add elements to the list- Angegeben von:
addElementsin SchnittstelleObjectList<T>- Parameter:
from- 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 from
-
getElements
Beschreibung aus Schnittstelle kopiert:ObjectListA function to fast fetch elements from the list- Angegeben von:
getElementsin SchnittstelleObjectList<T>- 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
-
first
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueShows the element that is to be returned next- Angegeben von:
firstin SchnittstelleObjectPriorityQueue<T>- Gibt zurück:
- the first element in the Queue
-
last
Beschreibung aus Schnittstelle kopiert:ObjectPriorityDequeuePeeking function for the last element- Angegeben von:
lastin SchnittstelleObjectPriorityDequeue<T>- Gibt zurück:
- the Last Element within the dequeue without deleting it
-
getFirst
Beschreibung aus Schnittstelle kopiert:ObjectListHelper method that returns the first element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.- Angegeben von:
getFirstin SchnittstelleObjectList<T>- Gibt zurück:
- first element of the list
-
getLast
Beschreibung aus Schnittstelle kopiert:ObjectListHelper method that returns the last element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.- Angegeben von:
getLastin SchnittstelleObjectList<T>- Gibt zurück:
- last element of the list
-
removeFirst
Beschreibung aus Schnittstelle kopiert:ObjectListHelper method that removes and returns the first element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.- Angegeben von:
removeFirstin SchnittstelleObjectList<T>- Gibt zurück:
- first element of the list and removes it
-
removeLast
Beschreibung aus Schnittstelle kopiert:ObjectListHelper method that removes and returns the last element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.- Angegeben von:
removeLastin SchnittstelleObjectList<T>- Gibt zurück:
- last element of the list and removes it
-
peek
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueuePeeking function to see whats inside the queue. -
get
-
contains
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueMethod to find out if a element is part of the queue- Angegeben von:
containsin SchnittstelleCollection<T>- Angegeben von:
containsin SchnittstelleList<T>- Angegeben von:
containsin SchnittstelleObjectPriorityQueue<T>- Setzt außer Kraft:
containsin KlasseAbstractCollection<T>- Parameter:
e- the element that is searched for- Gibt zurück:
- true if the element is in the queue
-
indexOf
Beschreibung aus Klasse kopiert:AbstractObjectListThe IndexOf implementation iterates over all elements and compares them to the search value. -
lastIndexOf
Beschreibung aus Klasse kopiert:AbstractObjectListThe lastIndexOf implementation iterates over all elements and compares them to the search value.- Angegeben von:
lastIndexOfin SchnittstelleList<T>- Setzt außer Kraft:
lastIndexOfin KlasseAbstractObjectList<T>- Parameter:
o- the value that the index is searched for.- Gibt zurück:
- the last index of the value that was searched for. -1 if not found
-
listIterator
Beschreibung aus Schnittstelle kopiert:ObjectListA Type-Specific Iterator of listIterator- Angegeben von:
listIteratorin SchnittstelleList<T>- Angegeben von:
listIteratorin SchnittstelleObjectList<T>- Setzt außer Kraft:
listIteratorin KlasseAbstractObjectList<T>- Siehe auch:
-
spliterator
A Type Specific Type Splititerator to reduce boxing/unboxing- Angegeben von:
spliteratorin SchnittstelleCollection<T>- Angegeben von:
spliteratorin SchnittstelleIterable<T>- Angegeben von:
spliteratorin SchnittstelleList<T>- Angegeben von:
spliteratorin SchnittstelleObjectCollection<T>- Angegeben von:
spliteratorin SchnittstelleObjectIterable<T>- Angegeben von:
spliteratorin SchnittstelleObjectList<T>- Gibt zurück:
- type specific splititerator
-
forEach
-
forEachIndexed
Beschreibung aus Schnittstelle kopiert:ObjectIterableA Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.- Angegeben von:
forEachIndexedin SchnittstelleObjectIterable<T>- Angegeben von:
forEachIndexedin SchnittstelleObjectList<T>- Parameter:
action- The action to be performed for each element
-
forEach
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.- Angegeben von:
forEachin SchnittstelleObjectIterable<T>- 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:ObjectIterableHelper function to reduce stream usage that allows to filter for any matches.- Angegeben von:
matchesAnyin SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- true if any matches were found
-
matchesNone
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce stream usage that allows to filter for no matches.- Angegeben von:
matchesNonein SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- true if no matches were found
-
matchesAll
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce stream usage that allows to filter for all matches.- Angegeben von:
matchesAllin SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- true if all matches.
-
findFirst
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce stream usage that allows to filter for the first match.- Angegeben von:
findFirstin SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- the found value or the null equivalent variant.
-
reduce
Beschreibung aus Schnittstelle kopiert:ObjectIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleObjectIterable<T>- Typparameter:
E- the keyType of elements maintained by this Collection- 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:ObjectIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleObjectIterable<T>- 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:ObjectIterableHelper function to reduce stream usage that allows to count the valid elements.- Angegeben von:
countin SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-
set
-
replaceAll
Beschreibung aus Schnittstelle kopiert:ObjectListA function to replace all values in the list- Angegeben von:
replaceAllin SchnittstelleList<T>- Angegeben von:
replaceAllin SchnittstelleObjectList<T>- Parameter:
o- the action to replace the values
-
onChanged
public void onChanged()Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueAllows to notify the Queue to be revalidate its data- Angegeben von:
onChangedin SchnittstelleObjectPriorityQueue<T>
-
comparator
- Angegeben von:
comparatorin SchnittstelleObjectPriorityQueue<T>- Gibt zurück:
- the sorter of the Queue, can be null
-
dequeue
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueMethod to extract a element from the PriorityQueue- Angegeben von:
dequeuein SchnittstelleObjectPriorityQueue<T>- Gibt zurück:
- a element from the Queue
-
dequeueLast
Beschreibung aus Schnittstelle kopiert:ObjectPriorityDequeueA Method to remove a element from the last place instead of the first- Angegeben von:
dequeueLastin SchnittstelleObjectPriorityDequeue<T>- Gibt zurück:
- the last element inserted
-
pop
Beschreibung aus Schnittstelle kopiert:StackRemoves the Object on top of the stack. -
removeFirst
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueRemoves the first found element in the queue- Angegeben von:
removeFirstin SchnittstelleObjectPriorityQueue<T>- Parameter:
e- the element that should be removed- Gibt zurück:
- if a searched element was removed
-
removeLast
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueRemoves the last found element in the queue- Angegeben von:
removeLastin SchnittstelleObjectPriorityQueue<T>- Parameter:
e- the element that should be removed- Gibt zurück:
- if a searched element was removed
-
swapRemove
Beschreibung aus Schnittstelle kopiert:ObjectListA 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 SchnittstelleObjectList<T>- Parameter:
index- the index of the element to be removed- Gibt zurück:
- the element previously at the specified position
-
swapRemove
Beschreibung aus Schnittstelle kopiert:ObjectListA 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 SchnittstelleObjectList<T>- Setzt außer Kraft:
swapRemovein KlasseAbstractObjectList<T>- Parameter:
e- the element that should be removed- Gibt zurück:
- true if the element was removed
-
remove
- Angegeben von:
removein SchnittstelleCollection<T>- Angegeben von:
removein SchnittstelleList<T>- Setzt außer Kraft:
removein KlasseAbstractCollection<T>
-
remove
-
removeElements
public void removeElements(int from, int to) Beschreibung aus Schnittstelle kopiert:ObjectLista function to fast remove elements from the list.- Angegeben von:
removeElementsin SchnittstelleObjectList<T>- 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
Beschreibung aus Schnittstelle kopiert:ObjectListA function to fast extract elements out of the list, this removes the elements that were fetched.- Angegeben von:
extractElementsin SchnittstelleObjectList<T>- Typparameter:
K- the keyType of elements maintained by this Collection- 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)type- the type of the OutputArray- Gibt zurück:
- a array of the elements that were fetched
-
removeAll
- Angegeben von:
removeAllin SchnittstelleCollection<T>- Angegeben von:
removeAllin SchnittstelleList<T>- Setzt außer Kraft:
removeAllin KlasseAbstractCollection<T>
-
retainAll
- Angegeben von:
retainAllin SchnittstelleCollection<T>- Angegeben von:
retainAllin SchnittstelleList<T>- Setzt außer Kraft:
retainAllin KlasseAbstractCollection<T>
-
removeAll
Beschreibung aus Klasse kopiert:AbstractObjectCollectionA Type-Specific implementation of removeAll. This Implementation iterates over all elements and removes them as they were found in the other collection.- Angegeben von:
removeAllin SchnittstelleObjectCollection<T>- Setzt außer Kraft:
removeAllin KlasseAbstractObjectCollection<T>- Parameter:
c- the elements that should be deleted- Gibt zurück:
- true if the collection was modified.
- Siehe auch:
-
removeAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA 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 SchnittstelleObjectCollection<T>- Setzt außer Kraft:
removeAllin KlasseAbstractObjectCollection<T>- 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
Beschreibung aus Klasse kopiert:AbstractObjectCollectionA Type-Specific implementation of retainAll. This Implementation iterates over all elements and removes them as they were not found in the other collection.- Angegeben von:
retainAllin SchnittstelleObjectCollection<T>- Setzt außer Kraft:
retainAllin KlasseAbstractObjectCollection<T>- Parameter:
c- the elements that should be kept- Gibt zurück:
- true if the collection was modified.
- Siehe auch:
-
retainAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA 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 SchnittstelleObjectCollection<T>- Setzt außer Kraft:
retainAllin KlasseAbstractObjectCollection<T>- 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:
-
removeIf
- Angegeben von:
removeIfin SchnittstelleCollection<T>
-
toArray
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueA method to drop the contents of the Queue without clearing the queue- Angegeben von:
toArrayin SchnittstelleCollection<T>- Angegeben von:
toArrayin SchnittstelleList<T>- Angegeben von:
toArrayin SchnittstelleObjectPriorityQueue<T>- Angegeben von:
toArrayin SchnittstelleStack<T>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<T>- Gibt zurück:
- the contents of the queue into a seperate array.
-
toArray
public <E> E[] toArray(E[] a) Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueA method to drop the contents of the Queue without clearing the queue- Angegeben von:
toArrayin SchnittstelleCollection<T>- Angegeben von:
toArrayin SchnittstelleList<T>- Angegeben von:
toArrayin SchnittstelleObjectPriorityQueue<T>- Angegeben von:
toArrayin SchnittstelleStack<T>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<T>- Typparameter:
E- the keyType of elements maintained by this Collection- Parameter:
a- where the elements should be inserted to. If it does not fit then it creates a new appropiatly created array- Gibt zurück:
- the contents of the queue into a seperate array.
-
toArray
Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueA Helper function that simplifies the process of creating a new Array.- Angegeben von:
toArrayin SchnittstelleCollection<T>- Angegeben von:
toArrayin SchnittstelleObjectCollection<T>- Angegeben von:
toArrayin SchnittstelleObjectIterable<T>- Angegeben von:
toArrayin SchnittstelleObjectPriorityQueue<T>- Angegeben von:
toArrayin SchnittstelleStack<T>- Typparameter:
E- the returning arrayType- Parameter:
action- the array creation function- Gibt zurück:
- an array containing all of the elements in this collection
- Siehe auch:
-
size
public int size()Beschreibung aus Schnittstelle kopiert:StackProvides the amount of elements currently in the stack- Angegeben von:
sizein SchnittstelleCollection<T>- Angegeben von:
sizein SchnittstelleISizeProvider- Angegeben von:
sizein SchnittstelleList<T>- Angegeben von:
sizein SchnittstelleObjectPriorityQueue<T>- Angegeben von:
sizein SchnittstelleStack<T>- Angegeben von:
sizein KlasseAbstractCollection<T>- Gibt zurück:
- the amount of elements that are stored in the PriorityQueue
-
clear
public void clear()Beschreibung aus Schnittstelle kopiert:ObjectPriorityQueueclears all elements within the PriorityQueue, this does not resize the backing arrays- Angegeben von:
clearin SchnittstelleCollection<T>- Angegeben von:
clearin SchnittstelleList<T>- Angegeben von:
clearin SchnittstelleObjectPriorityQueue<T>- Angegeben von:
clearin SchnittstelleStack<T>- Setzt außer Kraft:
clearin KlasseAbstractCollection<T>
-
copy
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA 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 SchnittstelleObjectCollection<T>- Angegeben von:
copyin SchnittstelleObjectList<T>- Angegeben von:
copyin SchnittstelleObjectPriorityDequeue<T>- Angegeben von:
copyin SchnittstelleObjectPriorityQueue<T>- Setzt außer Kraft:
copyin KlasseAbstractObjectList<T>- Gibt zurück:
- a Shallow Copy of the collection
-