Add toString() method to ForestDisjointSet partitions

master
Graham 5 years ago
parent d57d2fbbab
commit dd2ba3592d
  1. 5
      util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.java

@ -53,6 +53,11 @@ public final class ForestDisjointSet<T> implements DisjointSet<T> {
public int hashCode() {
return find().value.hashCode();
}
@Override
public String toString() {
return find().value.toString();
}
}
private static class NodeIterator<T> implements Iterator<T> {

Loading…
Cancel
Save