Open-source multiplayer game server compatible with the RuneScape client https://www.openrs2.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
openrs2/util/src/main/java/dev/openrs2/util/collect/DisjointSet.java

13 lines
307 B

package dev.openrs2.util.collect;
public interface DisjointSet<T> extends Iterable<DisjointSet.Partition<T>> {
interface Partition<T> extends Iterable<T> {
/* empty */
}
Partition<T> add(T x);
Partition<T> get(T x);
void union(Partition<T> x, Partition<T> y);
int elements();
int partitions();
}