// Generated by delombok at Sun Nov 06 21:23:53 CET 2022

//CONF: lombok.singular.useGuava = true
import java.util.Set;
import java.util.NavigableMap;
import java.util.Collection;

class BuilderSingularRedirectToGuava {
	private Set<String> dangerMice;
	private NavigableMap<Integer, Number> things;
	private Collection<Class<?>> doohickeys;

	@java.lang.SuppressWarnings("all")
	BuilderSingularRedirectToGuava(final Set<String> dangerMice, final NavigableMap<Integer, Number> things, final Collection<Class<?>> doohickeys) {
		this.dangerMice = dangerMice;
		this.things = things;
		this.doohickeys = doohickeys;
	}


	@java.lang.SuppressWarnings("all")
	public static class BuilderSingularRedirectToGuavaBuilder {
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<String> dangerMice;
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<Integer> things$key;
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<Number> things$value;
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<Class<?>> doohickeys;

		@java.lang.SuppressWarnings("all")
		BuilderSingularRedirectToGuavaBuilder() {
		}

		@java.lang.SuppressWarnings("all")
		public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) {
			if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList<String>();
			this.dangerMice.add(dangerMouse);
			return this;
		}

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

		@java.lang.SuppressWarnings("all")
		public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearDangerMice() {
			if (this.dangerMice != null) this.dangerMice.clear();
			return this;
		}

		@java.lang.SuppressWarnings("all")
		public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder thing(final Integer thingKey, final Number thingValue) {
			if (this.things$key == null) {
				this.things$key = new java.util.ArrayList<Integer>();
				this.things$value = new java.util.ArrayList<Number>();
			}
			this.things$key.add(thingKey);
			this.things$value.add(thingValue);
			return this;
		}

		@java.lang.SuppressWarnings("all")
		public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder things(final java.util.Map<? extends Integer, ? extends Number> things) {
			if (things == null) {
				throw new java.lang.NullPointerException("things cannot be null");
			}
			if (this.things$key == null) {
				this.things$key = new java.util.ArrayList<Integer>();
				this.things$value = new java.util.ArrayList<Number>();
			}
			for (final java.util.Map.Entry<? extends Integer, ? extends Number> $lombokEntry : things.entrySet()) {
				this.things$key.add($lombokEntry.getKey());
				this.things$value.add($lombokEntry.getValue());
			}
			return this;
		}

		@java.lang.SuppressWarnings("all")
		public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearThings() {
			if (this.things$key != null) {
				this.things$key.clear();
				this.things$value.clear();
			}
			return this;
		}

		@java.lang.SuppressWarnings("all")
		public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickey(final Class<?> doohickey) {
			if (this.doohickeys == null) this.doohickeys = new java.util.ArrayList<Class<?>>();
			this.doohickeys.add(doohickey);
			return this;
		}

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

		@java.lang.SuppressWarnings("all")
		public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearDoohickeys() {
			if (this.doohickeys != null) this.doohickeys.clear();
			return this;
		}

		@java.lang.SuppressWarnings("all")
		public BuilderSingularRedirectToGuava build() {
			java.util.Set<String> dangerMice;
			switch (this.dangerMice == null ? 0 : this.dangerMice.size()) {
			case 0: 
				dangerMice = java.util.Collections.emptySet();
				break;
			case 1: 
				dangerMice = java.util.Collections.singleton(this.dangerMice.get(0));
				break;
			default: 
				dangerMice = new java.util.LinkedHashSet<String>(this.dangerMice.size() < 1073741824 ? 1 + this.dangerMice.size() + (this.dangerMice.size() - 3) / 3 : java.lang.Integer.MAX_VALUE);
				dangerMice.addAll(this.dangerMice);
				dangerMice = java.util.Collections.unmodifiableSet(dangerMice);
			}
			java.util.NavigableMap<Integer, Number> things = new java.util.TreeMap<Integer, Number>();
			if (this.things$key != null) for (int $i = 0; $i < (this.things$key == null ? 0 : this.things$key.size()); $i++) things.put(this.things$key.get($i), (Number) this.things$value.get($i));
			things = java.util.Collections.unmodifiableNavigableMap(things);
			java.util.Collection<Class<?>> doohickeys;
			switch (this.doohickeys == null ? 0 : this.doohickeys.size()) {
			case 0: 
				doohickeys = java.util.Collections.emptyList();
				break;
			case 1: 
				doohickeys = java.util.Collections.singletonList(this.doohickeys.get(0));
				break;
			default: 
				doohickeys = java.util.Collections.unmodifiableList(new java.util.ArrayList<Class<?>>(this.doohickeys));
			}
			return new BuilderSingularRedirectToGuava(dangerMice, things, doohickeys);
		}

		@java.lang.Override
		@java.lang.SuppressWarnings("all")
		public java.lang.String toString() {
			return "BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(dangerMice=" + this.dangerMice + ", things$key=" + this.things$key + ", things$value=" + this.things$value + ", doohickeys=" + this.doohickeys + ")";
		}
	}

	@java.lang.SuppressWarnings("all")
	public static BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder builder() {
		return new BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder();
	}
}
