パッケージ nlp4j.node

クラス Node<T>

  • 型パラメータ:
    T - Value of this Node
    すべての実装されたインタフェース:
    Cloneable
    直系の既知のサブクラス:
    NodeKeyword

    public class Node<T>
    extends Object
    導入されたバージョン:
    1.3.1.0
    作成者:
    Hiroki Oya
    • フィールドの詳細

      • childrenIndex

        protected int childrenIndex
      • depth

        protected int depth
      • parent

        protected Node<T> parent
      • value

        protected T value
    • コンストラクタの詳細

      • Node

        public Node​(T value)
        パラメータ:
        value - of this node
    • メソッドの詳細

      • addChildNode

        public void addChildNode​(Node<T> childNode)
        パラメータ:
        childNode - for add
      • clone

        public Node<T> clone()
        オーバーライド:
        clone クラス内 Object
      • clonePatterns

        public List<Node<T>> clonePatterns()
        Split Nodes for Pattern Matching
        戻り値:
        cloned Nodes
      • getChildNode

        public Node<T> getChildNode​(int idx)
        パラメータ:
        idx - of Child Node
        戻り値:
        Child Node
      • getChildNodes

        public ArrayList<Node<T>> getChildNodes()
        戻り値:
        child nodes of this node
      • getChildNodesSize

        public int getChildNodesSize()
        戻り値:
        size of child nodes
      • getValue

        public T getValue()
        戻り値:
        value of this node
      • hasNext

        public boolean hasNext()
        戻り値:
        whether this node has next node or next leaf
      • hasNextChild

        protected boolean hasNextChild()
      • match

        public boolean match​(Node<T> target)
        パラメータ:
        target - : node to be matched
        戻り値:
        match result of node
      • matchAll

        public boolean matchAll​(Node<T> target)
        パラメータ:
        target - node for matching
        戻り値:
        match result of all nodes
      • next

        public Node<T> next()
        戻り値:
        Next Node or Next Leaf
      • nextChild

        public Node<T> nextChild()
        戻り値:
        Next Child Node
      • print

        public void print()
        Print Node to System.err
      • removeChild

        public Node<T> removeChild​(int index)
        パラメータ:
        index - of child node
        戻り値:
        removed node or null
      • resetIndex

        public void resetIndex()
        Reset Index Pointer