Class MockTreeNode

  • All Implemented Interfaces:
    TreeNode, java.lang.Comparable

    public class MockTreeNode
    extends java.lang.Object
    implements TreeNode, java.lang.Comparable
    • Field Detail

      • str

        public java.lang.String str
    • Constructor Detail

      • MockTreeNode

        public MockTreeNode​(java.lang.String str)
      • MockTreeNode

        public MockTreeNode​(java.lang.String str,
                            TreeNode... child)
    • Method Detail

      • getName

        public java.lang.String getName()
      • getId

        public java.lang.String getId()
        Description copied from interface: TreeNode
        Returns id of the current node
        Specified by:
        getId in interface TreeNode
        Returns:
        String Node id
      • getTreeChildren

        public java.util.Collection<TreeNode> getTreeChildren()
        Description copied from interface: TreeNode
        Returns a Collection of TreeNode children of the current node
        Specified by:
        getTreeChildren in interface TreeNode
        Returns:
        Collection of TreeNode
      • getTreeParent

        public TreeNode getTreeParent()
        Description copied from interface: TreeNode
        Returns parent of the current node
        Specified by:
        getTreeParent in interface TreeNode
        Returns:
        TreeNode parent Node
      • isTreeLeaf

        public boolean isTreeLeaf()
        Description copied from interface: TreeNode
        Returns boolean true if the TreeNode is a leaf
        Specified by:
        isTreeLeaf in interface TreeNode
        Returns:
        boolean indicating if node is leaf or node
      • isTreeNode

        public boolean isTreeNode()
        Description copied from interface: TreeNode
        Returns boolean true if the TreeNode is a node
        Specified by:
        isTreeNode in interface TreeNode
        Returns:
        boolean indicating if node is leaf or node
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(java.lang.Object o)
        Specified by:
        compareTo in interface java.lang.Comparable
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getTreeRoot

        public TreeNode getTreeRoot()
        Description copied from interface: TreeNode
        Returns the root of the current node
        Specified by:
        getTreeRoot in interface TreeNode
        Returns:
        TreeNode root Node