Class ContextAwareTreeNode

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clean()  
      java.util.Set<? extends TreeNode> getChildren()
      Returns the immediate children of this context.
      ContextElement getContext()
      Returns the context information associated with this node.
      java.util.List<? extends TreeNode> getPath()
      Returns the unique rooting path of this context element.
      java.util.Collection<java.util.List<? extends TreeNode>> getPaths()
      Returns the complete set of rooting paths for this context element.
      java.lang.String toTreeString()  
      • Methods inherited from class java.lang.Object

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

      • context

        private final java.lang.Object context
      • wrappedNode

        private final TreeNode wrappedNode
    • Constructor Detail

      • ContextAwareTreeNode

        public ContextAwareTreeNode​(TreeNode node,
                                    java.lang.Object context)
    • Method Detail

      • getChildren

        public java.util.Set<? extends TreeNode> getChildren()
        Description copied from interface: TreeNode
        Returns the immediate children of this context.
        Specified by:
        getChildren in interface TreeNode
        Returns:
        the context children
      • getPath

        public java.util.List<? extends TreeNode> getPath()
                                                   throws java.lang.IllegalStateException
        Description copied from interface: TreeNode
        Returns the unique rooting path of this context element.

        If this context element is not connected to a root in any ContextManager instance or is rooted via multiple distinct paths then an IllegalStateException will be thrown.

        Specified by:
        getPath in interface TreeNode
        Returns:
        the unique rooting path
        Throws:
        java.lang.IllegalStateException - if the context is not uniquely rooted
      • getPaths

        public java.util.Collection<java.util.List<? extends TreeNode>> getPaths()
        Description copied from interface: TreeNode
        Returns the complete set of rooting paths for this context element.
        Specified by:
        getPaths in interface TreeNode
        Returns:
        the set of rooting paths
      • getContext

        public ContextElement getContext()
        Description copied from interface: TreeNode
        Returns the context information associated with this node.
        Specified by:
        getContext in interface TreeNode
        Returns:
        node context information
      • toTreeString

        public java.lang.String toTreeString()
        Specified by:
        toTreeString in interface TreeNode