public @NotNull List<@NotNull T> copyAndClear() {
    synchronized (myList) {
      List<T> result = toStrongList();
      clear();
      return result;
    }
  }
public @NotNull List<@NotNull T> copyAndClear()