-
Notifications
You must be signed in to change notification settings - Fork 44
/
GregorianCalendarBuilder.java
executable file
·145 lines (133 loc) · 3.71 KB
/
GregorianCalendarBuilder.java
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
package samples;
import java.util.GregorianCalendar;
import javaxfake.annotation.Generated;
import net.karneim.pojobuilder.GwtIncompatible;
@Generated("PojoBuilder")
public class GregorianCalendarBuilder
implements Cloneable {
protected GregorianCalendarBuilder self;
protected int value$year$int;
protected boolean isSet$year$int;
protected int value$month$int;
protected boolean isSet$month$int;
protected int value$dayOfMonth$int;
protected boolean isSet$dayOfMonth$int;
protected int value$hourOfDay$int;
protected boolean isSet$hourOfDay$int;
protected int value$minute$int;
protected boolean isSet$minute$int;
protected int value$second$int;
protected boolean isSet$second$int;
/**
* Creates a new {@link GregorianCalendarBuilder}.
*/
public GregorianCalendarBuilder() {
self = (GregorianCalendarBuilder)this;
}
/**
* Sets the default value for the year property.
*
* @param value the default value
* @return this builder
*/
public GregorianCalendarBuilder withYear(int value) {
this.value$year$int = value;
this.isSet$year$int = true;
return self;
}
/**
* Sets the default value for the month property.
*
* @param value the default value
* @return this builder
*/
public GregorianCalendarBuilder withMonth(int value) {
this.value$month$int = value;
this.isSet$month$int = true;
return self;
}
/**
* Sets the default value for the dayOfMonth property.
*
* @param value the default value
* @return this builder
*/
public GregorianCalendarBuilder withDayOfMonth(int value) {
this.value$dayOfMonth$int = value;
this.isSet$dayOfMonth$int = true;
return self;
}
/**
* Sets the default value for the hourOfDay property.
*
* @param value the default value
* @return this builder
*/
public GregorianCalendarBuilder withHourOfDay(int value) {
this.value$hourOfDay$int = value;
this.isSet$hourOfDay$int = true;
return self;
}
/**
* Sets the default value for the minute property.
*
* @param value the default value
* @return this builder
*/
public GregorianCalendarBuilder withMinute(int value) {
this.value$minute$int = value;
this.isSet$minute$int = true;
return self;
}
/**
* Sets the default value for the second property.
*
* @param value the default value
* @return this builder
*/
public GregorianCalendarBuilder withSecond(int value) {
this.value$second$int = value;
this.isSet$second$int = true;
return self;
}
/**
* Returns a clone of this builder.
*
* @return the clone
*/
@Override
@GwtIncompatible
public Object clone() {
try {
GregorianCalendarBuilder result = (GregorianCalendarBuilder)super.clone();
result.self = result;
return result;
} catch (CloneNotSupportedException e) {
throw new InternalError(e.getMessage());
}
}
/**
* Returns a clone of this builder.
*
* @return the clone
*/
@GwtIncompatible
public GregorianCalendarBuilder but() {
return (GregorianCalendarBuilder)clone();
}
/**
* Creates a new {@link GregorianCalendar} based on this builder's settings.
*
* @return the created GregorianCalendar
*/
public GregorianCalendar build() {
try {
GregorianCalendar result = CalendarFactory.createCalendar(value$year$int, value$month$int, value$dayOfMonth$int, value$hourOfDay$int, value$minute$int, value$second$int);
return result;
} catch (RuntimeException ex) {
throw ex;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
}