import java.util.List; import java.util.Collection; import lombok.Singular; @lombok.Builder(toBuilder = true,setterPrefix = "with") class BuilderSingularWildcardListsWithToBuilderWithSetterPrefix { public static @java.lang.SuppressWarnings("all") class BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder { private @java.lang.SuppressWarnings("all") java.util.ArrayList objects; private @java.lang.SuppressWarnings("all") java.util.ArrayList numbers; @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder() { super(); } public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withObject(final java.lang.Object object) { if ((this.objects == null)) this.objects = new java.util.ArrayList(); this.objects.add(object); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withObjects(final java.util.Collection objects) { if ((this.objects == null)) this.objects = new java.util.ArrayList(); this.objects.addAll(objects); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder clearObjects() { if ((this.objects != null)) this.objects.clear(); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withNumber(final Number number) { if ((this.numbers == null)) this.numbers = new java.util.ArrayList(); this.numbers.add(number); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder withNumbers(final java.util.Collection numbers) { if ((this.numbers == null)) this.numbers = new java.util.ArrayList(); this.numbers.addAll(numbers); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder clearNumbers() { if ((this.numbers != null)) this.numbers.clear(); return this; } public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefix build() { java.util.List objects; switch (((this.objects == null) ? 0 : this.objects.size())) { case 0 : objects = java.util.Collections.emptyList(); break; case 1 : objects = java.util.Collections.singletonList(this.objects.get(0)); break; default : objects = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.objects)); } java.util.Collection numbers; switch (((this.numbers == null) ? 0 : this.numbers.size())) { case 0 : numbers = java.util.Collections.emptyList(); break; case 1 : numbers = java.util.Collections.singletonList(this.numbers.get(0)); break; default : numbers = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.numbers)); } return new BuilderSingularWildcardListsWithToBuilderWithSetterPrefix(objects, numbers); } public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(objects=" + this.objects) + ", numbers=") + this.numbers) + ")"); } } private @Singular List objects; private @Singular Collection numbers; @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefix(final List objects, final Collection numbers) { super(); this.objects = objects; this.numbers = numbers; } public static @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder builder() { return new BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(); } public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder toBuilder() { final BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder builder = new BuilderSingularWildcardListsWithToBuilderWithSetterPrefixBuilder(); if ((this.objects != null)) builder.withObjects(this.objects); if ((this.numbers != null)) builder.withNumbers(this.numbers); return builder; } }