@Override public boolean equals(Object o) { return o instanceof Charset && ranges.equals(((Charset) o).ranges); }
@Override public boolean equals(Object o) { return o instanceof Charset && ranges.equals(((Charset) o).ranges); }
@Override public boolean equals(Object o) { if (!(o instanceof DecomposedCharset)) { return false; } DecomposedCharset that = (DecomposedCharset) o; return this.inverted = that.inverted && this.ranges.equals(that.ranges) && this.namedGroups.equals(that.namedGroups); }
@Override public boolean equals(Object o) { if (!(o instanceof DecomposedCharset)) { return false; } DecomposedCharset that = (DecomposedCharset) o; return this.inverted = that.inverted && this.ranges.equals(that.ranges) && this.namedGroups.equals(that.namedGroups); }
@Override protected void appendSourceCode(StringBuilder sb) { if (DOT_CHARSET.ranges.equals(ranges)) { sb.append('.'); return; } decompose().appendSourceCode(sb); }
@Override protected void appendSourceCode(StringBuilder sb) { if (DOT_CHARSET.ranges.equals(ranges)) { sb.append('.'); return; } decompose().appendSourceCode(sb); }
@Override public boolean isCaseSensitive() { // We could test // !ranges.equals(CaseCanonicalize.expandToAllMatched(ranges)) // but we get better optimizations by leaving the 'i' flag on in most // cases. // Check whether skipping all the character groups that are known // case-insensitive leaves us with something that matches the above // definition. CharRanges withoutNamedGroups = decompose().ranges; return !withoutNamedGroups.equals( CaseCanonicalize.expandToAllMatched(withoutNamedGroups)); }
@Override public boolean isCaseSensitive() { // We could test // !ranges.equals(CaseCanonicalize.expandToAllMatched(ranges)) // but we get better optimizations by leaving the 'i' flag on in most // cases. // Check whether skipping all the character groups that are known // case-insensitive leaves us with something that matches the above // definition. CharRanges withoutNamedGroups = decompose().ranges; return !withoutNamedGroups.equals( CaseCanonicalize.expandToAllMatched(withoutNamedGroups)); }
if (!best.equals(ranges)) { return new Charset(best, ieExplicits);
if (!best.equals(ranges)) { return new Charset(best, ieExplicits);