@Override
    protected Iterator<E> flatMap(final Traverser.Admin<Vertex> traverser) {
        // not passing GValue to graphs at this point. if a graph wants to support GValue, it should implement
        // its own step to do so. in this way, we keep things backwards compatible and don't force folks to have
        // deal with this until they are ready.
        return Vertex.class.isAssignableFrom(this.returnClass) ?
                (Iterator<E>) traverser.get().vertices(this.direction, this.edgeLabels) :
                (Iterator<E>) traverser.get().edges(this.direction, this.edgeLabels);
    }
Handles the logic of traversing to adjacent vertices or edges given a direction and edge labels for steps like,
{@code out}, {@code in}, {@code both}, {@code outE}, {@code inE}, and {@code bothE}.

@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexStep.java