Package it.unimi.dsi.fastutil.chars
Class CharPriorityQueues.SynchronizedPriorityQueue
java.lang.Object
it.unimi.dsi.fastutil.chars.CharPriorityQueues.SynchronizedPriorityQueue
- All Implemented Interfaces:
CharPriorityQueue,it.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
- Enclosing class:
- CharPriorityQueues
public static class CharPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements CharPriorityQueue
A synchronized wrapper class for priority queues.
-
Method Summary
Modifier and Type Method Description voidchanged()voidclear()CharComparatorcomparator()Returns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.java.lang.Characterdequeue()Deprecated.chardequeueChar()Dequeues the first element from the queue.voidenqueue(char x)Enqueues a new element.voidenqueue(java.lang.Character x)Deprecated.booleanequals(java.lang.Object o)java.lang.Characterfirst()Deprecated.charfirstChar()Returns the first element of the queue.inthashCode()booleanisEmpty()java.lang.Characterlast()Deprecated.charlastChar()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(char x)Description copied from interface:CharPriorityQueueEnqueues a new element.- Specified by:
enqueuein interfaceCharPriorityQueue- Parameters:
x- the element to enqueue.- See Also:
PriorityQueue.enqueue(Object)
-
dequeueChar
public char dequeueChar()Description copied from interface:CharPriorityQueueDequeues the first element from the queue.- Specified by:
dequeueCharin interfaceCharPriorityQueue- Returns:
- the dequeued element.
- See Also:
CharPriorityQueue.dequeue()
-
firstChar
public char firstChar()Description copied from interface:CharPriorityQueueReturns the first element of the queue.- Specified by:
firstCharin interfaceCharPriorityQueue- Returns:
- the first element.
- See Also:
CharPriorityQueue.first()
-
lastChar
public char lastChar()Description copied from interface:CharPriorityQueueReturns 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:
lastCharin interfaceCharPriorityQueue- Returns:
- the last element.
- See Also:
CharPriorityQueue.last()
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
-
size
public int size()- Specified by:
sizein interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
-
clear
public void clear()- Specified by:
clearin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
-
changed
public void changed()- Specified by:
changedin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
-
comparator
Description copied from interface:CharPriorityQueueReturns the comparator associated with this priority queue, or null if it uses its elements' natural ordering.- Specified by:
comparatorin interfaceCharPriorityQueue- Specified by:
comparatorin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>- Returns:
- the comparator associated with this priority queue.
- See Also:
PriorityQueue.comparator()
-
enqueue
@Deprecated public void enqueue(java.lang.Character x)Deprecated.Description copied from interface:CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
- Specified by:
enqueuein interfaceCharPriorityQueue- Specified by:
enqueuein interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
-
dequeue
@Deprecated public java.lang.Character dequeue()Deprecated.Description copied from interface:CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
- Specified by:
dequeuein interfaceCharPriorityQueue- Specified by:
dequeuein interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
-
first
@Deprecated public java.lang.Character first()Deprecated.Description copied from interface:CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
- Specified by:
firstin interfaceCharPriorityQueue- Specified by:
firstin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
-
last
@Deprecated public java.lang.Character last()Deprecated.Description copied from interface:CharPriorityQueueThis default implementation delegates to the corresponding type-specific method.
- Specified by:
lastin interfaceCharPriorityQueue- Specified by:
lastin interfaceit.unimi.dsi.fastutil.PriorityQueue<java.lang.Character>
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-