it.unimi.dsi.fastutil.floats
Interface FloatPriorityQueue

All Superinterfaces:
PriorityQueue<Float>
All Known Implementing Classes:
AbstractFloatPriorityQueue, FloatArrayFIFOQueue, FloatArrayPriorityQueue, FloatHeapPriorityQueue, FloatPriorityQueues.SynchronizedPriorityQueue

public interface FloatPriorityQueue
extends PriorityQueue<Float>

A type-specific PriorityQueue; provides some additional methods that use polymorphism to avoid (un)boxing.

Additionally, this interface strengthens comparator().


Method Summary
 FloatComparator comparator()
          Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
 float dequeueFloat()
          Dequeues the first element from the queue.
 void enqueue(float x)
          Enqueues a new element.
 float firstFloat()
          Returns the first element of the queue.
 float lastFloat()
          Returns the last 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, dequeue, enqueue, first, isEmpty, last, size
 

Method Detail

enqueue

void enqueue(float x)
Enqueues a new element.

Parameters:
x - the element to enqueue.

dequeueFloat

float dequeueFloat()
Dequeues the first element from the queue.

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

firstFloat

float firstFloat()
Returns the first element of the queue.

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

lastFloat

float lastFloat()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).

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

comparator

FloatComparator comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.

Note that this specification strengthens the one given in PriorityQueue.comparator().

Specified by:
comparator in interface PriorityQueue<Float>
Returns:
the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
See Also:
PriorityQueue.comparator()


Copyright © 2011. All Rights Reserved.