c726c614e8a1b4fcbd7fc5ee730fd519a8140c61
[jalviewjs.git] / site / swingjs / j2s / jssun / util / calendar / ImmutableGregorianDate.js
1 Clazz.declarePackage ("jssun.util.calendar");
2 Clazz.load (["jssun.util.calendar.BaseCalendar"], "jssun.util.calendar.ImmutableGregorianDate", ["java.lang.NullPointerException", "$.UnsupportedOperationException"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.date = null;
5 Clazz.instantialize (this, arguments);
6 }, jssun.util.calendar, "ImmutableGregorianDate", jssun.util.calendar.BaseCalendar.Date);
7 Clazz.makeConstructor (c$, 
8 function (date) {
9 Clazz.superConstructor (this, jssun.util.calendar.ImmutableGregorianDate, []);
10 if (date == null) {
11 throw  new NullPointerException ();
12 }this.date = date;
13 }, "jssun.util.calendar.BaseCalendar.Date");
14 Clazz.defineMethod (c$, "getEra", 
15 function () {
16 return this.date.getEra ();
17 });
18 Clazz.overrideMethod (c$, "setEra", 
19 function (era) {
20 this.unsupported ();
21 return this;
22 }, "jssun.util.calendar.Era");
23 Clazz.defineMethod (c$, "getYear", 
24 function () {
25 return this.date.getYear ();
26 });
27 Clazz.overrideMethod (c$, "setYear", 
28 function (year) {
29 this.unsupported ();
30 return this;
31 }, "~N");
32 Clazz.overrideMethod (c$, "addYear", 
33 function (n) {
34 this.unsupported ();
35 return this;
36 }, "~N");
37 Clazz.defineMethod (c$, "isLeapYear", 
38 function () {
39 return this.date.isLeapYear ();
40 });
41 Clazz.overrideMethod (c$, "setLeapYear", 
42 function (leapYear) {
43 this.unsupported ();
44 }, "~B");
45 Clazz.defineMethod (c$, "getMonth", 
46 function () {
47 return this.date.getMonth ();
48 });
49 Clazz.overrideMethod (c$, "setMonth", 
50 function (month) {
51 this.unsupported ();
52 return this;
53 }, "~N");
54 Clazz.overrideMethod (c$, "addMonth", 
55 function (n) {
56 this.unsupported ();
57 return this;
58 }, "~N");
59 Clazz.defineMethod (c$, "getDayOfMonth", 
60 function () {
61 return this.date.getDayOfMonth ();
62 });
63 Clazz.overrideMethod (c$, "setDayOfMonth", 
64 function (date) {
65 this.unsupported ();
66 return this;
67 }, "~N");
68 Clazz.overrideMethod (c$, "addDayOfMonth", 
69 function (n) {
70 this.unsupported ();
71 return this;
72 }, "~N");
73 Clazz.defineMethod (c$, "getDayOfWeek", 
74 function () {
75 return this.date.getDayOfWeek ();
76 });
77 Clazz.defineMethod (c$, "getHours", 
78 function () {
79 return this.date.getHours ();
80 });
81 Clazz.overrideMethod (c$, "setHours", 
82 function (hours) {
83 this.unsupported ();
84 return this;
85 }, "~N");
86 Clazz.overrideMethod (c$, "addHours", 
87 function (n) {
88 this.unsupported ();
89 return this;
90 }, "~N");
91 Clazz.defineMethod (c$, "getMinutes", 
92 function () {
93 return this.date.getMinutes ();
94 });
95 Clazz.overrideMethod (c$, "setMinutes", 
96 function (minutes) {
97 this.unsupported ();
98 return this;
99 }, "~N");
100 Clazz.overrideMethod (c$, "addMinutes", 
101 function (n) {
102 this.unsupported ();
103 return this;
104 }, "~N");
105 Clazz.defineMethod (c$, "getSeconds", 
106 function () {
107 return this.date.getSeconds ();
108 });
109 Clazz.overrideMethod (c$, "setSeconds", 
110 function (seconds) {
111 this.unsupported ();
112 return this;
113 }, "~N");
114 Clazz.overrideMethod (c$, "addSeconds", 
115 function (n) {
116 this.unsupported ();
117 return this;
118 }, "~N");
119 Clazz.defineMethod (c$, "getMillis", 
120 function () {
121 return this.date.getMillis ();
122 });
123 Clazz.overrideMethod (c$, "setMillis", 
124 function (millis) {
125 this.unsupported ();
126 return this;
127 }, "~N");
128 Clazz.overrideMethod (c$, "addMillis", 
129 function (n) {
130 this.unsupported ();
131 return this;
132 }, "~N");
133 Clazz.defineMethod (c$, "getTimeOfDay", 
134 function () {
135 return this.date.getTimeOfDay ();
136 });
137 Clazz.overrideMethod (c$, "setDate", 
138 function (year, month, dayOfMonth) {
139 this.unsupported ();
140 return this;
141 }, "~N,~N,~N");
142 Clazz.overrideMethod (c$, "addDate", 
143 function (year, month, dayOfMonth) {
144 this.unsupported ();
145 return this;
146 }, "~N,~N,~N");
147 Clazz.defineMethod (c$, "setTimeOfDay", 
148 function (hours, minutes, seconds, millis) {
149 this.unsupported ();
150 return this;
151 }, "~N,~N,~N,~N");
152 Clazz.overrideMethod (c$, "addTimeOfDay", 
153 function (hours, minutes, seconds, millis) {
154 this.unsupported ();
155 return this;
156 }, "~N,~N,~N,~N");
157 Clazz.defineMethod (c$, "setTimeOfDay", 
158 function (fraction) {
159 this.unsupported ();
160 }, "~N");
161 Clazz.defineMethod (c$, "isNormalized", 
162 function () {
163 return this.date.isNormalized ();
164 });
165 Clazz.defineMethod (c$, "isStandardTime", 
166 function () {
167 return this.date.isStandardTime ();
168 });
169 Clazz.overrideMethod (c$, "setStandardTime", 
170 function (standardTime) {
171 this.unsupported ();
172 }, "~B");
173 Clazz.defineMethod (c$, "isDaylightTime", 
174 function () {
175 return this.date.isDaylightTime ();
176 });
177 Clazz.overrideMethod (c$, "setLocale", 
178 function (loc) {
179 this.unsupported ();
180 }, "java.util.Locale");
181 Clazz.defineMethod (c$, "getZone", 
182 function () {
183 return this.date.getZone ();
184 });
185 Clazz.overrideMethod (c$, "setZone", 
186 function (zoneinfo) {
187 this.unsupported ();
188 return this;
189 }, "java.util.TimeZone");
190 Clazz.defineMethod (c$, "isSameDate", 
191 function (date) {
192 return date.isSameDate (date);
193 }, "jssun.util.calendar.CalendarDate");
194 Clazz.defineMethod (c$, "equals", 
195 function (obj) {
196 if (this === obj) {
197 return true;
198 }if (!(Clazz.instanceOf (obj, jssun.util.calendar.ImmutableGregorianDate))) {
199 return false;
200 }return this.date.equals ((obj).date);
201 }, "~O");
202 Clazz.defineMethod (c$, "hashCode", 
203 function () {
204 return this.date.hashCode ();
205 });
206 Clazz.defineMethod (c$, "toString", 
207 function () {
208 return this.date.toString ();
209 });
210 Clazz.overrideMethod (c$, "setDayOfWeek", 
211 function (dayOfWeek) {
212 this.unsupported ();
213 }, "~N");
214 Clazz.overrideMethod (c$, "setNormalized", 
215 function (normalized) {
216 this.unsupported ();
217 }, "~B");
218 Clazz.defineMethod (c$, "getZoneOffset", 
219 function () {
220 return this.date.getZoneOffset ();
221 });
222 Clazz.overrideMethod (c$, "setZoneOffset", 
223 function (offset) {
224 this.unsupported ();
225 }, "~N");
226 Clazz.defineMethod (c$, "getDaylightSaving", 
227 function () {
228 return this.date.getDaylightSaving ();
229 });
230 Clazz.overrideMethod (c$, "setDaylightSaving", 
231 function (daylightSaving) {
232 this.unsupported ();
233 }, "~N");
234 Clazz.defineMethod (c$, "getNormalizedYear", 
235 function () {
236 return this.date.getNormalizedYear ();
237 });
238 Clazz.overrideMethod (c$, "setNormalizedYear", 
239 function (normalizedYear) {
240 this.unsupported ();
241 }, "~N");
242 Clazz.defineMethod (c$, "unsupported", 
243  function () {
244 throw  new UnsupportedOperationException ();
245 });
246 });