import java.util.Set; import java.util.SortedSet; class BuilderSingularSets { private Set dangerMice; private SortedSet octopodes; @SuppressWarnings("all") private Set rawSet; private Set stringSet; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSets(final Set dangerMice, final SortedSet octopodes, final Set rawSet, final Set stringSet) { this.dangerMice = dangerMice; this.octopodes = octopodes; this.rawSet = rawSet; this.stringSet = stringSet; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public static class BuilderSingularSetsBuilder { private java.util.ArrayList dangerMice; private java.util.ArrayList octopodes; private java.util.ArrayList rawSet; private java.util.ArrayList stringSet; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSetsBuilder dangerMouse(final T dangerMouse) { if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); this.dangerMice.add(dangerMouse); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSetsBuilder dangerMice(final java.util.Collection dangerMice) { if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); this.dangerMice.addAll(dangerMice); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSetsBuilder octopus(final Number octopus) { if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); this.octopodes.add(octopus); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSetsBuilder octopodes(final java.util.Collection octopodes) { if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); this.octopodes.addAll(octopodes); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSetsBuilder rawSet(final java.lang.Object rawSet) { if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); this.rawSet.add(rawSet); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSetsBuilder rawSet(final java.util.Collection rawSet) { if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); this.rawSet.addAll(rawSet); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSetsBuilder stringSet(final String stringSet) { if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); this.stringSet.add(stringSet); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSetsBuilder stringSet(final java.util.Collection stringSet) { if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); this.stringSet.addAll(stringSet); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderSingularSets build() { java.util.Set 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(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.SortedSet octopodes = new java.util.TreeSet(); if (this.octopodes != null) octopodes.addAll(this.octopodes); octopodes = java.util.Collections.unmodifiableSortedSet(octopodes); java.util.Set rawSet; switch (this.rawSet == null ? 0 : this.rawSet.size()) { case 0: rawSet = java.util.Collections.emptySet(); break; case 1: rawSet = java.util.Collections.singleton(this.rawSet.get(0)); break; default: rawSet = new java.util.LinkedHashSet(this.rawSet.size() < 1073741824 ? 1 + this.rawSet.size() + (this.rawSet.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); rawSet.addAll(this.rawSet); rawSet = java.util.Collections.unmodifiableSet(rawSet); } java.util.Set stringSet; switch (this.stringSet == null ? 0 : this.stringSet.size()) { case 0: stringSet = java.util.Collections.emptySet(); break; case 1: stringSet = java.util.Collections.singleton(this.stringSet.get(0)); break; default: stringSet = new java.util.LinkedHashSet(this.stringSet.size() < 1073741824 ? 1 + this.stringSet.size() + (this.stringSet.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); stringSet.addAll(this.stringSet); stringSet = java.util.Collections.unmodifiableSet(stringSet); } return new BuilderSingularSets(dangerMice, octopodes, rawSet, stringSet); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public java.lang.String toString() { return "BuilderSingularSets.BuilderSingularSetsBuilder(dangerMice=" + this.dangerMice + ", octopodes=" + this.octopodes + ", rawSet=" + this.rawSet + ", stringSet=" + this.stringSet + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public static BuilderSingularSetsBuilder builder() { return new BuilderSingularSetsBuilder(); } }