lv.lumii.layoutengine.flowLayout.horizontalOrdering.priorityqueue

## Class PriorityQueue<T>

- java.lang.Object
- - lv.lumii.layoutengine.flowLayout.horizontalOrdering.priorityqueue.PriorityQueue<T>

- Type Parameters:
    `T` - the type of the elements of this queue

      public class PriorityQueue<T>
      extends java.lang.Object

  This class implements the priority queue needed for the horizontal ordering algorithm of a layered graph.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PriorityQueue(int initialCapacity, java.util.Comparator<T> comparator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(T o)` Adds element to the priority queue.
    `boolean` | `isEmpty()` This method returns whether priority queue is empty.
    `T` | `removeMin()` This method removes smallest element in queue if there are several equal elements than returns first inserted first.
    `int` | `size()` This method returns element count in priority queue.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PriorityQueue

          public PriorityQueue(int initialCapacity,
                               java.util.Comparator<T> comparator)

  - ### Method Detail

    - #### size

          public int size()

      This method returns element count in priority queue.
      Returns:
        size.

    - #### isEmpty

          public boolean isEmpty()

      This method returns whether priority queue is empty.
      Returns:
        boolean value that is `true` if priority queue is empty.

    - #### removeMin

          public T removeMin()

      This method removes smallest element in queue if there are several equal elements than returns first inserted first.
      Returns:
        removed element.

    - #### add

          public void add(T o)

      Adds element to the priority queue.
      Parameters:
        `o` - element to insert.