public class PriorityQueue
extends java.lang.Object
Comparable
objects.Constructor | Description |
---|---|
PriorityQueue() |
Creates a new empty priority queue
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(java.lang.Comparable x) |
Insert into the priority queue.
|
void |
clear() |
Make the priority queue logically empty.
|
boolean |
isEmpty() |
Test if the priority queue is logically empty.
|
java.lang.Object |
poll() |
Remove the smallest item from the priority queue.
|
int |
size() |
Returns size.
|
public void add(java.lang.Comparable x)
x
- the item to insert.public boolean isEmpty()
public int size()
public void clear()
public java.lang.Object poll()
Copyright © 2018. All rights reserved.