Class PlaceholderNode

  • All Implemented Interfaces:
    TreeNode

    public class PlaceholderNode
    extends java.lang.Object
    implements TreeNode
    Very simple TreeNode implementation which is placeholder and non-decorable
    • Constructor Summary

      Constructors 
      Constructor Description
      PlaceholderNode()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<TreeNode> children()
      Gets the list of child nodes of this node.
      java.lang.String content()
      Gets the content of this node.
      boolean isDecorable()
      Checks if this node can be decorated.
      boolean isPlaceholder()
      Checks if this node is a placeholder.
      • Methods inherited from class java.lang.Object

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

      • PlaceholderNode

        public PlaceholderNode()
    • Method Detail

      • content

        public java.lang.String content()
        Description copied from interface: TreeNode
        Gets the content of this node.
        Specified by:
        content in interface TreeNode
      • children

        public java.util.List<TreeNode> children()
        Description copied from interface: TreeNode
        Gets the list of child nodes of this node.
        Specified by:
        children in interface TreeNode
      • isDecorable

        public boolean isDecorable()
        Description copied from interface: TreeNode
        Checks if this node can be decorated. By default, decorators should keep non-decorable nodes untouched.
        Specified by:
        isDecorable in interface TreeNode
      • isPlaceholder

        public boolean isPlaceholder()
        Description copied from interface: TreeNode
        Checks if this node is a placeholder. By default, generic TreePrinter implementations hide placeholder nodes. Some types of implementation (e. g. n-ary trees) should take these into account anyway.
        Specified by:
        isPlaceholder in interface TreeNode