|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.bytes.BytePriorityQueues.SynchronizedPriorityQueue
public static class BytePriorityQueues.SynchronizedPriorityQueue
A synchronized wrapper class for priority queues.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Method Detail |
---|
public void enqueue(byte x)
BytePriorityQueue
enqueue
in interface BytePriorityQueue
x
- the element to enqueue.public byte dequeueByte()
BytePriorityQueue
dequeueByte
in interface BytePriorityQueue
public byte firstByte()
BytePriorityQueue
firstByte
in interface BytePriorityQueue
public byte lastByte()
BytePriorityQueue
lastByte
in interface BytePriorityQueue
public boolean isEmpty()
PriorityQueue
isEmpty
in interface PriorityQueue<Byte>
public int size()
PriorityQueue
size
in interface PriorityQueue<Byte>
public void clear()
PriorityQueue
clear
in interface PriorityQueue<Byte>
public void changed()
PriorityQueue
changed
in interface PriorityQueue<Byte>
public ByteComparator comparator()
BytePriorityQueue
Note that this specification strengthens the one given in PriorityQueue.comparator()
.
comparator
in interface BytePriorityQueue
comparator
in interface PriorityQueue<Byte>
null
if it uses its elements' natural ordering.PriorityQueue.comparator()
public void enqueue(Byte x)
PriorityQueue
enqueue
in interface PriorityQueue<Byte>
x
- the element to enqueue..public Byte dequeue()
PriorityQueue
dequeue
in interface PriorityQueue<Byte>
public Byte first()
PriorityQueue
first
in interface PriorityQueue<Byte>
public Byte last()
PriorityQueue
last
in interface PriorityQueue<Byte>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |