// Generated by delombok at Sun Nov 06 10:56:35 CET 2022

import com.google.common.collect.ImmutableSet;

public class SingularGuavaSet<T> {
  private ImmutableSet rawTypes;
  private ImmutableSet<Integer> integers;
  private ImmutableSet<T> generics;
  private ImmutableSet<? extends Number> extendsGenerics;

  public static void main(String[] args) {
  }


  @java.lang.SuppressWarnings("all")
  public static abstract class SingularGuavaSetBuilder<T, C extends SingularGuavaSet<T>, B extends SingularGuavaSet.SingularGuavaSetBuilder<T, C, B>> {
    @java.lang.SuppressWarnings("all")
    private com.google.common.collect.ImmutableSet.Builder<java.lang.Object> rawTypes;
    @java.lang.SuppressWarnings("all")
    private com.google.common.collect.ImmutableSet.Builder<Integer> integers;
    @java.lang.SuppressWarnings("all")
    private com.google.common.collect.ImmutableSet.Builder<T> generics;
    @java.lang.SuppressWarnings("all")
    private com.google.common.collect.ImmutableSet.Builder<Number> extendsGenerics;

    @java.lang.SuppressWarnings("all")
    protected abstract B self();

    @java.lang.SuppressWarnings("all")
    public abstract C build();

    @java.lang.SuppressWarnings("all")
    public B rawType(final java.lang.Object rawType) {
      if (this.rawTypes == null) this.rawTypes = com.google.common.collect.ImmutableSet.builder();
      this.rawTypes.add(rawType);
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B rawTypes(final java.lang.Iterable<?> rawTypes) {
      if (rawTypes == null) {
        throw new java.lang.NullPointerException("rawTypes cannot be null");
      }
      if (this.rawTypes == null) this.rawTypes = com.google.common.collect.ImmutableSet.builder();
      this.rawTypes.addAll(rawTypes);
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B clearRawTypes() {
      this.rawTypes = null;
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B integer(final Integer integer) {
      if (this.integers == null) this.integers = com.google.common.collect.ImmutableSet.builder();
      this.integers.add(integer);
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B integers(final java.lang.Iterable<? extends Integer> integers) {
      if (integers == null) {
        throw new java.lang.NullPointerException("integers cannot be null");
      }
      if (this.integers == null) this.integers = com.google.common.collect.ImmutableSet.builder();
      this.integers.addAll(integers);
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B clearIntegers() {
      this.integers = null;
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B generic(final T generic) {
      if (this.generics == null) this.generics = com.google.common.collect.ImmutableSet.builder();
      this.generics.add(generic);
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B generics(final java.lang.Iterable<? extends T> generics) {
      if (generics == null) {
        throw new java.lang.NullPointerException("generics cannot be null");
      }
      if (this.generics == null) this.generics = com.google.common.collect.ImmutableSet.builder();
      this.generics.addAll(generics);
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B clearGenerics() {
      this.generics = null;
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B extendsGeneric(final Number extendsGeneric) {
      if (this.extendsGenerics == null) this.extendsGenerics = com.google.common.collect.ImmutableSet.builder();
      this.extendsGenerics.add(extendsGeneric);
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B extendsGenerics(final java.lang.Iterable<? extends Number> extendsGenerics) {
      if (extendsGenerics == null) {
        throw new java.lang.NullPointerException("extendsGenerics cannot be null");
      }
      if (this.extendsGenerics == null) this.extendsGenerics = com.google.common.collect.ImmutableSet.builder();
      this.extendsGenerics.addAll(extendsGenerics);
      return self();
    }

    @java.lang.SuppressWarnings("all")
    public B clearExtendsGenerics() {
      this.extendsGenerics = null;
      return self();
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public java.lang.String toString() {
      return "SingularGuavaSet.SingularGuavaSetBuilder(rawTypes=" + this.rawTypes + ", integers=" + this.integers + ", generics=" + this.generics + ", extendsGenerics=" + this.extendsGenerics + ")";
    }
  }


  @java.lang.SuppressWarnings("all")
  private static final class SingularGuavaSetBuilderImpl<T> extends SingularGuavaSet.SingularGuavaSetBuilder<T, SingularGuavaSet<T>, SingularGuavaSet.SingularGuavaSetBuilderImpl<T>> {
    @java.lang.SuppressWarnings("all")
    private SingularGuavaSetBuilderImpl() {
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    protected SingularGuavaSet.SingularGuavaSetBuilderImpl<T> self() {
      return this;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public SingularGuavaSet<T> build() {
      return new SingularGuavaSet<T>(this);
    }
  }

  @java.lang.SuppressWarnings("all")
  protected SingularGuavaSet(final SingularGuavaSet.SingularGuavaSetBuilder<T, ?, ?> b) {
    com.google.common.collect.ImmutableSet<java.lang.Object> rawTypes = b.rawTypes == null ? com.google.common.collect.ImmutableSet.<java.lang.Object>of() : b.rawTypes.build();
    this.rawTypes = rawTypes;
    com.google.common.collect.ImmutableSet<Integer> integers = b.integers == null ? com.google.common.collect.ImmutableSet.<Integer>of() : b.integers.build();
    this.integers = integers;
    com.google.common.collect.ImmutableSet<T> generics = b.generics == null ? com.google.common.collect.ImmutableSet.<T>of() : b.generics.build();
    this.generics = generics;
    com.google.common.collect.ImmutableSet<Number> extendsGenerics = b.extendsGenerics == null ? com.google.common.collect.ImmutableSet.<Number>of() : b.extendsGenerics.build();
    this.extendsGenerics = extendsGenerics;
  }

  @java.lang.SuppressWarnings("all")
  public static <T> SingularGuavaSet.SingularGuavaSetBuilder<T, ?, ?> builder() {
    return new SingularGuavaSet.SingularGuavaSetBuilderImpl<T>();
  }
}
