@Override
        public N next() {
            N current = this.queue.remove();
            for (N neighbor : this.graph.successors(current)) {
                if (this.visited.add(neighbor)) {
                    this.queue.add(neighbor);
                }
            }
            return current;
        }
Returns an unmodifiable {@code Iterable} over the nodes reachable from
{@code startNode}, in the order defined by the {@code algorithm}.

@param graph the graph
@param startNode the start node
@param <N> the node type
@return the traversal
common/src/main/java/me/lucko/luckperms/common/graph/TraversalAlgorithm.java