public Iterator < Operator < Term > > getChildren ( boolean reverse ) { if ( ( traverser != null ) && ( traverser instanceof ClauseTraverser ) ) { return ( ( ClauseTraverser ) traverser ) . traverse ( this , reverse ) ; } else { LinkedList < Operator < Term >> resultList = null ; if ( ! reverse ) { resultList = new LinkedList < Operator < Term > > ( ) ; } else { resultList = new StackQueue < Operator < Term > > ( ) ; } if ( head != null ) { resultList . add ( head ) ; } if ( body != null ) { for ( Term bodyTerm : body ) { resultList . add ( bodyTerm ) ; } } return resultList . iterator ( ) ; } }
Provides an iterator over the child terms if there are any . Only functors and clauses are compound and build across a list of child arguments .