From: Alex M. <am...@di...> - 2012-11-19 23:23:44
|
Does anyone know a way to reset an entire graph? I tried the following methods and in all cases I got a ConcurrentModificationException. Attempt #1 graph.removeAllEdges( graph.edgeSet() ); graph.removeAllVertices( graph.vertexSet() ); Attempt #2 Set<RelationshipEdge> allEdges = graph.edgeSet(); for ( RelationshipEdge aEdge : allEdges ) { graph.removeEdge( aEdge ); } Attempt #3 Set<RelationshipEdge> allEdges = graph.edgeSet(); allEdges.clear(); Thanks, Alex |