import java.util.*; // Sort any array of things (of type T) public class Sort { TreeSet things; public Sort(T[] stuff, Comparator compareThus) { things = new TreeSet (compareThus); for (T x : stuff) things.add(x); } public Sort(T[] stuff) { things = new TreeSet (); for (T x : stuff) things.add(x); } public void print() { for (T x : things) System.out.println(x); } }