private void traverse(Pipeline pipeline,
        final Consumer<? super FilterAction<ENTITY>> filterConsumer
    ) {
        for (Action<?, ?> action : pipeline) {
            if (action instanceof FilterAction) {
                @SuppressWarnings("unchecked")
                final FilterAction<ENTITY> filterAction = (FilterAction<ENTITY>) action;
                if (isContainingOnlyFieldPredicate(filterAction.getPredicate())) {
                    filterConsumer.accept(filterAction);
                }
            } else {
                // We are done. Only initial filters can be optimized
                return;
            }
        }
    }
This Optimizer can take care of the case where there is a mix of Field
predicates and other predicates. Field predicates will be optimized and other
predicates will be applied in the stream.

@author Per Minborg
@param <ENTITY> the entity type
runtime-parent/runtime-core/src/main/java/com/speedment/runtime/core/internal/component/sql/optimizer/InitialFilterOptimizer.java