@Override
    protected boolean filter(final Traverser.Admin<S> traverser) {
        final TraversalProduct product = null == this.startKey ?
                TraversalUtil.produce(traverser, this.traversalRing.next()) :
                TraversalUtil.produce((S) this.getSafeScopeValue(Pop.last, this.startKey, traverser), this.traversalRing.next());

        final boolean predicateValuesProductive = this.setPredicateValues(this.predicate, traverser, this.selectKeys.iterator());
        this.traversalRing.reset();

        return product.isProductive() && predicateValuesProductive && this.predicate.test(product.get());
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WherePredicateStep.java