@Test public void testEquals() { String f1 = "{1}"; String f2 = "{2}"; NumberFormat xnf1 = new DecimalFormat("0.00"); NumberFormat xnf2 = new DecimalFormat("0.000"); NumberFormat ynf1 = new DecimalFormat("0.00"); NumberFormat ynf2 = new DecimalFormat("0.000"); NumberFormat znf1 = new DecimalFormat("0.00"); NumberFormat znf2 = new DecimalFormat("0.000"); BubbleXYItemLabelGenerator g1; BubbleXYItemLabelGenerator g2; g1 = new BubbleXYItemLabelGenerator(f1, xnf1, ynf1, znf1); g2 = new BubbleXYItemLabelGenerator(f1, xnf1, ynf1, znf1); assertEquals(g1, g2); assertEquals(g2, g1); g1 = new BubbleXYItemLabelGenerator(f2, xnf1, ynf1, znf1); assertFalse(g1.equals(g2)); g2 = new BubbleXYItemLabelGenerator(f2, xnf1, ynf1, znf1); assertEquals(g1, g2); g1 = new BubbleXYItemLabelGenerator(f2, xnf2, ynf1, znf1); assertFalse(g1.equals(g2)); g2 = new BubbleXYItemLabelGenerator(f2, xnf2, ynf1, znf1); assertEquals(g1, g2); g1 = new BubbleXYItemLabelGenerator(f2, xnf2, ynf2, znf1); assertFalse(g1.equals(g2)); g2 = new BubbleXYItemLabelGenerator(f2, xnf2, ynf2, znf1); assertEquals(g1, g2); g1 = new BubbleXYItemLabelGenerator(f2, xnf2, ynf2, znf2); assertFalse(g1.equals(g2)); g2 = new BubbleXYItemLabelGenerator(f2, xnf2, ynf2, znf2); assertEquals(g1, g2); DateFormat xdf1 = new SimpleDateFormat("d-MMM"); DateFormat xdf2 = new SimpleDateFormat("d-MMM-yyyy"); DateFormat ydf1 = new SimpleDateFormat("d-MMM"); DateFormat ydf2 = new SimpleDateFormat("d-MMM-yyyy"); DateFormat zdf1 = new SimpleDateFormat("d-MMM"); DateFormat zdf2 = new SimpleDateFormat("d-MMM-yyyy"); g1 = new BubbleXYItemLabelGenerator(f1, xdf1, ydf1, zdf1); g2 = new BubbleXYItemLabelGenerator(f1, xdf1, ydf1, zdf1); assertEquals(g1, g2); assertEquals(g2, g1); g1 = new BubbleXYItemLabelGenerator(f1, xdf2, ydf1, zdf1); assertFalse(g1.equals(g2)); g2 = new BubbleXYItemLabelGenerator(f1, xdf2, ydf1, zdf1); assertEquals(g1, g2); g1 = new BubbleXYItemLabelGenerator(f1, xdf2, ydf2, zdf1); assertFalse(g1.equals(g2)); g2 = new BubbleXYItemLabelGenerator(f1, xdf2, ydf2, zdf1); assertEquals(g1, g2); g1 = new BubbleXYItemLabelGenerator(f1, xdf2, ydf2, zdf2); assertFalse(g1.equals(g2)); g2 = new BubbleXYItemLabelGenerator(f1, xdf2, ydf2, zdf2); assertEquals(g1, g2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BubbleXYItemLabelGenerator)) { return false; } if (!super.equals(obj)) { return false; } BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; }
BubbleXYItemLabelGenerator extends AbstractXYItemLabelGenerator implements XYItemLabelGenerator, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BubbleXYItemLabelGenerator)) { return false; } if (!super.equals(obj)) { return false; } BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; } }
BubbleXYItemLabelGenerator extends AbstractXYItemLabelGenerator implements XYItemLabelGenerator, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BubbleXYItemLabelGenerator)) { return false; } if (!super.equals(obj)) { return false; } BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; } BubbleXYItemLabelGenerator();  BubbleXYItemLabelGenerator(String formatString,
            NumberFormat xFormat, NumberFormat yFormat, NumberFormat zFormat);  BubbleXYItemLabelGenerator(String formatString,
            DateFormat xFormat, DateFormat yFormat, DateFormat zFormat); }
BubbleXYItemLabelGenerator extends AbstractXYItemLabelGenerator implements XYItemLabelGenerator, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BubbleXYItemLabelGenerator)) { return false; } if (!super.equals(obj)) { return false; } BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; } BubbleXYItemLabelGenerator();  BubbleXYItemLabelGenerator(String formatString,
            NumberFormat xFormat, NumberFormat yFormat, NumberFormat zFormat);  BubbleXYItemLabelGenerator(String formatString,
            DateFormat xFormat, DateFormat yFormat, DateFormat zFormat); NumberFormat getZFormat(); DateFormat getZDateFormat(); @Override String generateLabel(XYDataset dataset, int series, int item); @Override String generateLabelString(XYDataset dataset, int series, int item); @Override boolean equals(Object obj); @Override int hashCode(); }
BubbleXYItemLabelGenerator extends AbstractXYItemLabelGenerator implements XYItemLabelGenerator, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BubbleXYItemLabelGenerator)) { return false; } if (!super.equals(obj)) { return false; } BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; } BubbleXYItemLabelGenerator();  BubbleXYItemLabelGenerator(String formatString,
            NumberFormat xFormat, NumberFormat yFormat, NumberFormat zFormat);  BubbleXYItemLabelGenerator(String formatString,
            DateFormat xFormat, DateFormat yFormat, DateFormat zFormat); NumberFormat getZFormat(); DateFormat getZDateFormat(); @Override String generateLabel(XYDataset dataset, int series, int item); @Override String generateLabelString(XYDataset dataset, int series, int item); @Override boolean equals(Object obj); @Override int hashCode(); static final String DEFAULT_FORMAT_STRING; }