static LongTreeSet longTreeSetWithComparator(Comparator comparator) { ret new LongTreeSet { public int compare(long a, long b) { ret comparator.compare(a, b); } }; } ifclass LongComparator static LongTreeSet longTreeSetWithComparator(LongComparator comparator) { ret new LongTreeSet { public int compare(long a, long b) { ret comparator.compare(a, b); } }; } endif