}
static public class TreeSetSerializer extends CollectionSerializer {
public void write (Kryo kryo, Output output, Collection collection) {
TreeSet treeSet = (TreeSet)collection;
kryo.writeClassAndObject(output, treeSet.comparator());
super.write(kryo, output, collection);
}
protected TreeSet create (Kryo kryo, Input input, Class<Collection> type) {
return new TreeSet((Comparator)kryo.readClassAndObject(input));