|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.PriorityQueues.EmptyPriorityQueue
An immutable class representing the empty priority queue and implementing all type-specific priority queue interfaces.
This class may be useful to implement your own in case you subclass a type-specific priority queue.
Field Summary | |
static long |
serialVersionUID
|
Method Summary | |
void |
changed()
Notifies the queue that the first element has changed (optional operation). |
void |
clear()
Removes all elements from this queue. |
Comparator |
comparator()
Returns the comparator associated with this queue, or null if it uses its elements' natural ordering. |
Object |
dequeue()
Dequeues the first() element from the queue. |
byte |
dequeueByte()
Dequeues the first element from the queue. |
char |
dequeueChar()
Dequeues the first element from the queue. |
double |
dequeueDouble()
Dequeues the first element from the queue. |
float |
dequeueFloat()
Dequeues the first element from the queue. |
int |
dequeueInt()
Dequeues the first element from the queue. |
long |
dequeueLong()
Dequeues the first element from the queue. |
short |
dequeueShort()
Dequeues the first element from the queue. |
void |
enqueue(byte k)
Enqueues a new element. |
void |
enqueue(char k)
Enqueues a new element. |
void |
enqueue(double k)
Enqueues a new element. |
void |
enqueue(float k)
Enqueues a new element. |
void |
enqueue(int k)
Enqueues a new element. |
void |
enqueue(long k)
Enqueues a new element. |
void |
enqueue(Object ok)
Enqueues a new element. |
void |
enqueue(short k)
Enqueues a new element. |
Object |
first()
Returns the first element of the queue. |
byte |
firstByte()
Returns the front element of the queue. |
char |
firstChar()
Returns the front element of the queue. |
double |
firstDouble()
Returns the front element of the queue. |
float |
firstFloat()
Returns the front element of the queue. |
int |
firstInt()
Returns the front element of the queue. |
long |
firstLong()
Returns the front element of the queue. |
short |
firstShort()
Returns the front element of the queue. |
boolean |
isEmpty()
Checks whether the queue is empty. |
Object |
last()
Returns the last element of the queue, that is, the element the would be dequeued last (optional operation). |
byte |
lastByte()
Returns the rear element of the queue, that is, the element the would be dequeued last (optional operation). |
char |
lastChar()
Returns the rear element of the queue, that is, the element the would be dequeued last (optional operation). |
double |
lastDouble()
Returns the rear element of the queue, that is, the element the would be dequeued last (optional operation). |
float |
lastFloat()
Returns the rear element of the queue, that is, the element the would be dequeued last (optional operation). |
int |
lastInt()
Returns the rear element of the queue, that is, the element the would be dequeued last (optional operation). |
long |
lastLong()
Returns the rear element of the queue, that is, the element the would be dequeued last (optional operation). |
short |
lastShort()
Returns the rear 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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long serialVersionUID
Method Detail |
public void enqueue(Object ok)
PriorityQueue
enqueue
in interface PriorityQueue
ok
- the element to enqueue..public void enqueue(byte k)
BytePriorityQueue
enqueue
in interface BytePriorityQueue
k
- the element to enqueue..public void enqueue(char k)
CharPriorityQueue
enqueue
in interface CharPriorityQueue
k
- the element to enqueue..public void enqueue(short k)
ShortPriorityQueue
enqueue
in interface ShortPriorityQueue
k
- the element to enqueue..public void enqueue(int k)
IntPriorityQueue
enqueue
in interface IntPriorityQueue
k
- the element to enqueue..public void enqueue(long k)
LongPriorityQueue
enqueue
in interface LongPriorityQueue
k
- the element to enqueue..public void enqueue(float k)
FloatPriorityQueue
enqueue
in interface FloatPriorityQueue
k
- the element to enqueue..public void enqueue(double k)
DoublePriorityQueue
enqueue
in interface DoublePriorityQueue
k
- the element to enqueue..public Object dequeue()
PriorityQueue
PriorityQueue.first()
element from the queue.
dequeue
in interface PriorityQueue
public byte dequeueByte()
BytePriorityQueue
dequeueByte
in interface BytePriorityQueue
public char dequeueChar()
CharPriorityQueue
dequeueChar
in interface CharPriorityQueue
public short dequeueShort()
ShortPriorityQueue
dequeueShort
in interface ShortPriorityQueue
public int dequeueInt()
IntPriorityQueue
dequeueInt
in interface IntPriorityQueue
public long dequeueLong()
LongPriorityQueue
dequeueLong
in interface LongPriorityQueue
public float dequeueFloat()
FloatPriorityQueue
dequeueFloat
in interface FloatPriorityQueue
public double dequeueDouble()
DoublePriorityQueue
dequeueDouble
in interface DoublePriorityQueue
public Object first()
PriorityQueue
first
in interface PriorityQueue
public byte firstByte()
BytePriorityQueue
firstByte
in interface BytePriorityQueue
public char firstChar()
CharPriorityQueue
firstChar
in interface CharPriorityQueue
public short firstShort()
ShortPriorityQueue
firstShort
in interface ShortPriorityQueue
public int firstInt()
IntPriorityQueue
firstInt
in interface IntPriorityQueue
public long firstLong()
LongPriorityQueue
firstLong
in interface LongPriorityQueue
public float firstFloat()
FloatPriorityQueue
firstFloat
in interface FloatPriorityQueue
public double firstDouble()
DoublePriorityQueue
firstDouble
in interface DoublePriorityQueue
public Object last()
PriorityQueue
last
in interface PriorityQueue
public byte lastByte()
BytePriorityQueue
lastByte
in interface BytePriorityQueue
public char lastChar()
CharPriorityQueue
lastChar
in interface CharPriorityQueue
public short lastShort()
ShortPriorityQueue
lastShort
in interface ShortPriorityQueue
public int lastInt()
IntPriorityQueue
lastInt
in interface IntPriorityQueue
public long lastLong()
LongPriorityQueue
lastLong
in interface LongPriorityQueue
public float lastFloat()
FloatPriorityQueue
lastFloat
in interface FloatPriorityQueue
public double lastDouble()
DoublePriorityQueue
lastDouble
in interface DoublePriorityQueue
public Comparator comparator()
PriorityQueue
null
if it uses its elements' natural ordering.
comparator
in interface PriorityQueue
null
if it uses its elements' natural ordering.public void changed()
PriorityQueue
changed
in interface PriorityQueue
public int size()
PriorityQueue
size
in interface PriorityQueue
public void clear()
PriorityQueue
clear
in interface PriorityQueue
public boolean isEmpty()
PriorityQueue
isEmpty
in interface PriorityQueue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |