public List<PlanNode> findAllAtOrBelow( Traversal order ) {
        assert order != null;
        LinkedList<PlanNode> results = new LinkedList<PlanNode>();
        LinkedList<PlanNode> queue = new LinkedList<PlanNode>();
        queue.add(this);
        while (!queue.isEmpty()) {
            PlanNode aNode = queue.poll();
            switch (order) {
                case LEVEL_ORDER:
                    results.add(aNode);
                    queue.addAll(aNode.getChildren());
                    break;
                case PRE_ORDER:
                    results.add(aNode);
                    queue.addAll(0, aNode.getChildren());
                    break;
                case POST_ORDER:
                    queue.addAll(0, aNode.getChildren());
                    results.addFirst(aNode);
                    break;
            }
        }
        return results;
    }
public List < PlanNode > findAllAtOrBelow ( Traversal order ) { assert order != null ; LinkedList < PlanNode > results = new LinkedList < PlanNode > ( ) ; LinkedList < PlanNode > queue = new LinkedList < PlanNode > ( ) ; queue . add ( this ) ; while ( ! queue . isEmpty ( ) ) { PlanNode aNode = queue . poll ( ) ; switch ( order ) { case LEVEL_ORDER : results . add ( aNode ) ; queue . addAll ( aNode . getChildren ( ) ) ; break ; case PRE_ORDER : results . add ( aNode ) ; queue . addAll ( 0 , aNode . getChildren ( ) ) ; break ; case POST_ORDER : queue . addAll ( 0 , aNode . getChildren ( ) ) ; results . addFirst ( aNode ) ; break ; } } return results ; }
Find all of the nodes that are at or below this node.

@param order the order to traverse; may not be null
@return the collection of nodes that are at or below this node; never null and never empty