public static class FloatPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements FloatPriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all elements within the PriorityQueue,
this does not resize the backing arrays
|
FloatComparator |
comparator() |
FloatPriorityQueue |
copy()
A Function that does a shallow clone of the PriorityQueue itself.
|
int |
count(FloatPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
float |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(float e)
Method to insert a element into the PriorityQueue
|
void |
enqueueAll(float[] e,
int offset,
int length)
Method to mass insert elements into the PriorityQueue
|
void |
enqueueAll(FloatCollection c)
Method to mass insert elements into the PriorityQueue
|
float |
findFirst(FloatPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
<E> void |
forEach(E input,
ObjectFloatConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(FloatConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
FloatIterator |
iterator()
Returns an iterator over elements of type
T. |
boolean |
matchesAll(FloatPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(FloatPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(FloatPredicate 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
|
float |
peek(int index)
Peeking function to see whats inside the queue.
|
boolean |
removeFirst(float e)
Removes the first found element in the queue
|
boolean |
removeLast(float e)
Removes the last found element in the queue
|
int |
size() |
float[] |
toFloatArray(float[] 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, toFloatArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, forEachIndexed, limit, map, peek, pour, pourAsList, pourAsSet, reduce, reduce, repeat, sorted, spliteratorpublic FloatIterator iterator()
FloatIterableT.iterator in interface java.lang.Iterable<java.lang.Float>iterator in interface FloatIterablepublic int size()
size in interface FloatPriorityQueuepublic void clear()
FloatPriorityQueueclear in interface FloatPriorityQueuepublic void enqueue(float e)
FloatPriorityQueueenqueue in interface FloatPriorityQueuee - the element that should be insertedpublic void enqueueAll(float[] e,
int offset,
int length)
FloatPriorityQueueenqueueAll in interface FloatPriorityQueuee - 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(FloatCollection c)
FloatPriorityQueueenqueueAll in interface FloatPriorityQueuec - the elements that should be inserted from the Collectionpublic float dequeue()
FloatPriorityQueuedequeue in interface FloatPriorityQueuepublic float peek(int index)
FloatPriorityQueuepeek in interface FloatPriorityQueueindex - of the element that is requested to be viewed.public boolean removeFirst(float e)
FloatPriorityQueueremoveFirst in interface FloatPriorityQueuee - the element that should be removedpublic boolean removeLast(float e)
FloatPriorityQueueremoveLast in interface FloatPriorityQueuee - the element that should be removedpublic void onChanged()
FloatPriorityQueueonChanged in interface FloatPriorityQueuepublic FloatComparator comparator()
comparator in interface FloatPriorityQueuepublic float[] toFloatArray(float[] input)
FloatPriorityQueuetoFloatArray in interface FloatPriorityQueueinput - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created arraypublic FloatPriorityQueue copy()
FloatPriorityQueuecopy in interface FloatPriorityQueuepublic void forEach(FloatConsumer action)
FloatIterableforEach in interface FloatIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectFloatConsumer<E> action)
FloatIterableforEach in interface FloatIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(FloatPredicate filter)
FloatIterablematchesAny in interface FloatIterablefilter - that should be appliedpublic boolean matchesNone(FloatPredicate filter)
FloatIterablematchesNone in interface FloatIterablefilter - that should be appliedpublic boolean matchesAll(FloatPredicate filter)
FloatIterablematchesAll in interface FloatIterablefilter - that should be appliedpublic float findFirst(FloatPredicate filter)
FloatIterablefindFirst in interface FloatIterablefilter - that should be appliedpublic int count(FloatPredicate filter)
FloatIterablecount in interface FloatIterablefilter - that should be applied