equal
deleted
inserted
replaced
1514 * (The hash value of the empty string is zero.) |
1514 * (The hash value of the empty string is zero.) |
1515 * |
1515 * |
1516 * @return a hash code value for this object. |
1516 * @return a hash code value for this object. |
1517 */ |
1517 */ |
1518 public int hashCode() { |
1518 public int hashCode() { |
1519 if (hash == 0 && value.length > 0) { |
1519 int h = hash; |
1520 hash = isLatin1() ? StringLatin1.hashCode(value) |
1520 if (h == 0 && value.length > 0) { |
1521 : StringUTF16.hashCode(value); |
1521 hash = h = isLatin1() ? StringLatin1.hashCode(value) |
1522 } |
1522 : StringUTF16.hashCode(value); |
1523 return hash; |
1523 } |
|
1524 return h; |
1524 } |
1525 } |
1525 |
1526 |
1526 /** |
1527 /** |
1527 * Returns the index within this string of the first occurrence of |
1528 * Returns the index within this string of the first occurrence of |
1528 * the specified character. If a character with value |
1529 * the specified character. If a character with value |