/** * Returns a string representation of the plot entity, useful for * debugging. * * @return A string. */ public String toString() { StringBuffer buf = new StringBuffer("PlotEntity: "); buf.append("tooltip = "); buf.append(getToolTipText()); return buf.toString(); }
/** * Returns a string representation of the plot entity, useful for * debugging. * * @return A string. */ @Override public String toString() { StringBuilder sb = new StringBuilder("PlotEntity: "); sb.append("tooltip = "); sb.append(getToolTipText()); return sb.toString(); }
/** * Returns a hash code for this instance. * * @return A hash code. */ @Override public int hashCode() { int result = 39; result = HashUtils.hashCode(result, getToolTipText()); result = HashUtils.hashCode(result, getURLText()); return result; }
/** * Returns a hash code for this instance. * * @return A hash code. */ public int hashCode() { int result = 39; result = HashUtilities.hashCode(result, getToolTipText()); result = HashUtilities.hashCode(result, getURLText()); return result; }
/** * Tests the entity for equality with an arbitrary object. * * @param obj the object to test against (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PlotEntity)) { return false; } PlotEntity that = (PlotEntity) obj; if (!getArea().equals(that.getArea())) { return false; } if (!ObjectUtilities.equal(getToolTipText(), that.getToolTipText())) { return false; } if (!ObjectUtilities.equal(getURLText(), that.getURLText())) { return false; } if (!(this.plot.equals(that.plot))) { return false; } return true; }
/** * Tests the entity for equality with an arbitrary object. * * @param obj the object to test against ({@code null} permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PlotEntity)) { return false; } PlotEntity that = (PlotEntity) obj; if (!getArea().equals(that.getArea())) { return false; } if (!ObjectUtils.equal(getToolTipText(), that.getToolTipText())) { return false; } if (!ObjectUtils.equal(getURLText(), that.getURLText())) { return false; } if (!(this.plot.equals(that.plot))) { return false; } return true; }