it.unimi.dsi.fastutil.bytes
Interface BytePriorityQueue

All Superinterfaces:
PriorityQueue
All Known Implementing Classes:
AbstractBytePriorityQueue, BytePriorityQueues.SynchronizedPriorityQueue, PriorityQueues.EmptyPriorityQueue

public interface BytePriorityQueue
extends PriorityQueue

A type-specific PriorityQueue; provides some additional methods that use polymorphism to reduce type juggling.


Method Summary
 byte dequeueByte()
          Dequeues the first element from the queue.
 void enqueue(byte x)
          Enqueues a new element.
 byte firstByte()
          Returns the front element of the queue.
 byte lastByte()
          Returns the rear element of the queue, that is, the element the would be dequeued last (optional operation).
 
Methods inherited from interface it.unimi.dsi.fastutil.PriorityQueue
changed, clear, comparator, dequeue, enqueue, first, isEmpty, last, size
 

Method Detail

enqueue

public void enqueue(byte x)
Enqueues a new element.

Parameters:
x - the element to enqueue..

dequeueByte

public byte dequeueByte()
Dequeues the first element from the queue.

Returns:
the dequeued element.
Throws:
NoSuchElementException - if the queue is empty.

firstByte

public byte firstByte()
Returns the front element of the queue.

Returns:
the front element.
Throws:
NoSuchElementException - if the queue is empty.

lastByte

public byte lastByte()
Returns the rear element of the queue, that is, the element the would be dequeued last (optional operation).

Returns:
the rear element.
Throws:
NoSuchElementException - if the queue is empty.