aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java')
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java123
1 files changed, 123 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java
new file mode 100644
index 00000000..c685a352
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java
@@ -0,0 +1,123 @@
+import java.util.List;
+import java.util.Collection;
+class BuilderSingularListsWithSetterPrefix<T> {
+ private List<T> children;
+ private Collection<? extends Number> scarves;
+ @SuppressWarnings("all")
+ private List rawList;
+ @java.lang.SuppressWarnings("all")
+ BuilderSingularListsWithSetterPrefix(final List<T> children, final Collection<? extends Number> scarves, final List rawList) {
+ this.children = children;
+ this.scarves = scarves;
+ this.rawList = rawList;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class BuilderSingularListsWithSetterPrefixBuilder<T> {
+ @java.lang.SuppressWarnings("all")
+ private java.util.ArrayList<T> children;
+ @java.lang.SuppressWarnings("all")
+ private java.util.ArrayList<Number> scarves;
+ @java.lang.SuppressWarnings("all")
+ private java.util.ArrayList<java.lang.Object> rawList;
+ @java.lang.SuppressWarnings("all")
+ BuilderSingularListsWithSetterPrefixBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> withChild(final T child) {
+ if (this.children == null) this.children = new java.util.ArrayList<T>();
+ this.children.add(child);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> withChildren(final java.util.Collection<? extends T> children) {
+ if (this.children == null) this.children = new java.util.ArrayList<T>();
+ this.children.addAll(children);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> clearChildren() {
+ if (this.children != null) this.children.clear();
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> withScarf(final Number scarf) {
+ if (this.scarves == null) this.scarves = new java.util.ArrayList<Number>();
+ this.scarves.add(scarf);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> withScarves(final java.util.Collection<? extends Number> scarves) {
+ if (this.scarves == null) this.scarves = new java.util.ArrayList<Number>();
+ this.scarves.addAll(scarves);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> clearScarves() {
+ if (this.scarves != null) this.scarves.clear();
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> withRawList(final java.lang.Object rawList) {
+ if (this.rawList == null) this.rawList = new java.util.ArrayList<java.lang.Object>();
+ this.rawList.add(rawList);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> withRawList(final java.util.Collection<?> rawList) {
+ if (this.rawList == null) this.rawList = new java.util.ArrayList<java.lang.Object>();
+ this.rawList.addAll(rawList);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefixBuilder<T> clearRawList() {
+ if (this.rawList != null) this.rawList.clear();
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularListsWithSetterPrefix<T> build() {
+ java.util.List<T> children;
+ switch (this.children == null ? 0 : this.children.size()) {
+ case 0:
+ children = java.util.Collections.emptyList();
+ break;
+ case 1:
+ children = java.util.Collections.singletonList(this.children.get(0));
+ break;
+ default:
+ children = java.util.Collections.unmodifiableList(new java.util.ArrayList<T>(this.children));
+ }
+ java.util.Collection<Number> scarves;
+ switch (this.scarves == null ? 0 : this.scarves.size()) {
+ case 0:
+ scarves = java.util.Collections.emptyList();
+ break;
+ case 1:
+ scarves = java.util.Collections.singletonList(this.scarves.get(0));
+ break;
+ default:
+ scarves = java.util.Collections.unmodifiableList(new java.util.ArrayList<Number>(this.scarves));
+ }
+ java.util.List<java.lang.Object> rawList;
+ switch (this.rawList == null ? 0 : this.rawList.size()) {
+ case 0:
+ rawList = java.util.Collections.emptyList();
+ break;
+ case 1:
+ rawList = java.util.Collections.singletonList(this.rawList.get(0));
+ break;
+ default:
+ rawList = java.util.Collections.unmodifiableList(new java.util.ArrayList<java.lang.Object>(this.rawList));
+ }
+ return new BuilderSingularListsWithSetterPrefix<T>(children, scarves, rawList);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "BuilderSingularListsWithSetterPrefix.BuilderSingularListsWithSetterPrefixBuilder(children=" + this.children + ", scarves=" + this.scarves + ", rawList=" + this.rawList + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ public static <T> BuilderSingularListsWithSetterPrefixBuilder<T> builder() {
+ return new BuilderSingularListsWithSetterPrefixBuilder<T>();
+ }
+}