public static class DoublePriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements DoublePriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all elements within the PriorityQueue,
this does not resize the backing arrays
|
DoubleComparator |
comparator() |
DoublePriorityQueue |
copy()
A Function that does a shallow clone of the PriorityQueue itself.
|
int |
count(Double2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
double |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(double e)
Method to insert a element into the PriorityQueue
|
void |
enqueueAll(double[] e,
int offset,
int length)
Method to mass insert elements into the PriorityQueue
|
void |
enqueueAll(DoubleCollection c)
Method to mass insert elements into the PriorityQueue
|
double |
findFirst(Double2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(DoubleConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
<E> void |
forEach(E input,
ObjectDoubleConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
DoubleIterator |
iterator()
Returns an iterator over elements of type
T. |
boolean |
matchesAll(Double2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Double2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Double2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
void |
onChanged()
Allows to notify the Queue to be revalidate its data
|
double |
peek(int index)
Peeking function to see whats inside the queue.
|
boolean |
removeFirst(double e)
Removes the first found element in the queue
|
boolean |
removeLast(double e)
Removes the last found element in the queue
|
int |
size() |
double[] |
toDoubleArray(double[] input)
A method to drop the contents of the Queue without clearing the queue
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenqueueAll, enqueueAll, first, isEmpty, synchronizeQueue, synchronizeQueue, toDoubleArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pour, pourAsList, pourAsSet, reduce, reduce, sorted, spliteratorpublic DoubleIterator iterator()
DoubleIterableT.iterator in interface java.lang.Iterable<java.lang.Double>iterator in interface DoubleIterablepublic int size()
size in interface DoublePriorityQueuepublic void clear()
DoublePriorityQueueclear in interface DoublePriorityQueuepublic void enqueue(double e)
DoublePriorityQueueenqueue in interface DoublePriorityQueuee - the element that should be insertedpublic void enqueueAll(double[] e,
int offset,
int length)
DoublePriorityQueueenqueueAll in interface DoublePriorityQueuee - the elements that should be insertedoffset - the offset where in the array should be startedlength - the amount of elements that should be insertedpublic void enqueueAll(DoubleCollection c)
DoublePriorityQueueenqueueAll in interface DoublePriorityQueuec - the elements that should be inserted from the Collectionpublic double dequeue()
DoublePriorityQueuedequeue in interface DoublePriorityQueuepublic double peek(int index)
DoublePriorityQueuepeek in interface DoublePriorityQueueindex - of the element that is requested to be viewed.public boolean removeFirst(double e)
DoublePriorityQueueremoveFirst in interface DoublePriorityQueuee - the element that should be removedpublic boolean removeLast(double e)
DoublePriorityQueueremoveLast in interface DoublePriorityQueuee - the element that should be removedpublic void onChanged()
DoublePriorityQueueonChanged in interface DoublePriorityQueuepublic DoubleComparator comparator()
comparator in interface DoublePriorityQueuepublic double[] toDoubleArray(double[] input)
DoublePriorityQueuetoDoubleArray in interface DoublePriorityQueueinput - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created arraypublic DoublePriorityQueue copy()
DoublePriorityQueuecopy in interface DoublePriorityQueuepublic void forEach(DoubleConsumer action)
DoubleIterableforEach in interface DoubleIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectDoubleConsumer<E> action)
DoubleIterableforEach in interface DoubleIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Double2BooleanFunction filter)
DoubleIterablematchesAny in interface DoubleIterablefilter - that should be appliedpublic boolean matchesNone(Double2BooleanFunction filter)
DoubleIterablematchesNone in interface DoubleIterablefilter - that should be appliedpublic boolean matchesAll(Double2BooleanFunction filter)
DoubleIterablematchesAll in interface DoubleIterablefilter - that should be appliedpublic double findFirst(Double2BooleanFunction filter)
DoubleIterablefindFirst in interface DoubleIterablefilter - that should be appliedpublic int count(Double2BooleanFunction filter)
DoubleIterablecount in interface DoubleIterablefilter - that should be applied