sclass PtSet extends java.util.AbstractSet { final CompactLongSet set; *() { set = new CompactLongSet; } *(int size) { set = new CompactLongSet(size); } *(Iterable l) { this(); if (l != null) for (Pt p : l) add(p); } *(Cl l) { this(l(l)); if (l != null) for (Pt p : l) add(p); } public int size() { ret set.size(); } @Override public bool contains(O o) { ret contains(o/Pt); } public bool contains(Pt p) { ret set.contains(ptToLong(p)); } public bool contains(int x, int y) { ret set.contains(ptToLong(x, y)); } public bool add(Pt p) { ret set.add(ptToLong(p)); } public bool add(int x, int y) { ret set.add(ptToLong(x, y)); } public bool remove(Pt p) { ret set.remove(ptToLong(p)); } public bool remove(int x, int y) { ret set.remove(ptToLong(x, y)); } public void clear { set.clear(); } public Iterator iterator() { RenamedLongIterator it = set.iterator(); ret new ItIt { public bool hasNext() { ret it.hasNext(); } public Pt next() { ret ptFromLong(it.nextLong()); } public void remove() { it.remove(); } }; } }