static HashSet cloneHashSet(Collection set) { if (set == null) ret new HashSet; synchronized(collectionMutex(set)) { HashSet s = new(l(set)); s.addAll(set); ret s; } }