import java.util.Set; import java.util.NavigableMap; import java.util.Collection; class BuilderSingularRedirectToGuava { private Set dangerMice; private NavigableMap things; private Collection> doohickeys; @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { this.dangerMice = dangerMice; this.things = things; this.doohickeys = doohickeys; } @java.lang.SuppressWarnings("all") public static class BuilderSingularRedirectToGuavaBuilder { @java.lang.SuppressWarnings("all") private com.google.common.collect.ImmutableSet.Builder dangerMice; @java.lang.SuppressWarnings("all") private com.google.common.collect.ImmutableSortedMap.Builder things; @java.lang.SuppressWarnings("all") private com.google.common.collect.ImmutableList.Builder> doohickeys; @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder() { } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) { if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.add(dangerMouse); return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable dangerMice) { if (dangerMice == null) { throw new java.lang.NullPointerException("dangerMice cannot be null"); } if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.addAll(dangerMice); return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearDangerMice() { this.dangerMice = null; return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder thing(final Integer key, final Number value) { if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.put(key, value); return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder things(final java.util.Map things) { if (things == null) { throw new java.lang.NullPointerException("things cannot be null"); } if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.putAll(things); return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearThings() { this.things = null; return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickey(final Class doohickey) { if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.add(doohickey); return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable> doohickeys) { if (doohickeys == null) { throw new java.lang.NullPointerException("doohickeys cannot be null"); } if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.addAll(doohickeys); return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder clearDoohickeys() { this.doohickeys = null; return this; } @java.lang.SuppressWarnings("all") public BuilderSingularRedirectToGuava build() { java.util.Set dangerMice = this.dangerMice == null ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build(); java.util.NavigableMap things = this.things == null ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build(); java.util.Collection> doohickeys = this.doohickeys == null ? com.google.common.collect.ImmutableList.>of() : this.doohickeys.build(); 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=" + this.things + ", doohickeys=" + this.doohickeys + ")"; } } @java.lang.SuppressWarnings("all") public static BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder builder() { return new BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(); } }