tracedsl/src/main/java/io/jaegertracing/analytics/gremlin/Util.java
public static void dfs(Vertex node, Consumer<Vertex> vertexConsumer) {
    vertexConsumer.accept(node);
    Iterator<Edge> edges = node.edges(Direction.OUT, References.CHILD_OF);
    while (edges.hasNext()) {
      Edge edge = edges.next();
      dfs(edge.inVertex(), vertexConsumer);
    }
  }
// Depth first search, we could have a variant with BiConsumer and pass node and parent
Depth first search, we could have a variant with BiConsumer and pass node and parent
Depth first search we could have a variant with BiConsumer and pass node and parent
public static void dfs(Vertex node, Consumer<Vertex> vertexConsumer) {
    vertexConsumer.accept(node);
    Iterator<Edge> edges = node.edges(Direction.OUT, References.CHILD_OF);
    while (edges.hasNext()) {
      Edge edge = edges.next();
      dfs(edge.inVertex(), vertexConsumer);
    }
  }
public static void dfs ( Vertex node , Consumer < Vertex > vertexConsumer ) { vertexConsumer . accept ( node ) ; Iterator < Edge > edges = node . edges ( Direction . OUT , References . CHILD_OF ) ; while ( edges . hasNext ( ) ) { Edge edge = edges . next ( ) ; dfs ( edge . inVertex ( ) , vertexConsumer ) ; } }
Depth first search, we could have a variant with BiConsumer and pass node and parent
Depth first search we could have a variant with BiConsumer and pass node and parent