Skip to content

Instantly share code, notes, and snippets.

@okram
Created July 31, 2012 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okram/3218519 to your computer and use it in GitHub Desktop.
Save okram/3218519 to your computer and use it in GitHub Desktop.
public Iterator<Neo4jEdge> iterator() {
final Iterator<Relationship> itty;
if (labels.length > 0)
itty = node.getRelationships(direction, labels).iterator();
else
itty = node.getRelationships(direction).iterator();
return new Iterator<Neo4jEdge>() {
public Neo4jEdge next() {
return new Neo4jEdge(itty.next(), graph);
}
public boolean hasNext() {
return itty.hasNext();
}
public void remove() {
itty.remove();
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment