Package oracle.spatial.network.lod
Interface PriorityQueue<E extends java.lang.Comparable>
-
- All Known Subinterfaces:
IdentifiablePriorityQueue<E>
- All Known Implementing Classes:
BinaryHeap
,IdentifiableBinaryHeap
public interface PriorityQueue<E extends java.lang.Comparable>
This interface defines the methods supported by a priority queue.- Since:
- 11gR1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Empties the queue.E
deleteMin()
Deletes the minimum element in the queue.E
findMin()
Finds the minimum element in the queue.void
insert(E element)
Inserts an element into the queue.boolean
isEmpty()
Determines whether the queue is empty or not.int
size()
Returns the size of the queue.
-
-
-
Method Detail
-
clear
void clear()
Empties the queue.
-
size
int size()
Returns the size of the queue.- Returns:
-
insert
void insert(E element)
Inserts an element into the queue.- Parameters:
element
-
-
isEmpty
boolean isEmpty()
Determines whether the queue is empty or not.- Returns:
-
findMin
E findMin()
Finds the minimum element in the queue. This method is non-destructive peeking. The queue is left untouched.- Returns:
- the minimum element in the queue. If the queue is empty, return null.
-
deleteMin
E deleteMin()
Deletes the minimum element in the queue.- Returns:
- the minimum element in the queue. If the queue is empty, return null.
-
-