public interface LongPriorityQueue extends LongIterable
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all elements within the PriorityQueue,
this does not resize the backing arrays
|
LongComparator |
comparator() |
LongPriorityQueue |
copy()
A Function that does a shallow clone of the PriorityQueue itself.
|
long |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(long e)
Method to insert a element into the PriorityQueue
|
default void |
enqueueAll(long... e)
Method to mass insert elements into the PriorityQueue
|
default void |
enqueueAll(long[] e,
int length)
Method to mass insert elements into the PriorityQueue
|
default void |
enqueueAll(long[] e,
int offset,
int length)
Method to mass insert elements into the PriorityQueue
|
default void |
enqueueAll(LongCollection c)
Method to mass insert elements into the PriorityQueue
|
default long |
first()
Shows the element that is to be returned next
|
default boolean |
isEmpty() |
void |
onChanged()
Allows to notify the Queue to be revalidate its data
|
long |
peek(int index)
Peeking function to see whats inside the queue.
|
boolean |
removeFirst(long e)
Removes the first found element in the queue
|
boolean |
removeLast(long e)
Removes the last found element in the queue
|
int |
size() |
default LongPriorityQueue |
synchronizeQueue()
Creates a Wrapped PriorityQueue that is Synchronized
|
default LongPriorityQueue |
synchronizeQueue(java.lang.Object mutex)
Creates a Wrapped PriorityQueue that is Synchronized
|
default long[] |
toLongArray()
A method to drop the contents of the Queue without clearing the queue
|
long[] |
toLongArray(long[] input)
A method to drop the contents of the Queue without clearing the queue
|
arrayflatMap, asAsync, count, distinct, filter, findFirst, flatMap, forEach, forEach, forEach, forEachIndexed, iterator, limit, map, matchesAll, matchesAny, matchesNone, peek, pour, pourAsList, pourAsSet, reduce, reduce, repeat, sorted, spliteratordefault boolean isEmpty()
int size()
void clear()
void enqueue(long e)
e - the element that should be inserteddefault void enqueueAll(long... e)
e - the elements that should be inserteddefault void enqueueAll(long[] e,
int length)
e - the elements that should be insertedlength - the amount of elements that should be inserteddefault void enqueueAll(long[] e,
int offset,
int length)
e - the elements that should be insertedoffset - the offset where in the array should be startedlength - the amount of elements that should be inserteddefault void enqueueAll(LongCollection c)
c - the elements that should be inserted from the Collectionlong dequeue()
java.util.NoSuchElementException - if no element is presentlong peek(int index)
index - of the element that is requested to be viewed.default long first()
boolean removeFirst(long e)
e - the element that should be removedboolean removeLast(long e)
e - the element that should be removedvoid onChanged()
LongPriorityQueue copy()
LongComparator comparator()
default LongPriorityQueue synchronizeQueue()
LongPriorityQueues.synchronize(speiger.src.collections.longs.queues.LongPriorityQueue)default LongPriorityQueue synchronizeQueue(java.lang.Object mutex)
mutex - is the controller of the synchronization blockLongPriorityQueues.synchronize(speiger.src.collections.longs.queues.LongPriorityQueue)default long[] toLongArray()
toLongArray in interface LongIterablelong[] toLongArray(long[] input)
input - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created array