All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vertexium.util.VerticesToEdgeIdsIterable Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
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 vertices;
    private final Authorizations authorizations;

    public VerticesToEdgeIdsIterable(Iterable 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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy