lv.lumii.layoutengine.flowLayout.horizontalOrdering.pqtree

## Class PNode<T>

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

- Type Parameters:
    `T` - object type

      public class PNode<T>
      extends PQTreeNode<T>

  This class implements P-type node for PQ-Tree data structure.

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addChild(PQTreeNode<T> child)` This method adds child to this node.
    `PQTreeNode<T>` | `getMaxMinSeq()` This method is used for node ordering in algorithm second phase when moving backwards over layers.
    `int` | `getMLValue()` This method gets ML value of this node.
    `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 MLValue)` This method sets ML value of this node.
    `java.lang.String` | `toString()` This method returns string value of this P-node.

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

      `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, update`

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

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

- - ### Constructor Detail

    - #### PNode

          public PNode(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.PNODE`
      Specified by:
        `getType` in class `PQTreeNode<T>`
      Returns:
        integer type value. Types are coded as:
    - `PQTree.CNODE`,
    - `PQTree.QNODE`,
    - `PQTree.PNODE`.
      See Also:
        `PQTree`

    - #### addChild

          public void addChild(PQTreeNode<T> child)

      This method adds child to this node.
      Overrides:
        `addChild` in class `PQTreeNode<T>`
      Parameters:
        `child` - node that will be added as child.

    - #### 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()

      This method gets ML value of this node.
      Returns:
        ML integer value

    - #### setMLValue

          public void setMLValue(int MLValue)

      This method sets ML value of this node.
      Parameters:
        `MLValue` - new ML value.

    - #### toString

          public java.lang.String toString()

      This method returns string value of this P-node.
      Overrides:
        `toString` in class `PQTreeNode<T>`
      Returns:
        string value that is mainly used for debugging.