View Javadoc
1   package org.kuali.common.jute.builder;
2   
3   import static com.google.common.base.Preconditions.checkNotNull;
4   
5   public final class FooGuava1 {
6   
7       private final String field1;
8       private final String field2;
9       private final String field3;
10      private final String field4;
11      private final String field5;
12      private final String field6;
13      private final String field7;
14      private final String field8;
15      private final String field9;
16  
17      private FooGuava1(Builder builder) {
18          this.field1 = builder.field1;
19          this.field2 = builder.field2;
20          this.field3 = builder.field3;
21          this.field4 = builder.field4;
22          this.field5 = builder.field5;
23          this.field6 = builder.field6;
24          this.field7 = builder.field7;
25          this.field8 = builder.field8;
26          this.field9 = builder.field9;
27      }
28  
29      public static FooGuava1 build() {
30          return builder().build();
31      }
32  
33      public static Builder builder() {
34          return new Builder();
35      }
36  
37      public static class Builder implements org.apache.commons.lang3.builder.Builder<FooGuava1> {
38  
39          private String field1 = "foo";
40          private String field2 = "foo";
41          private String field3 = "foo";
42          private String field4 = "foo";
43          private String field5 = "foo";
44          private String field6 = "foo";
45          private String field7 = "foo";
46          private String field8 = "foo";
47          private String field9 = "foo";
48  
49          public Builder withField1(String field1) {
50              this.field1 = field1;
51              return this;
52          }
53  
54          public Builder withField2(String field2) {
55              this.field2 = field2;
56              return this;
57          }
58  
59          public Builder withField3(String field3) {
60              this.field3 = field3;
61              return this;
62          }
63  
64          public Builder withField4(String field4) {
65              this.field4 = field4;
66              return this;
67          }
68  
69          public Builder withField5(String field5) {
70              this.field5 = field5;
71              return this;
72          }
73  
74          public Builder withField6(String field6) {
75              this.field6 = field6;
76              return this;
77          }
78  
79          public Builder withField7(String field7) {
80              this.field7 = field7;
81              return this;
82          }
83  
84          public Builder withField8(String field8) {
85              this.field8 = field8;
86              return this;
87          }
88  
89          public Builder withField9(String field9) {
90              this.field9 = field9;
91              return this;
92          }
93  
94          @Override
95          public FooGuava1 build() {
96              return validate(new FooGuava1(this));
97          }
98  
99          private static FooGuava1 validate(FooGuava1 instance) {
100             checkNotNull(instance.field1, "field1");
101             checkNotNull(instance.field2, "field2");
102             checkNotNull(instance.field3, "field3");
103             checkNotNull(instance.field4, "field4");
104             checkNotNull(instance.field5, "field5");
105             checkNotNull(instance.field6, "field6");
106             checkNotNull(instance.field7, "field7");
107             checkNotNull(instance.field8, "field8");
108             checkNotNull(instance.field9, "field9");
109             return instance;
110         }
111     }
112 
113     public String getField1() {
114         return field1;
115     }
116 
117     public String getField2() {
118         return field2;
119     }
120 
121     public String getField3() {
122         return field3;
123     }
124 
125     public String getField4() {
126         return field4;
127     }
128 
129     public String getField5() {
130         return field5;
131     }
132 
133     public String getField6() {
134         return field6;
135     }
136 
137     public String getField7() {
138         return field7;
139     }
140 
141     public String getField8() {
142         return field8;
143     }
144 
145     public String getField9() {
146         return field9;
147     }
148 
149 }