Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 7 8 20 21 package java.text; 22 23 24 39 40 public class ParsePosition { 41 42 48 int index = 0; 49 int errorIndex = -1; 50 51 56 public int getIndex() { 57 return index; 58 } 59 60 63 public void setIndex(int index) { 64 this.index = index; 65 } 66 67 70 public ParsePosition(int index) { 71 this.index = index; 72 } 73 79 public void setErrorIndex(int ei) 80 { 81 errorIndex = ei; 82 } 83 84 89 public int getErrorIndex() 90 { 91 return errorIndex; 92 } 93 96 public boolean equals(Object obj) 97 { 98 if (obj == null) return false; 99 if (!(obj instanceof ParsePosition )) 100 return false; 101 ParsePosition other = (ParsePosition ) obj; 102 return (index == other.index && errorIndex == other.errorIndex); 103 } 104 105 109 public int hashCode() { 110 return (errorIndex << 16) | index; 111 } 112 113 117 public String toString() { 118 return getClass().getName() + 119 "[index=" + index + 120 ",errorIndex=" + errorIndex + ']'; 121 } 122 } 123
| Popular Tags
|