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.
14 lines
307 B
14 lines
307 B
5 years ago
|
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();
|
||
|
}
|