public class PriorityQueue
extends java.lang.Object
Constructor and Description |
---|
PriorityQueue(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
insert(java.lang.String str) |
boolean |
isEmpty() |
static void |
main(java.lang.String[] args) |
java.lang.String |
peek()
Returns the least string in the priority queue without
|
java.lang.String |
remove()
Removes the least string from the priority queue
|
public void insert(java.lang.String str)
str
- string object to be added to the priority queuepublic java.lang.String remove()
public java.lang.String peek()
public boolean isEmpty()
public static void main(java.lang.String[] args)