Marko A. Rodriguez created TINKERPOP-1203: ---------------------------------------------
Summary: Provide TraverserSet.detach()/attach() methods. Key: TINKERPOP-1203 URL: https://issues.apache.org/jira/browse/TINKERPOP-1203 Project: TinkerPop Issue Type: Improvement Components: process Affects Versions: 3.1.1-incubating Reporter: Marko A. Rodriguez I do this all the time: {code} final TraverserSet<E> traverserSet = new TraverserSet<>(); traversal.getEndStep().forEachRemaining( traverser -> { traverser.detach(); traverserSet.add(traverser) }); return traverserSet {code} Sorta ghetto. Be nice if we had this functionality: {code} traverserSet.detach() {code} We could also provide: {code} traverserSet.attach(Attachable.Method) traverserSet.attach(Predicate<Traverser<S>>, Attachable.Method) // this is important cause you don't want to re-attach paths alot of the time and DetachedVertexProperty has a transient that causes NPEs (hack around). {code} Also, we could then have: {code} Traversal.addStarts(TraverserSet<S>) {code} This would "bulk insert" without iteration by just writing directly to {{ExpandableIterator}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)