From dd2ba3592d6af91d6ae3434b7dc4d0c07bda0053 Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 9 Aug 2019 20:33:38 +0100 Subject: [PATCH] Add toString() method to ForestDisjointSet partitions --- .../java/dev/openrs2/util/collect/ForestDisjointSet.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.java b/util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.java index dbedaaba..96affc7f 100644 --- a/util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.java +++ b/util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.java @@ -53,6 +53,11 @@ public final class ForestDisjointSet implements DisjointSet { public int hashCode() { return find().value.hashCode(); } + + @Override + public String toString() { + return find().value.toString(); + } } private static class NodeIterator implements Iterator {