Skip to content

Instantly share code, notes, and snippets.

@okram
Created Nov 1, 2011
Embed
What would you like to do?
Iterator<Vertex> itty = graph.getIndex(Index.VERTICES, Vertex.class).get("sav_id", 12345);
Vertex savNode;
if(itty.hasNext()) {
savNode = itty.next();
} else {
savNode = graph.addVertex(new HashMap(..)) // the map has the MUST_HAVE requirements
}
// do something with savNode
// to delete
graph.removeVertex(savNode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment