code: @Override
      public Iterator<Vertex> vertices(Direction direction) {
          // transaction should be ready for io operations
          graph.tx().readWrite();
          // out direction
          if (direction == Direction.OUT)
              return Stream.of((Vertex)out).iterator();
          // in direction
          if (direction == Direction.IN)
              return Stream.of((Vertex)in).iterator();
          // both
          return Stream.of((Vertex)out, in).iterator();
      }
docs: {@inheritDoc}