Package it.unimi.dsi.fastutil.floats
Class FloatPriorityQueues.SynchronizedPriorityQueue
java.lang.Object
it.unimi.dsi.fastutil.floats.FloatPriorityQueues.SynchronizedPriorityQueue
- All Implemented Interfaces:
FloatPriorityQueue,it.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
- Enclosing class:
- FloatPriorityQueues
public static class FloatPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements FloatPriorityQueue
A synchronized wrapper class for priority queues.
-
Method Summary
Modifier and Type Method Description voidchanged()voidclear()FloatComparatorcomparator()Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.java.lang.Floatdequeue()Deprecated.floatdequeueFloat()Dequeues the first element from the queue.voidenqueue(float x)Enqueues a new element.voidenqueue(java.lang.Float x)Deprecated.booleanequals(java.lang.Object o)java.lang.Floatfirst()Deprecated.floatfirstFloat()Returns the first element of the queue.inthashCode()booleanisEmpty()java.lang.Floatlast()Deprecated.floatlastFloat()Returns the last element of the queue, that is, the element the would be dequeued last (optional operation).intsize()Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
enqueue
public void enqueue(float x)Description copied from interface:FloatPriorityQueueEnqueues a new element.- Specified by:
enqueuein interfaceFloatPriorityQueue- Parameters:
x- the element to enqueue.- See Also:
PriorityQueue.enqueue(Object)
-
dequeueFloat
public float dequeueFloat()Description copied from interface:FloatPriorityQueueDequeues the first element from the queue.- Specified by:
dequeueFloatin interfaceFloatPriorityQueue- Returns:
- the dequeued element.
- See Also:
FloatPriorityQueue.dequeue()
-
firstFloat
public float firstFloat()Description copied from interface:FloatPriorityQueueReturns the first element of the queue.- Specified by:
firstFloatin interfaceFloatPriorityQueue- Returns:
- the first element.
- See Also:
FloatPriorityQueue.first()
-
lastFloat
public float lastFloat()Description copied from interface:FloatPriorityQueueReturns the last element of the queue, that is, the element the would be dequeued last (optional operation).This default implementation just throws an
UnsupportedOperationException.- Specified by:
lastFloatin interfaceFloatPriorityQueue- Returns:
- the last element.
- See Also:
FloatPriorityQueue.last()
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
-
size
public int size()- Specified by:
sizein interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
-
clear
public void clear()- Specified by:
clearin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
-
changed
public void changed()- Specified by:
changedin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
-
comparator
Description copied from interface:FloatPriorityQueueReturns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.- Specified by:
comparatorin interfaceFloatPriorityQueue- Specified by:
comparatorin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>- Returns:
- the comparator associated with this priority queue.
- See Also:
PriorityQueue.comparator()
-
enqueue
@Deprecated public void enqueue(java.lang.Float x)Deprecated.Description copied from interface:FloatPriorityQueueThis default implementation delegates to the corresponding type-specific method.
- Specified by:
enqueuein interfaceFloatPriorityQueue- Specified by:
enqueuein interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
-
dequeue
@Deprecated public java.lang.Float dequeue()Deprecated.Description copied from interface:FloatPriorityQueueThis default implementation delegates to the corresponding type-specific method.
- Specified by:
dequeuein interfaceFloatPriorityQueue- Specified by:
dequeuein interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
-
first
@Deprecated public java.lang.Float first()Deprecated.Description copied from interface:FloatPriorityQueueThis default implementation delegates to the corresponding type-specific method.
- Specified by:
firstin interfaceFloatPriorityQueue- Specified by:
firstin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
-
last
@Deprecated public java.lang.Float last()Deprecated.Description copied from interface:FloatPriorityQueueThis default implementation delegates to the corresponding type-specific method.
- Specified by:
lastin interfaceFloatPriorityQueue- Specified by:
lastin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Float>
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-