public synchronized Set<NestedCopyInfo> getAndClear() {
    Set<NestedCopyInfo> copy = new HashSet<>(mySet);
    mySet.clear();

    return copy;
  }
public synchronized Set<NestedCopyInfo> getAndClear()