diff --git a/util/src/main/java/dev/openrs2/util/collect/DisjointSet.kt b/util/src/main/java/dev/openrs2/util/collect/DisjointSet.kt index 0247783442..1b90cdb1fb 100644 --- a/util/src/main/java/dev/openrs2/util/collect/DisjointSet.kt +++ b/util/src/main/java/dev/openrs2/util/collect/DisjointSet.kt @@ -3,9 +3,10 @@ package dev.openrs2.util.collect interface DisjointSet : Iterable> { interface Partition : Iterable + val elements: Int + val partitions: Int + fun add(x: T): Partition operator fun get(x: T): Partition? fun union(x: Partition, y: Partition) - fun elements(): Int - fun partitions(): Int } 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 96affc7fc3..167352baf3 100644 --- a/util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.java +++ b/util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.java @@ -154,12 +154,12 @@ public final class ForestDisjointSet implements DisjointSet { } @Override - public int elements() { + public int getElements() { return elements; } @Override - public int partitions() { + public int getPartitions() { return partitions; }