Is there any difference between
Approach 1:
TraversalDescription one = new TraversalDescriptionImpl();
one = one.breadthFirst()
.relationships(RelType.KNOWS, Direction.OUTGOING)
.evaluator(Evaluators.excludeStartPosition());
Traverser t1 = one.traverse(node);
Approach 2:
TraversalDescription two = Traversal.description()
.breadthFirst()
.relationships(RelType.KNOWS, Direction.OUTGOING)
.evaluator(Evaluators.excludeStartPosition());
Traverser t2 = one.traverse(node);
Both Traversers seem to deliver the same results. Is there one approach preferred over another? When and why?
An object of the class
TraversalDescriptionImplis what the factory classTraversalwill return when callingTraversal.description(). Snipped from theTraversalclass source:Hence,
is the same as