org.vertexium.util.VerticesToEdgeIdsIterable Maven / Gradle / Ivy
package org.vertexium.util;
import org.vertexium.Authorizations;
import org.vertexium.Direction;
import org.vertexium.Vertex;
import java.util.Iterator;
public class VerticesToEdgeIdsIterable implements Iterable {
private final Iterable extends Vertex> vertices;
private final Authorizations authorizations;
public VerticesToEdgeIdsIterable(Iterable extends Vertex> vertices, Authorizations authorizations) {
this.vertices = vertices;
this.authorizations = authorizations;
}
@Override
public Iterator iterator() {
return new SelectManyIterable(this.vertices) {
@Override
public Iterable getIterable(Vertex vertex) {
return vertex.getEdgeIds(Direction.BOTH, authorizations);
}
}.iterator();
}
}