File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
sources/net.sf.j2s.java.core/src/java/lang Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,30 @@ public char charValue() {
107
107
return value ;
108
108
}
109
109
110
+ /**
111
+ * Returns a hash code for this <code>Character</code>.
112
+ * @return a hash code value for this object.
113
+ */
114
+ public int hashCode () {
115
+ return (int )value ;
116
+ }
117
+
118
+ /**
119
+ * Compares this object against the specified object.
120
+ * The result is <code>true</code> if and only if the argument is not
121
+ * <code>null</code> and is a <code>Character</code> object that
122
+ * represents the same <code>char</code> value as this object.
123
+ *
124
+ * @param obj the object to compare with.
125
+ * @return <code>true</code> if the objects are the same;
126
+ * <code>false</code> otherwise.
127
+ */
128
+ public boolean equals (Object obj ) {
129
+ if (obj instanceof Character ) {
130
+ return value == ((Character )obj ).charValue ();
131
+ }
132
+ return false ;
133
+ }
110
134
111
135
/**
112
136
* Compares the receiver to the specified Character to determine the
You can’t perform that action at this time.
0 commit comments