code: public void traverse(Object root) {
      // Reset the state
      visited.clear();
      toVisit.clear();
  
      if (root == null) return;
  
      addIfNotVisited(root, root.getClass());
      start();
    }
docs: Conducts a breath first search of the object graph.
  
  @param root the object to start at.