@Override
    protected Iterator<E> flatMap(final Traverser.Admin<Element> traverser) {
        return this.returnType.equals(PropertyType.VALUE) ?
                traverser.get().values(this.propertyKeys) :
                (Iterator) traverser.get().properties(this.propertyKeys);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesStep.java