lv.lumii.layoutengine.flowLayout.horizontalOrdering.pqtree

## Class QNode<T>

- java.lang.Object
- - lv.lumii.layoutengine.flowLayout.horizontalOrdering.pqtree.PQTreeNode<T>
  - - lv.lumii.layoutengine.flowLayout.horizontalOrdering.pqtree.QNode<T>

- Type Parameters:
    `T` - object type

      public class QNode<T>
      extends PQTreeNode<T>

  This class implements Q-type node of PQTree data structure.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `QNode(PQTreeNode<T> parent, PQTree<T> tree)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearMLValues()` This method clears all ML values between all children in this child list.
    `PQTreeNode<T>` | `getMaxMinSeq()` This method is used for node ordering in algorithm second phase when moving backwards over layers.
    `int` | `getMLValue(int index)` This method returns required ML value.
    `int` | `getMLValue(java.lang.Object o)` This method returns ML value from given object to next in child list.
    `int` | `getType()` This method returns int value to represent this node type.
    `char` | `getTypeChar()` This method returns char that represents this node type.
    `PQTreeNode<T>` | `process(boolean isRoot)` This method performs all transformations for this node.
    `void` | `setMLValue(int index, int MLValue, boolean insert)` This method sets ML value between given objects.

    - ### Methods inherited from class lv.lumii.layoutengine.flowLayout.horizontalOrdering.pqtree.PQTreeNode

      `addChild, addChild, clearChildList, getChildIterator, getChildList, getLevel, getMaxSeq, getMinSeq, getParent, getPertQChildrenCount, getTestValue, getTree, isFull, isPertinent, isVisited, removeChild, setEmpty, setLevel, setMaxSeq, setMinSeq, setParent, setParent, setParent, setParent, setTree, setVisited, toString, update`

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

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

- - ### Constructor Detail

    - #### QNode

          public QNode(PQTreeNode<T> parent,
                       PQTree<T> tree)

  - ### Method Detail

    - #### getType

          public int getType()

      This method returns int value to represent this node type. Node type is `PQTree.QNODE`
      Specified by:
        `getType` in class `PQTreeNode<T>`
      Returns:
        integer type value. Types are coded as:
    - `PQTree.CNODE`,
    - `PQTree.QNODE`,
    - `PQTree.PNODE`.
      See Also:
        `PQTree`

    - #### process

          public PQTreeNode<T> process(boolean isRoot)

      This method performs all transformations for this node.
      Specified by:
        `process` in class `PQTreeNode<T>`
      Parameters:
        `isRoot` - represents whether this is root of pertinent tree.
      Returns:
        boolean value that represents successful transformation.

    - #### getTypeChar

          public char getTypeChar()

      This method returns char that represents this node type.
      Specified by:
        `getTypeChar` in class `PQTreeNode<T>`
      Returns:
        char.

    - #### getMaxMinSeq

          public PQTreeNode<T> getMaxMinSeq()

      This method is used for node ordering in algorithm second phase when moving backwards over layers.
      Specified by:
        `getMaxMinSeq` in class `PQTreeNode<T>`
      Returns:
        next node to process.

    - #### getMLValue

          public int getMLValue(int index)

      This method returns required ML value.
      Parameters:
        `index` - returns ML value between index-th and (index + 1)-th child.
      Returns:
        ML value.

    - #### getMLValue

          public int getMLValue(java.lang.Object o)

      This method returns ML value from given object to next in child list.
      Parameters:
        `o` - given object.
      Returns:
        ML value.

    - #### setMLValue

          public void setMLValue(int index,
                                 int MLValue,
                                 boolean insert)

      This method sets ML value between given objects.
      Parameters:
        `index` - place to put new ML value.
        `MLValue` - new ML value.
        `insert` - boolean value that determine whether new value just replace old value or inserts new one.

    - #### clearMLValues

          public void clearMLValues()

      This method clears all ML values between all children in this child list.