@Override public int hashCode() { int hash = super.hashCode(); hash = hash * 7 + Integer.valueOf(fTheight).hashCode(); hash = hash * 7 + Integer.valueOf(fMarginHeight).hashCode(); return hash; }
@Override public boolean equals(Object obj) { if (obj instanceof ComplexImageDescriptor) { ComplexImageDescriptor id = (ComplexImageDescriptor) obj; if (super.equals(obj) && id.fVertical == fVertical && Arrays.equals(id.fPercents, fPercents)) { if ((id.fBgRGB == null && fBgRGB == null) || (id.fBgRGB != null && id.fBgRGB.equals(fBgRGB))) return true; // if the only thing that isn't the same is the background color // still return true if it does not matter (percents add up to 100) int sum = 0; for (int fPercent : fPercents) sum += fPercent; if (sum >= 100) return true; } } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof ComplexImageDescriptor) { ComplexImageDescriptor id = (ComplexImageDescriptor) obj; if (super.equals(obj) && id.fVertical == fVertical && Arrays.equals(id.fPercents, fPercents)) { if ((id.fBgRGB == null && fBgRGB == null) || (id.fBgRGB != null && id.fBgRGB.equals(fBgRGB))) return true; // if the only thing that isn't the same is the background color // still return true if it does not matter (percents add up to 100) int sum = 0; for (int fPercent : fPercents) sum += fPercent; if (sum >= 100) return true; } } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof SimpleImageDescriptor) { SimpleImageDescriptor id = (SimpleImageDescriptor) obj; if (super.equals(obj) && id.fTheight == fTheight && id.fMarginHeight == fMarginHeight) return true; } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof SimpleImageDescriptor) { SimpleImageDescriptor id = (SimpleImageDescriptor) obj; if (super.equals(obj) && id.fTheight == fTheight && id.fMarginHeight == fMarginHeight) return true; } return false; }
@Override public int hashCode() { int hash = super.hashCode(); hash = hash * 7 + Boolean.valueOf(fVertical).hashCode(); for (int fPercent : fPercents) hash = hash * 7 + Integer.valueOf(fPercent).hashCode(); return hash; }
@Override public boolean equals(Object obj) { if (obj instanceof SimpleSectionImageDescriptor) { SimpleSectionImageDescriptor id = (SimpleSectionImageDescriptor) obj; if (super.equals(obj) && id.fTheight == fTheight && id.fMarginHeight == fMarginHeight) return true; } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof SimpleImageDescriptor) { SimpleImageDescriptor id = (SimpleImageDescriptor) obj; if (super.equals(obj) && id.fTheight == fTheight && id.fMarginHeight == fMarginHeight) return true; } return false; }
@Override public int hashCode() { int hash = super.hashCode(); hash = hash * 7 + Integer.valueOf(fTheight).hashCode(); hash = hash * 7 + Integer.valueOf(fMarginHeight).hashCode(); return hash; }
@Override public int hashCode() { int hash = super.hashCode(); hash = hash * 7 + Integer.valueOf(fTheight).hashCode(); hash = hash * 7 + Integer.valueOf(fMarginHeight).hashCode(); return hash; }
@Override public int hashCode() { int hash = super.hashCode(); hash = hash * 7 + Boolean.valueOf(fVertical).hashCode(); for (int fPercent : fPercents) hash = hash * 7 + Integer.valueOf(fPercent).hashCode(); return hash; }
@Override public int hashCode() { int hash = super.hashCode(); hash = hash * 7 + Integer.valueOf(fTheight).hashCode(); hash = hash * 7 + Integer.valueOf(fMarginHeight).hashCode(); return hash; }