Class NodeEditor


  • public final class NodeEditor
    extends Object
    This class is no longer really an editor. Those methods have been moved over to PlanNode. TODO: rename NodeFinder or merge completely with PlanNode
    • Method Detail

      • removeChildNode

        public static final void removeChildNode​(PlanNode parent,
                                                 PlanNode child)
        all of child's children become children of parent
      • findNodePreOrder

        public static final PlanNode findNodePreOrder​(PlanNode root,
                                                      int types)
      • findNodePreOrder

        public static final PlanNode findNodePreOrder​(PlanNode root,
                                                      int types,
                                                      int stopTypes)
      • findParent

        public static final PlanNode findParent​(PlanNode root,
                                                int types)
      • findParent

        public static final PlanNode findParent​(PlanNode root,
                                                int types,
                                                int stopTypes)
        Return the first parent node of the given type stopping at the given nodes. The matching will start at the parent of the node passed in.
        Parameters:
        root -
        types - a bitwise and of type values
        stopTypes - a bitwise and of type values to stop at
        Returns:
        the matching parent, or null one is not found
      • findAllNodes

        public static final List<PlanNode> findAllNodes​(PlanNode root,
                                                        int types,
                                                        int stopTypes)
        Find all nodes of a type, starting at the root of a tree or subtree of PlanNodes and searching downward, but not searching past nodes of type equal to stopType.
        Parameters:
        root - the top node of the subtree, the point at which searching begins
        types - the types of the node to search for
        stopTypes - type of nodes not to search past
        Returns:
        Collection of found PlanNodes
        Since:
        4.2