public void apply ( Traversal order , Operation operation ) { assert order != null ; switch ( order ) { case LEVEL_ORDER : operation . apply ( this ) ; applyLevelOrder ( order , operation ) ; break ; case PRE_ORDER : operation . apply ( this ) ; for ( PlanNode child : this ) { child . apply ( order , operation ) ; } break ; case POST_ORDER : for ( PlanNode child : this ) { child . apply ( order , operation ) ; } operation . apply ( this ) ; break ; } }
Walk the plan tree starting in the specified traversal order and apply the supplied operation to every plan node .