java.lang.Object
cz.fidentis.analyst.engines.face.batch.clustering.dto.ClusterNode

public class ClusterNode extends Object
  • Constructor Details

    • ClusterNode

      public ClusterNode(String name)
      Creates new instance of ClusterNode.
      Parameters:
      name - name of the node
  • Method Details

    • addLeafName

      public void addLeafName(String leafName)
      Adds leaf name to the node.
      Parameters:
      leafName - name of the leaf
    • appendLeafNames

      public void appendLeafNames(List<String> names)
      Appends list of leaf names to the node.
      Parameters:
      names - list of leaf names
    • addChild

      public void addChild(ClusterNode child)
      Adds child to the node.
      Parameters:
      child - child node
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • setParent

      public void setParent(ClusterNode parent)
    • getLeafNames

      public List<String> getLeafNames()
    • getDistance

      public Distance getDistance()
    • setDistance

      public void setDistance(Distance distance)
    • getParent

      public ClusterNode getParent()
    • getChildren

      public List<ClusterNode> getChildren()
    • getLeftChild

      public ClusterNode getLeftChild()
      Returns left child of the node.
      Returns:
      left child of the node or null if the node has no children.
    • getRightChild

      public ClusterNode getRightChild()
      Returns right child of the node.
      Returns:
      right child of the node or null if the node has no children or if the node has only one child.
    • removeChild

      public void removeChild(ClusterNode child)
      Removes child from list of children
      Parameters:
      child - child to be removed
    • removeLeafName

      public void removeLeafName(String leafName)
      Removes leaf name from list of leaf names
      Parameters:
      leafName - leaf name to be removed
    • removeChildren

      public void removeChildren()
      Removes all children from list of children
    • toString

      public String toString()
      Overrides:
      toString in class Object