for(;;) {
String str = stringIter.next();
if(str == null) { break; }
- if(ignoreString(str) || str == nfdString) { continue; }
+ if(ignoreString(str) || str.contentEquals(nfdString)) { continue; }
ce32 = addIfDifferent(prefix, str, newCEs, newCEsLength, ce32);
}
} else {
String prefix = prefixIter.next();
if(prefix == null) { break; }
if(ignorePrefix(prefix)) { continue; }
- boolean samePrefix = prefix == nfdPrefix;
+ boolean samePrefix = prefix.contentEquals(nfdPrefix);
for(;;) {
String str = stringIter.next();
if(str == null) { break; }
- if(ignoreString(str) || (samePrefix && str == nfdString)) { continue; }
+ if(ignoreString(str) || (samePrefix && str.contentEquals(nfdString))) { continue; }
ce32 = addIfDifferent(prefix, str, newCEs, newCEsLength, ce32);
}
stringIter.reset();
// Assume that the caller compares the data.
// Ignore skipped since that should be unused between calls to nextCE().
// (It only stays around to avoid another memory allocation.)
+ if(other == null) { return false; }
if(!this.getClass().equals(other.getClass())) { return false; }
CollationIterator o = (CollationIterator)other;
if(!(ceBuffer.length == o.ceBuffer.length &&
@Override
public boolean equals(Object other) {
+ if(other == null) { return false; }
if(!this.getClass().equals(other.getClass())) { return false; }
CollationSettings o = (CollationSettings)other;
if(options != o.options) { return false; }
return (pos - start) == (o.pos - o.start);
}
+ @Override
+ public int hashCode() {
+ assert false : "hashCode not designed";
+ return 42; // any arbitrary constant will do
+ }
+
@Override
public void resetToOffset(int newOffset) {
reset();