public static @NotNull <T> IntSet map2IntSet(@NotNull Collection<? extends T> collection, @NotNull ToIntFunction<? super T> function) {
    IntOpenHashSet result = new IntOpenHashSet();
    for (T t : collection) {
      result.add(function.applyAsInt(t));
    }
    return result;
  }
public static @NotNull <T> IntSet map2IntSet(@NotNull Collection<? extends T> collection, @NotNull ToIntFunction<? super T> function)