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

import java.util.NavigableSet;

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


	@java.lang.SuppressWarnings("all")
	public static abstract class SingularNavigableSetBuilder<T, C extends SingularNavigableSet<T>, B extends SingularNavigableSet.SingularNavigableSetBuilder<T, C, B>> {
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<java.lang.Object> rawTypes;
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<Integer> integers;
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<T> generics;
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<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 = new java.util.ArrayList<java.lang.Object>();
			this.rawTypes.add(rawType);
			return self();
		}

		@java.lang.SuppressWarnings("all")
		public B rawTypes(final java.util.Collection<?> rawTypes) {
			if (rawTypes == null) {
				throw new java.lang.NullPointerException("rawTypes cannot be null");
			}
			if (this.rawTypes == null) this.rawTypes = new java.util.ArrayList<java.lang.Object>();
			this.rawTypes.addAll(rawTypes);
			return self();
		}

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

		@java.lang.SuppressWarnings("all")
		public B integer(final Integer integer) {
			if (this.integers == null) this.integers = new java.util.ArrayList<Integer>();
			this.integers.add(integer);
			return self();
		}

		@java.lang.SuppressWarnings("all")
		public B integers(final java.util.Collection<? extends Integer> integers) {
			if (integers == null) {
				throw new java.lang.NullPointerException("integers cannot be null");
			}
			if (this.integers == null) this.integers = new java.util.ArrayList<Integer>();
			this.integers.addAll(integers);
			return self();
		}

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

		@java.lang.SuppressWarnings("all")
		public B generic(final T generic) {
			if (this.generics == null) this.generics = new java.util.ArrayList<T>();
			this.generics.add(generic);
			return self();
		}

		@java.lang.SuppressWarnings("all")
		public B generics(final java.util.Collection<? extends T> generics) {
			if (generics == null) {
				throw new java.lang.NullPointerException("generics cannot be null");
			}
			if (this.generics == null) this.generics = new java.util.ArrayList<T>();
			this.generics.addAll(generics);
			return self();
		}

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

		@java.lang.SuppressWarnings("all")
		public B extendsGeneric(final Number extendsGeneric) {
			if (this.extendsGenerics == null) this.extendsGenerics = new java.util.ArrayList<Number>();
			this.extendsGenerics.add(extendsGeneric);
			return self();
		}

		@java.lang.SuppressWarnings("all")
		public B extendsGenerics(final java.util.Collection<? extends Number> extendsGenerics) {
			if (extendsGenerics == null) {
				throw new java.lang.NullPointerException("extendsGenerics cannot be null");
			}
			if (this.extendsGenerics == null) this.extendsGenerics = new java.util.ArrayList<Number>();
			this.extendsGenerics.addAll(extendsGenerics);
			return self();
		}

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

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


	@java.lang.SuppressWarnings("all")
	private static final class SingularNavigableSetBuilderImpl<T> extends SingularNavigableSet.SingularNavigableSetBuilder<T, SingularNavigableSet<T>, SingularNavigableSet.SingularNavigableSetBuilderImpl<T>> {
		@java.lang.SuppressWarnings("all")
		private SingularNavigableSetBuilderImpl() {
		}

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

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

	@java.lang.SuppressWarnings("all")
	protected SingularNavigableSet(final SingularNavigableSet.SingularNavigableSetBuilder<T, ?, ?> b) {
		java.util.NavigableSet<java.lang.Object> rawTypes = new java.util.TreeSet<java.lang.Object>();
		if (b.rawTypes != null) rawTypes.addAll(b.rawTypes);
		rawTypes = java.util.Collections.unmodifiableNavigableSet(rawTypes);
		this.rawTypes = rawTypes;
		java.util.NavigableSet<Integer> integers = new java.util.TreeSet<Integer>();
		if (b.integers != null) integers.addAll(b.integers);
		integers = java.util.Collections.unmodifiableNavigableSet(integers);
		this.integers = integers;
		java.util.NavigableSet<T> generics = new java.util.TreeSet<T>();
		if (b.generics != null) generics.addAll(b.generics);
		generics = java.util.Collections.unmodifiableNavigableSet(generics);
		this.generics = generics;
		java.util.NavigableSet<Number> extendsGenerics = new java.util.TreeSet<Number>();
		if (b.extendsGenerics != null) extendsGenerics.addAll(b.extendsGenerics);
		extendsGenerics = java.util.Collections.unmodifiableNavigableSet(extendsGenerics);
		this.extendsGenerics = extendsGenerics;
	}

	@java.lang.SuppressWarnings("all")
	public static <T> SingularNavigableSet.SingularNavigableSetBuilder<T, ?, ?> builder() {
		return new SingularNavigableSet.SingularNavigableSetBuilderImpl<T>();
	}
}
