public static class BytePriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements BytePriorityQueue
| Modifier and Type | Field and Description |
|---|---|
protected BytePriorityQueue |
q |
protected java.lang.Object |
sync |
| Modifier | Constructor and Description |
|---|---|
protected |
SynchronizedPriorityQueue(BytePriorityQueue q) |
protected |
SynchronizedPriorityQueue(BytePriorityQueue q,
java.lang.Object sync) |
| Modifier and Type | Method and Description |
|---|---|
void |
changed() |
void |
clear() |
it.unimi.dsi.fastutil.bytes.ByteComparator |
comparator()
Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
|
java.lang.Byte |
dequeue()
Deprecated.
|
byte |
dequeueByte()
Dequeues the first element from the queue.
|
void |
enqueue(byte x)
Enqueues a new element.
|
void |
enqueue(java.lang.Byte x)
Deprecated.
|
boolean |
equals(java.lang.Object o) |
java.lang.Byte |
first()
Deprecated.
|
byte |
firstByte()
Returns the first element of the queue.
|
int |
hashCode() |
boolean |
isEmpty() |
java.lang.Byte |
last()
Deprecated.
|
byte |
lastByte()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).
|
int |
size() |
protected final BytePriorityQueue q
protected final java.lang.Object sync
protected SynchronizedPriorityQueue(BytePriorityQueue q, java.lang.Object sync)
protected SynchronizedPriorityQueue(BytePriorityQueue q)
public void enqueue(byte x)
BytePriorityQueueenqueue in interface BytePriorityQueuex - the element to enqueue.PriorityQueue.enqueue(Object)public byte dequeueByte()
BytePriorityQueuedequeueByte in interface BytePriorityQueueBytePriorityQueue.dequeue()public byte firstByte()
BytePriorityQueuefirstByte in interface BytePriorityQueueBytePriorityQueue.first()public byte lastByte()
BytePriorityQueueThis default implementation just throws an UnsupportedOperationException.
lastByte in interface BytePriorityQueueBytePriorityQueue.last()public boolean isEmpty()
isEmpty in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>public int size()
size in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>public void clear()
clear in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>public void changed()
changed in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>public it.unimi.dsi.fastutil.bytes.ByteComparator comparator()
BytePriorityQueuecomparator in interface BytePriorityQueuecomparator in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>PriorityQueue.comparator()@Deprecated public void enqueue(java.lang.Byte x)
BytePriorityQueueThis default implementation delegates to the corresponding type-specific method.
enqueue in interface BytePriorityQueueenqueue in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>@Deprecated public java.lang.Byte dequeue()
BytePriorityQueueThis default implementation delegates to the corresponding type-specific method.
dequeue in interface BytePriorityQueuedequeue in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>@Deprecated public java.lang.Byte first()
BytePriorityQueueThis default implementation delegates to the corresponding type-specific method.
first in interface BytePriorityQueuefirst in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>@Deprecated public java.lang.Byte last()
BytePriorityQueueThis default implementation delegates to the corresponding type-specific method.
last in interface BytePriorityQueuelast in interface it.unimi.dsi.fastutil.PriorityQueue<java.lang.Byte>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object