public static class BytePriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements BytePriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all elements within the PriorityQueue,
this does not resize the backing arrays
|
ByteComparator |
comparator() |
BytePriorityQueue |
copy()
A Function that does a shallow clone of the PriorityQueue itself.
|
int |
count(Byte2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
byte |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(byte e)
Method to insert a element into the PriorityQueue
|
void |
enqueueAll(byte[] e,
int offset,
int length)
Method to mass insert elements into the PriorityQueue
|
void |
enqueueAll(ByteCollection c)
Method to mass insert elements into the PriorityQueue
|
byte |
findFirst(Byte2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(ByteConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
<E> void |
forEach(E input,
ObjectByteConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
ByteIterator |
iterator()
Returns an iterator over elements of type
T. |
boolean |
matchesAll(Byte2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Byte2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Byte2BooleanFunction 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
|
byte |
peek(int index)
Peeking function to see whats inside the queue.
|
boolean |
removeFirst(byte e)
Removes the first found element in the queue
|
boolean |
removeLast(byte e)
Removes the last found element in the queue
|
int |
size() |
byte[] |
toByteArray(byte[] 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, toByteArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pour, pourAsList, pourAsSet, reduce, reduce, sorted, spliteratorpublic ByteIterator iterator()
ByteIterableT.iterator in interface java.lang.Iterable<java.lang.Byte>iterator in interface ByteIterablepublic int size()
size in interface BytePriorityQueuepublic void clear()
BytePriorityQueueclear in interface BytePriorityQueuepublic void enqueue(byte e)
BytePriorityQueueenqueue in interface BytePriorityQueuee - the element that should be insertedpublic void enqueueAll(byte[] e,
int offset,
int length)
BytePriorityQueueenqueueAll in interface BytePriorityQueuee - 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(ByteCollection c)
BytePriorityQueueenqueueAll in interface BytePriorityQueuec - the elements that should be inserted from the Collectionpublic byte dequeue()
BytePriorityQueuedequeue in interface BytePriorityQueuepublic byte peek(int index)
BytePriorityQueuepeek in interface BytePriorityQueueindex - of the element that is requested to be viewed.public boolean removeFirst(byte e)
BytePriorityQueueremoveFirst in interface BytePriorityQueuee - the element that should be removedpublic boolean removeLast(byte e)
BytePriorityQueueremoveLast in interface BytePriorityQueuee - the element that should be removedpublic void onChanged()
BytePriorityQueueonChanged in interface BytePriorityQueuepublic ByteComparator comparator()
comparator in interface BytePriorityQueuepublic byte[] toByteArray(byte[] input)
BytePriorityQueuetoByteArray in interface BytePriorityQueueinput - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created arraypublic BytePriorityQueue copy()
BytePriorityQueuecopy in interface BytePriorityQueuepublic void forEach(ByteConsumer action)
ByteIterableforEach in interface ByteIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectByteConsumer<E> action)
ByteIterableforEach in interface ByteIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Byte2BooleanFunction filter)
ByteIterablematchesAny in interface ByteIterablefilter - that should be appliedpublic boolean matchesNone(Byte2BooleanFunction filter)
ByteIterablematchesNone in interface ByteIterablefilter - that should be appliedpublic boolean matchesAll(Byte2BooleanFunction filter)
ByteIterablematchesAll in interface ByteIterablefilter - that should be appliedpublic byte findFirst(Byte2BooleanFunction filter)
ByteIterablefindFirst in interface ByteIterablefilter - that should be appliedpublic int count(Byte2BooleanFunction filter)
ByteIterablecount in interface ByteIterablefilter - that should be applied