
com.tinkerpop.blueprints.impls.neo4jbatch.Neo4jBatchEdgeIterable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of blueprints-android-neo4jbatch-graph Show documentation
Show all versions of blueprints-android-neo4jbatch-graph Show documentation
Blueprints property graph implementation for the Neo4j batch inserter
The newest version!
package com.tinkerpop.blueprints.impls.neo4jbatch;
import com.tinkerpop.blueprints.CloseableIterable;
import com.tinkerpop.blueprints.Edge;
import org.neo4j.graphdb.index.IndexHits;
import java.util.Iterator;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
class Neo4jBatchEdgeIterable implements CloseableIterable {
private final IndexHits hits;
private final Neo4jBatchGraph graph;
public Neo4jBatchEdgeIterable(final Neo4jBatchGraph graph, final IndexHits hits) {
this.hits = hits;
this.graph = graph;
}
public Iterator iterator() {
return new Iterator() {
private final Iterator itty = hits.iterator();
public void remove() {
itty.remove();
}
public boolean hasNext() {
return hits.hasNext();
}
public Edge next() {
return new Neo4jBatchEdge(graph, itty.next(), null);
}
};
}
public void close() {
hits.close();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy