/** * Tests this instance for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryLabelEntity)) { return false; } CategoryLabelEntity that = (CategoryLabelEntity) obj; if (!ObjectUtilities.equal(this.key, that.key)) { return false; } return super.equals(obj); }
/** * Returns a hash code for this instance. * * @return A hash code. */ @Override public int hashCode() { int result = super.hashCode(); result = HashUtils.hashCode(result, this.key); return result; }
/** * decode TickLabelEntity into key-value pair of Area's componentScope. * @param area the Area where the final attribute is set * @param info the TickLabelEntity to be decoded. */ private void decodeTickLabelInfo(Area area, TickLabelEntity info, Chart chart) { if (info == null) { return; } final ChartModel model = chart.getModel(); final int seq = ((Integer)chart.getAttribute("TICK_SEQ")).intValue(); if (model instanceof CategoryModel) { Comparable category = ((CategoryModel)model).getCategory(seq); area.setAttribute("category", category); if (chart.isShowTooltiptext() && info.getToolTipText() == null) { area.setTooltiptext(category.toString()); } } }
/** * Returns a hash code for this instance. * * @return A hash code. */ public int hashCode() { int result = super.hashCode(); result = HashUtilities.hashCode(result, this.key); return result; }
/** * Tests this instance for equality with an arbitrary object. * * @param obj the object ({@code null} permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryLabelEntity)) { return false; } CategoryLabelEntity that = (CategoryLabelEntity) obj; if (!ObjectUtils.equal(this.key, that.key)) { return false; } return super.equals(obj); }