Class CmsTreeNode<T>

  • Type Parameters:
    T - the type of data associated with the tree node

    public class CmsTreeNode<T>
    extends java.lang.Object
    Generic tree node which can contain an object of generic type T as data, and which has a mutable list of child nodes.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsTreeNode()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addChild​(CmsTreeNode<T> cmsTreeNode)
      Adds a child node.
      void addDataInPreOrder​(java.util.List<T> result)
      Adds the enclosed data of this node and its children to the given list, in preorder.
      java.util.List<CmsTreeNode<T>> getChildren()
      Gets the (mutable) list of child nodes.
      T getData()
      Gets the data associated with this node.
      void setData​(T data)
      Sets the data for this node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addChild

        public void addChild​(CmsTreeNode<T> cmsTreeNode)
        Adds a child node.

        Parameters:
        cmsTreeNode - the child node to add
      • addDataInPreOrder

        public void addDataInPreOrder​(java.util.List<T> result)
        Adds the enclosed data of this node and its children to the given list, in preorder.
        Parameters:
        result - the list to add the data to
      • getChildren

        public java.util.List<CmsTreeNode<T>> getChildren()
        Gets the (mutable) list of child nodes.

        Returns:
        the list of child nodes
      • getData

        public T getData()
        Gets the data associated with this node.

        Returns:
        the data for this node
      • setData

        public void setData​(T data)
        Sets the data for this node.

        Parameters:
        data - the data to set