public static class FloatPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements FloatPriorityQueue
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.
|
FloatComparator |
comparator()
Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.
|
java.lang.Float |
dequeue()
Deprecated.
|
float |
dequeueFloat()
Dequeues the first element from the queue.
|
void |
enqueue(float x)
Enqueues a new element.
|
void |
enqueue(java.lang.Float x)
Deprecated.
|
boolean |
equals(java.lang.Object o) |
java.lang.Float |
first()
Deprecated.
|
float |
firstFloat()
Returns the first element of the queue.
|
int |
hashCode() |
boolean |
isEmpty()
Checks whether this queue is empty.
|
java.lang.Float |
last()
Deprecated.
|
float |
lastFloat()
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(float x)
FloatPriorityQueue
enqueue
in interface FloatPriorityQueue
x
- the element to enqueue.PriorityQueue.enqueue(Object)
public float dequeueFloat()
FloatPriorityQueue
dequeueFloat
in interface FloatPriorityQueue
FloatPriorityQueue.dequeue()
public float firstFloat()
FloatPriorityQueue
firstFloat
in interface FloatPriorityQueue
FloatPriorityQueue.first()
public float lastFloat()
FloatPriorityQueue
This default implementation just throws an UnsupportedOperationException
.
lastFloat
in interface FloatPriorityQueue
FloatPriorityQueue.last()
public boolean isEmpty()
PriorityQueue
This default implementation checks whether PriorityQueue.size()
is zero.
isEmpty
in interface PriorityQueue<java.lang.Float>
public int size()
PriorityQueue
size
in interface PriorityQueue<java.lang.Float>
public void clear()
PriorityQueue
clear
in interface PriorityQueue<java.lang.Float>
public void changed()
PriorityQueue
This default implementation just throws an UnsupportedOperationException
.
changed
in interface PriorityQueue<java.lang.Float>
public FloatComparator comparator()
FloatPriorityQueue
comparator
in interface FloatPriorityQueue
comparator
in interface PriorityQueue<java.lang.Float>
PriorityQueue.comparator()
@Deprecated public void enqueue(java.lang.Float x)
FloatPriorityQueue
This default implementation delegates to the corresponding type-specific method.
enqueue
in interface FloatPriorityQueue
enqueue
in interface PriorityQueue<java.lang.Float>
x
- the element to enqueue.@Deprecated public java.lang.Float dequeue()
FloatPriorityQueue
This default implementation delegates to the corresponding type-specific method.
dequeue
in interface FloatPriorityQueue
dequeue
in interface PriorityQueue<java.lang.Float>
@Deprecated public java.lang.Float first()
FloatPriorityQueue
This default implementation delegates to the corresponding type-specific method.
first
in interface FloatPriorityQueue
first
in interface PriorityQueue<java.lang.Float>
@Deprecated public java.lang.Float last()
FloatPriorityQueue
This default implementation just throws an UnsupportedOperationException
.
This default implementation delegates to the corresponding type-specific method.
last
in interface FloatPriorityQueue
last
in interface PriorityQueue<java.lang.Float>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object