cf505a6d27c8d9ebc5fe7949d1e3e3b9ad4833a3
[jalviewjs.git] / site / j2s / java / text / ParsePosition.js
1 Clazz.declarePackage ("java.text");\r
2 c$ = Clazz.decorateAsClass (function () {\r
3 this.index = 0;\r
4 this.errorIndex = -1;\r
5 Clazz.instantialize (this, arguments);\r
6 }, java.text, "ParsePosition");\r
7 Clazz.defineMethod (c$, "getIndex", \r
8 function () {\r
9 return this.index;\r
10 });\r
11 Clazz.defineMethod (c$, "setIndex", \r
12 function (index) {\r
13 this.index = index;\r
14 }, "~N");\r
15 Clazz.makeConstructor (c$, \r
16 function (index) {\r
17 this.index = index;\r
18 }, "~N");\r
19 Clazz.defineMethod (c$, "setErrorIndex", \r
20 function (ei) {\r
21 this.errorIndex = ei;\r
22 }, "~N");\r
23 Clazz.defineMethod (c$, "getErrorIndex", \r
24 function () {\r
25 return this.errorIndex;\r
26 });\r
27 Clazz.overrideMethod (c$, "equals", \r
28 function (obj) {\r
29 if (obj == null) return false;\r
30 if (!(Clazz.instanceOf (obj, java.text.ParsePosition))) return false;\r
31 var other = obj;\r
32 return (this.index == other.index && this.errorIndex == other.errorIndex);\r
33 }, "~O");\r
34 Clazz.overrideMethod (c$, "hashCode", \r
35 function () {\r
36 return (this.errorIndex << 16) | this.index;\r
37 });\r
38 Clazz.overrideMethod (c$, "toString", \r
39 function () {\r
40 return this.getClass ().getName () + "[index=" + this.index + ",errorIndex=" + this.errorIndex + ']';\r
41 });\r