@Override
    public Iterator<Vertex> vertices(final Direction direction) {
        if (direction.equals(Direction.OUT))
            return IteratorUtils.of(this.outVertex);
        else if (direction.equals(Direction.IN))
            return IteratorUtils.of(this.inVertex);
        else
            return IteratorUtils.of(this.outVertex, this.inVertex);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceEdge.java