@Override
    protected Map<String, E> map(final Traverser.Admin<S> traverser) {
        final Map<String, E> end = new LinkedHashMap<>(this.projectKeys.size(), 1.0f);
        for (final String projectKey : this.projectKeys) {
            TraversalUtil.produce(traverser, this.traversalRing.next()).ifProductive(p -> end.put(projectKey, (E) p));
        }
        this.traversalRing.reset();
        return end;
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProjectStep.java