// Path: src/main/java/io/usethesource/capsule/factory/DefaultSetFactory.java
// public static final DefaultSetFactory FACTORY = new DefaultSetFactory();


import static io.usethesource.capsule.factory.DefaultSetFactory.FACTORY;
import java.util.Collection;
import java.util.Iterator;
import java.util.Optional;

  interface Immutable<K> extends Set<K>, SetEq.Immutable<K> {

    Set.Immutable<K> __insert(final K key);

    Set.Immutable<K> __remove(final K key);

    Set.Immutable<K> __insertAll(final java.util.Set<? extends K> set);

    Set.Immutable<K> __removeAll(final java.util.Set<? extends K> set);

    Set.Immutable<K> __retainAll(final java.util.Set<? extends K> set);

    default Set.Immutable<K> union(Set.Immutable<K> other) {
      return union(this, other);
    }

    default Set.Immutable<K> subtract(Set.Immutable<K> other) {
      return subtract(this, other);
    }

    default Set.Immutable<K> intersect(Set.Immutable<K> other) {
      return intersect(this, other);
    }

    boolean isTransientSupported();

    Set.Transient<K> asTransient();

    static <K> Set.Immutable<K> of() {
// Path: src/main/java/io/usethesource/capsule/factory/DefaultSetFactory.java
// public static final DefaultSetFactory FACTORY = new DefaultSetFactory();


// Path: src/main/java/io/usethesource/capsule/Set.java
import static io.usethesource.capsule.factory.DefaultSetFactory.FACTORY;
import java.util.Collection;
import java.util.Iterator;
import java.util.Optional;


  interface Immutable<K> extends Set<K>, SetEq.Immutable<K> {

    Set.Immutable<K> __insert(final K key);

    Set.Immutable<K> __remove(final K key);

    Set.Immutable<K> __insertAll(final java.util.Set<? extends K> set);

    Set.Immutable<K> __removeAll(final java.util.Set<? extends K> set);

    Set.Immutable<K> __retainAll(final java.util.Set<? extends K> set);

    default Set.Immutable<K> union(Set.Immutable<K> other) {
      return union(this, other);
    }

    default Set.Immutable<K> subtract(Set.Immutable<K> other) {
      return subtract(this, other);
    }

    default Set.Immutable<K> intersect(Set.Immutable<K> other) {
      return intersect(this, other);
    }

    boolean isTransientSupported();

    Set.Transient<K> asTransient();

    static <K> Set.Immutable<K> of() {
      return FACTORY.of();