@Contract(mutates = "param1")
  public static <T> boolean retainAll(@NotNull Collection<T> collection, @NotNull Condition<? super T> condition) {
    boolean modified = false;

    for (Iterator<T> iterator = collection.iterator(); iterator.hasNext(); ) {
      T next = iterator.next();
      if (!condition.value(next)) {
        iterator.remove();
        modified = true;
      }
    }

    return modified;
  }
@Contract(mutates = "param1")
  public static <T> boolean retainAll(@NotNull Collection<T> collection, @NotNull Condition<? super T> condition)