JTS Topology Suite - v 1.12

## com.vividsolutions.jts.util
Class PriorityQueue

    java.lang.Object
      com.vividsolutions.jts.util.PriorityQueue

    public class PriorityQueue

extends java.lang.Object

A priority queue over a set of `Comparable` objects.

Author:
  Martin Davis

Constructor Summary
`PriorityQueue()` Creates a new empty priority queue

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PriorityQueue

    public PriorityQueue()

  Creates a new empty priority queue

Method Detail

### add

    public void add(java.lang.Comparable x)

  Insert into the priority queue. Duplicates are allowed.

  Parameters:
    `x` - the item to insert.

### isEmpty

    public boolean isEmpty()

  Test if the priority queue is logically empty.

  Returns:
    true if empty, false otherwise.

### size

    public int size()

  Returns size.

  Returns:
    current size.

### clear

    public void clear()

  Make the priority queue logically empty.

### poll

    public java.lang.Object poll()

  Remove the smallest item from the priority queue.

  Returns:
    the smallest item.

JTS Topology Suite - v 1.12