public static class ShortPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements ShortPriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all elements within the PriorityQueue,
this does not resize the backing arrays
|
ShortComparator |
comparator() |
ShortPriorityQueue |
copy()
A Function that does a shallow clone of the PriorityQueue itself.
|
int |
count(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
short |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(short e)
Method to insert a element into the PriorityQueue
|
void |
enqueueAll(short[] e,
int offset,
int length)
Method to mass insert elements into the PriorityQueue
|
void |
enqueueAll(ShortCollection c)
Method to mass insert elements into the PriorityQueue
|
short |
findFirst(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
<E> void |
forEach(E input,
ObjectShortConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(ShortConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
ShortIterator |
iterator()
Returns an iterator over elements of type
T. |
boolean |
matchesAll(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Short2BooleanFunction 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
|
short |
peek(int index)
Peeking function to see whats inside the queue.
|
boolean |
removeFirst(short e)
Removes the first found element in the queue
|
boolean |
removeLast(short e)
Removes the last found element in the queue
|
int |
size() |
short[] |
toShortArray(short[] 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, toShortArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pour, pourAsList, pourAsSet, reduce, reduce, sorted, spliteratorpublic ShortIterator iterator()
ShortIterableT.iterator in interface java.lang.Iterable<java.lang.Short>iterator in interface ShortIterablepublic int size()
size in interface ShortPriorityQueuepublic void clear()
ShortPriorityQueueclear in interface ShortPriorityQueuepublic void enqueue(short e)
ShortPriorityQueueenqueue in interface ShortPriorityQueuee - the element that should be insertedpublic void enqueueAll(short[] e,
int offset,
int length)
ShortPriorityQueueenqueueAll in interface ShortPriorityQueuee - 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(ShortCollection c)
ShortPriorityQueueenqueueAll in interface ShortPriorityQueuec - the elements that should be inserted from the Collectionpublic short dequeue()
ShortPriorityQueuedequeue in interface ShortPriorityQueuepublic short peek(int index)
ShortPriorityQueuepeek in interface ShortPriorityQueueindex - of the element that is requested to be viewed.public boolean removeFirst(short e)
ShortPriorityQueueremoveFirst in interface ShortPriorityQueuee - the element that should be removedpublic boolean removeLast(short e)
ShortPriorityQueueremoveLast in interface ShortPriorityQueuee - the element that should be removedpublic void onChanged()
ShortPriorityQueueonChanged in interface ShortPriorityQueuepublic ShortComparator comparator()
comparator in interface ShortPriorityQueuepublic short[] toShortArray(short[] input)
ShortPriorityQueuetoShortArray in interface ShortPriorityQueueinput - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created arraypublic ShortPriorityQueue copy()
ShortPriorityQueuecopy in interface ShortPriorityQueuepublic void forEach(ShortConsumer action)
ShortIterableforEach in interface ShortIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectShortConsumer<E> action)
ShortIterableforEach in interface ShortIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Short2BooleanFunction filter)
ShortIterablematchesAny in interface ShortIterablefilter - that should be appliedpublic boolean matchesNone(Short2BooleanFunction filter)
ShortIterablematchesNone in interface ShortIterablefilter - that should be appliedpublic boolean matchesAll(Short2BooleanFunction filter)
ShortIterablematchesAll in interface ShortIterablefilter - that should be appliedpublic short findFirst(Short2BooleanFunction filter)
ShortIterablefindFirst in interface ShortIterablefilter - that should be appliedpublic int count(Short2BooleanFunction filter)
ShortIterablecount in interface ShortIterablefilter - that should be applied