aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj/BuilderSingularOnRecord.java
blob: 3d16d32639dbb78d359c1fad36f64f50031fc718 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// version 14:
import java.util.Collection;
import java.util.List;
import lombok.Builder;
import lombok.Singular;
@Builder record BuilderSingularOnRecord(List children, Collection scarves, List rawList)<T> {
  public static @java.lang.SuppressWarnings("all") class BuilderSingularOnRecordBuilder<T> {
    private @java.lang.SuppressWarnings("all") java.util.ArrayList<T> children;
    private @java.lang.SuppressWarnings("all") java.util.ArrayList<Number> scarves;
    private @java.lang.SuppressWarnings("all") java.util.ArrayList<java.lang.Object> rawList;
    @java.lang.SuppressWarnings("all") BuilderSingularOnRecordBuilder() {
      super();
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> child(final T child) {
      if ((this.children == null))
          this.children = new java.util.ArrayList<T>();
      this.children.add(child);
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> children(final java.util.Collection<? extends T> children) {
      if ((children == null))
          {
            throw new java.lang.NullPointerException("children cannot be null");
          }
      if ((this.children == null))
          this.children = new java.util.ArrayList<T>();
      this.children.addAll(children);
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> clearChildren() {
      if ((this.children != null))
          this.children.clear();
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> scarf(final Number scarf) {
      if ((this.scarves == null))
          this.scarves = new java.util.ArrayList<Number>();
      this.scarves.add(scarf);
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> scarves(final java.util.Collection<? extends Number> scarves) {
      if ((scarves == null))
          {
            throw new java.lang.NullPointerException("scarves cannot be null");
          }
      if ((this.scarves == null))
          this.scarves = new java.util.ArrayList<Number>();
      this.scarves.addAll(scarves);
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> clearScarves() {
      if ((this.scarves != null))
          this.scarves.clear();
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> rawList(final java.lang.Object rawList) {
      if ((this.rawList == null))
          this.rawList = new java.util.ArrayList<java.lang.Object>();
      this.rawList.add(rawList);
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> rawList(final java.util.Collection<?> rawList) {
      if ((rawList == null))
          {
            throw new java.lang.NullPointerException("rawList cannot be null");
          }
      if ((this.rawList == null))
          this.rawList = new java.util.ArrayList<java.lang.Object>();
      this.rawList.addAll(rawList);
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> clearRawList() {
      if ((this.rawList != null))
          this.rawList.clear();
      return this;
    }
    public @java.lang.SuppressWarnings("all") BuilderSingularOnRecord<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 BuilderSingularOnRecord<T>(children, scarves, rawList);
    }
    public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
      return (((((("BuilderSingularOnRecord.BuilderSingularOnRecordBuilder(children=" + this.children) + ", scarves=") + this.scarves) + ", rawList=") + this.rawList) + ")");
    }
  }
/* Implicit */  private final List<T> children;
/* Implicit */  private final Collection<? extends Number> scarves;
/* Implicit */  private final List rawList;
  public BuilderSingularOnRecord(@Singular List<T> children, @Singular Collection<? extends Number> scarves, @SuppressWarnings("all") @Singular("rawList") List rawList) {
    super();
    .children = children;
    .scarves = scarves;
    .rawList = rawList;
  }
  public static @java.lang.SuppressWarnings("all") <T>BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> builder() {
    return new BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T>();
  }
}