private Optional<ProjectedTraverser<S, Object>> createProjectedTraverser(final Traverser.Admin<S> traverser) {
        // this was ProjectedTraverser<S, C> but the projection may not be C in the case of a lambda where a
        // Comparable may not be expected but rather an object that can be compared in any way given a lambda.
        // not sure why this is suddenly an issue but Intellij would not let certain tests pass without this
        // adjustment here.
        final List<Object> projections = new ArrayList<>(this.comparators.size());
        for (final Pair<Traversal.Admin<S, C>, Comparator<C>> pair : this.comparators) {
            final TraversalProduct product = TraversalUtil.produce(traverser, pair.getValue0());
            if (!product.isProductive()) break;
            projections.add(product.get());
        }

        // if a traversal wasn't productive then the sizes wont match and it will filter
        return projections.size() == comparators.size() ? Optional.of(new ProjectedTraverser(traverser, projections)) : Optional.empty();
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java