public abstract class PriorityQueue
extends java.lang.Object
Constructor and Description |
---|
PriorityQueue() |
Modifier and Type | Method and Description |
---|---|
abstract void |
clear()
Removes all values from this priority queue.
|
abstract boolean |
contains(char value)
Returns
true if this queue contains the specified value. |
abstract CharIterator |
iterator()
Returns an iterator of the values in this priority queue.
|
abstract void |
offer(char value)
Inserts the value into this priority queue.
|
abstract char |
peek()
Retrieves, but does not remove, the head of this queue, or returns
0 if this queue is empty. |
abstract char |
poll()
Retrieves and removes the head of this priority queue, or returns
0 if this queue is empty. |
abstract boolean |
remove(char value)
Removes a single instance of the specified character from this queue, if it is present.
|
abstract int |
size()
Returns the number of values in this priority queue.
|
public abstract void offer(char value)
java.lang.IllegalArgumentException
- if the specified value is a character different than the lowercase letters a to z.public abstract char poll()
0
if this queue is empty.public abstract int size()
public abstract CharIterator iterator()
public abstract void clear()
public abstract char peek()
0
if this queue is empty.public abstract boolean remove(char value)
true
if and only if the queue contained the specified value (or in other words, if this queue changed as a result of the call).java.lang.IllegalArgumentException
- if the specified value is a character different than the lowercase letters a to z.public abstract boolean contains(char value)
true
if this queue contains the specified value.java.lang.IllegalArgumentException
- if the specified value is a character different than the lowercase letters a to z.