/** * Compares the specified object to this StyleRange and answer if the two * are similar. The object must be an instance of StyleRange and have the * same field values for except for start and length. * * @param style * the object to compare with this object * @return true if the objects are similar, false otherwise */ public boolean similarTo(StyleRange style) { if (!super.equals(style)) return false; if (this.fontStyle != style.fontStyle) return false; return true; }
/** * Compares the specified object to this StyleRange and answer if the two * are similar. The object must be an instance of StyleRange and have the * same field values for except for start and length. * * @param style * the object to compare with this object * @return true if the objects are similar, false otherwise */ public boolean similarTo(StyleRange style) { if (!super.equals(style)) return false; if (this.fontStyle != style.fontStyle) return false; return true; }