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