public static class BytePriorityQueues.SynchronizedPriorityQueue extends Object implements BytePriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
changed()
Notifies the queue that the first element has changed (optional operation).
|
void |
clear()
Removes all elements from this queue.
|
ByteComparator |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
|
Byte |
dequeue()
Dequeues the first element from the queue.
|
byte |
dequeueByte()
Dequeues the first element from the queue.
|
void |
enqueue(byte x)
Enqueues a new element.
|
void |
enqueue(Byte x)
Enqueues a new element.
|
Byte |
first()
Returns the first element of the queue.
|
byte |
firstByte()
Returns the first element of the queue.
|
boolean |
isEmpty()
Checks whether the queue is empty.
|
Byte |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
byte |
lastByte()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
int |
size()
Returns the number of elements in this queue.
|
public void enqueue(byte x)
BytePriorityQueueenqueue in interface BytePriorityQueuex - the element to enqueue.public byte dequeueByte()
BytePriorityQueuedequeueByte in interface BytePriorityQueuepublic byte firstByte()
BytePriorityQueuefirstByte in interface BytePriorityQueuepublic byte lastByte()
BytePriorityQueuelastByte in interface BytePriorityQueuepublic boolean isEmpty()
PriorityQueueisEmpty in interface PriorityQueue<Byte>public int size()
PriorityQueuesize in interface PriorityQueue<Byte>public void clear()
PriorityQueueclear in interface PriorityQueue<Byte>public void changed()
PriorityQueuechanged in interface PriorityQueue<Byte>public ByteComparator comparator()
BytePriorityQueueNote that this specification strengthens the one given in PriorityQueue.comparator().
comparator in interface BytePriorityQueuecomparator in interface PriorityQueue<Byte>null if it uses its elements' natural ordering.PriorityQueue.comparator()public void enqueue(Byte x)
PriorityQueueenqueue in interface PriorityQueue<Byte>x - the element to enqueue..public Byte dequeue()
PriorityQueuedequeue in interface PriorityQueue<Byte>public Byte first()
PriorityQueuefirst in interface PriorityQueue<Byte>public Byte last()
PriorityQueuelast in interface PriorityQueue<Byte>