import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableSortedMap; import lombok.Singular; @lombok.Builder(setterPrefix = "with") class BuilderSingularGuavaMapsWithSetterPrefix { public static @java.lang.SuppressWarnings("all") class BuilderSingularGuavaMapsWithSetterPrefixBuilder { private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableMap.Builder battleaxes; private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableSortedMap.Builder vertices; private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableBiMap.Builder rawMap; @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder() { super(); } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withBattleaxe(final K key, final V value) { if ((this.battleaxes == null)) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.put(key, value); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withBattleaxes(final java.util.Map battleaxes) { if ((this.battleaxes == null)) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.putAll(battleaxes); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder clearBattleaxes() { this.battleaxes = null; return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withVertex(final Integer key, final V value) { if ((this.vertices == null)) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.put(key, value); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withVertices(final java.util.Map vertices) { if ((this.vertices == null)) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.putAll(vertices); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder clearVertices() { this.vertices = null; return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withRawMap(final java.lang.Object key, final java.lang.Object value) { if ((this.rawMap == null)) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.put(key, value); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder withRawMap(final java.util.Map rawMap) { if ((this.rawMap == null)) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.putAll(rawMap); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder clearRawMap() { this.rawMap = null; return this; } public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefix build() { com.google.common.collect.ImmutableMap battleaxes = ((this.battleaxes == null) ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build()); com.google.common.collect.ImmutableSortedMap vertices = ((this.vertices == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build()); com.google.common.collect.ImmutableBiMap rawMap = ((this.rawMap == null) ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build()); return new BuilderSingularGuavaMapsWithSetterPrefix(battleaxes, vertices, rawMap); } public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((("BuilderSingularGuavaMapsWithSetterPrefix.BuilderSingularGuavaMapsWithSetterPrefixBuilder(battleaxes=" + this.battleaxes) + ", vertices=") + this.vertices) + ", rawMap=") + this.rawMap) + ")"); } } private @Singular ImmutableMap battleaxes; private @Singular ImmutableSortedMap vertices; private @SuppressWarnings("all") @Singular("rawMap") ImmutableBiMap rawMap; @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefix(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { super(); this.battleaxes = battleaxes; this.vertices = vertices; this.rawMap = rawMap; } public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsWithSetterPrefixBuilder builder() { return new BuilderSingularGuavaMapsWithSetterPrefixBuilder(); } }