/** * Returns whether the given object should be skipped. * * @param o the object to be checked * @return <code>true</code> if the object should be skipped by the iterator */ protected boolean skip(Object o) { StyleRange r= (StyleRange) o; return r.similarTo(fDefaultRange); }
/** * Compares the argument to the receiver, and returns true if they represent * the <em>same</em> object using a class specific comparison. * * @param object * the object to compare with this object * @return <code>true</code> if the object is the same as this object and * <code>false</code> otherwise * * @see #hashCode() */ @Override public boolean equals(Object object) { if (object == this) return true; if (object instanceof StyleRange) { StyleRange style = (StyleRange) object; if (this.start != style.start) return false; if (this.length != style.length) return false; return similarTo(style); } return false; }
/** * Compares the argument to the receiver, and returns true if they represent * the <em>same</em> object using a class specific comparison. * * @param object * the object to compare with this object * @return <code>true</code> if the object is the same as this object and * <code>false</code> otherwise * * @see #hashCode() */ @Override public boolean equals(Object object) { if (object == this) return true; if (object instanceof StyleRange) { StyleRange style = (StyleRange) object; if (this.start != style.start) return false; if (this.length != style.length) return false; return similarTo(style); } return false; }
for (int i = 0; i < _mergeCount; i++) { StyleRange newStyle = mergeStyles[i], style; if (j > 0 && (style = this.styles[j - 1]).start + style.length == newStyle.start && newStyle.similarTo(style)) { style.length += newStyle.length; } else { if (endStyle != null && style.start + style.length == endStyle.start && endStyle.similarTo(style)) { style.length += endStyle.length; _modifyEnd++;
for (int i = 0; i < _mergeCount; i++) { StyleRange newStyle = mergeStyles[i], style; if (j > 0 && (style = this.styles[j - 1]).start + style.length == newStyle.start && newStyle.similarTo(style)) { style.length += newStyle.length; } else { if (endStyle != null && style.start + style.length == endStyle.start && endStyle.similarTo(style)) { style.length += endStyle.length; _modifyEnd++;
int j = modifyStart; for (int i = 0; i < _mergeCount; i += 2) { if (j > 0 && this.ranges[j - 2] + this.ranges[j - 1] == mergeRanges[i] && mergeStyles[i >> 1].similarTo(this.styles[(j - 2) >> 1])) { this.ranges[j - 1] += mergeRanges[i + 1]; } else { if (endStyle != null && this.ranges[j - 2] + this.ranges[j - 1] == endStart && endStyle.similarTo(this.styles[(j - 2) >> 1])) { this.ranges[j - 1] += endLength; _modifyEnd += 2;
int j = modifyStart; for (int i = 0; i < _mergeCount; i += 2) { if (j > 0 && this.ranges[j - 2] + this.ranges[j - 1] == mergeRanges[i] && mergeStyles[i >> 1].similarTo(this.styles[(j - 2) >> 1])) { this.ranges[j - 1] += mergeRanges[i + 1]; } else { if (endStyle != null && this.ranges[j - 2] + this.ranges[j - 1] == endStart && endStyle.similarTo(this.styles[(j - 2) >> 1])) { this.ranges[j - 1] += endLength; _modifyEnd += 2;
int index = 0; while (index < this.stylesSetCount) { if (this.stylesSet[index].similarTo(newStyle)) break; index++;
int index = 0; while (index < this.stylesSetCount) { if (this.stylesSet[index].similarTo(newStyle)) break; index++;