@Override public int hashCode() { if (fHashCode == 0) { int multiplier= 37; // some prime fHashCode= 13; // some random value fHashCode= multiplier * fHashCode + (font == null ? 0 : font.hashCode()); fHashCode= multiplier * fHashCode + (background == null ? 0 : background.hashCode()); fHashCode= multiplier * fHashCode + (foreground == null ? 0 : foreground.hashCode()); fHashCode= multiplier * fHashCode + style; } return fHashCode; }
@Override public int hashCode() { if (fHashCode == 0) { int multiplier= 37; // some prime fHashCode= 13; // some random value fHashCode= multiplier * fHashCode + (font == null ? 0 : font.hashCode()); fHashCode= multiplier * fHashCode + (background == null ? 0 : background.hashCode()); fHashCode= multiplier * fHashCode + (foreground == null ? 0 : foreground.hashCode()); fHashCode= multiplier * fHashCode + style; } return fHashCode; }
/** * Returns an integer hash code for the receiver. Any two * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * * @return the receiver's hash * * @see #equals(Object) */ @Override public int hashCode() { int hash = 0; if (foreground != null) hash ^= foreground.hashCode(); if (background != null) hash ^= background.hashCode(); if (font != null) hash ^= font.hashCode(); if (metrics != null) hash ^= metrics.hashCode(); if (underline) hash ^= (hash << 1); if (strikeout) hash ^= (hash << 2); hash ^= rise; if (underlineColor != null) hash ^= underlineColor.hashCode(); if (strikeoutColor != null) hash ^= strikeoutColor.hashCode(); if (borderColor != null) hash ^= borderColor.hashCode(); hash ^= underlineStyle; return hash; }
/** * Returns an integer hash code for the receiver. Any two * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * * @return the receiver's hash * * @see #equals(Object) */ @Override public int hashCode() { int hash = 0; if (foreground != null) hash ^= foreground.hashCode(); if (background != null) hash ^= background.hashCode(); if (font != null) hash ^= font.hashCode(); if (metrics != null) hash ^= metrics.hashCode(); if (underline) hash ^= (hash << 1); if (strikeout) hash ^= (hash << 2); hash ^= rise; if (underlineColor != null) hash ^= underlineColor.hashCode(); if (strikeoutColor != null) hash ^= strikeoutColor.hashCode(); if (borderColor != null) hash ^= borderColor.hashCode(); hash ^= underlineStyle; return hash; }
/** * Returns an integer hash code for the receiver. Any two * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * * @return the receiver's hash * * @see #equals(Object) */ @Override public int hashCode() { int hash = 0; if (foreground != null) hash ^= foreground.hashCode(); if (background != null) hash ^= background.hashCode(); if (font != null) hash ^= font.hashCode(); if (metrics != null) hash ^= metrics.hashCode(); if (underline) hash ^= (hash << 1); if (strikeout) hash ^= (hash << 2); hash ^= rise; if (underlineColor != null) hash ^= underlineColor.hashCode(); if (strikeoutColor != null) hash ^= strikeoutColor.hashCode(); if (borderColor != null) hash ^= borderColor.hashCode(); hash ^= underlineStyle; return hash; }
/** * Returns an integer hash code for the receiver. Any two * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * * @return the receiver's hash * * @see #equals(Object) */ public int hashCode() { int hash = 0; if (foreground != null) hash ^= foreground.hashCode(); if (background != null) hash ^= background.hashCode(); if (font != null) hash ^= font.hashCode(); if (metrics != null) hash ^= metrics.hashCode(); if (underline) hash ^= (hash << 1); if (strikeout) hash ^= (hash << 2); hash ^= rise; if (underlineColor != null) hash ^= underlineColor.hashCode(); if (strikeoutColor != null) hash ^= strikeoutColor.hashCode(); if (borderColor != null) hash ^= borderColor.hashCode(); hash ^= underlineStyle; return hash; }
/** * Returns an integer hash code for the receiver. Any two * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * * @return the receiver's hash * * @see #equals(Object) */ @Override public int hashCode() { int hash = 0; if (foreground != null) hash ^= foreground.hashCode(); if (background != null) hash ^= background.hashCode(); if (font != null) hash ^= font.hashCode(); if (metrics != null) hash ^= metrics.hashCode(); if (underline) hash ^= (hash << 1); if (strikeout) hash ^= (hash << 2); hash ^= rise; if (underlineColor != null) hash ^= underlineColor.hashCode(); if (strikeoutColor != null) hash ^= strikeoutColor.hashCode(); if (borderColor != null) hash ^= borderColor.hashCode(); hash ^= underlineStyle; return hash; }
@Override public int hashCode() { return super.hashCode() ^ color.hashCode(); } }