com.tinkerpop.frames.structures.FramedVertexIterable Maven / Gradle / Ivy
Go to download
Windup Frames is an extension of the upstream Frames project, with tools to ease debugging and integration within windup.
package com.tinkerpop.frames.structures;
import com.tinkerpop.blueprints.Graph;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.frames.FramedGraph;
import java.util.Iterator;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class FramedVertexIterable implements Iterable {
protected final Class kind;
protected final Iterable iterable;
protected final FramedGraph extends Graph> framedGraph;
public FramedVertexIterable(final FramedGraph extends Graph> framedGraph, final Iterable iterable, final Class kind) {
this.framedGraph = framedGraph;
this.iterable = iterable;
this.kind = kind;
}
public Iterator iterator() {
return new Iterator() {
private Iterator iterator = iterable.iterator();
public void remove() {
throw new UnsupportedOperationException();
}
public boolean hasNext() {
return this.iterator.hasNext();
}
public T next() {
return framedGraph.frame(this.iterator.next(), kind);
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy