@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"); 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"); StandardXYZToolTipGenerator g1; StandardXYZToolTipGenerator g2; g1 = new StandardXYZToolTipGenerator(f1, xnf1, ynf1, znf1); g2 = new StandardXYZToolTipGenerator(f1, xnf1, ynf1, znf1); assertEquals(g1, g2); g1 = new StandardXYZToolTipGenerator(f2, xnf1, ynf1, znf1); assertFalse(g1.equals(g2)); g2 = new StandardXYZToolTipGenerator(f2, xnf1, ynf1, znf1); assertEquals(g1, g2); g1 = new StandardXYZToolTipGenerator(f2, xnf2, ynf1, znf1); assertFalse(g1.equals(g2)); g2 = new StandardXYZToolTipGenerator(f2, xnf2, ynf1, znf1); assertEquals(g1, g2); g1 = new StandardXYZToolTipGenerator(f2, xnf2, ynf2, znf1); assertFalse(g1.equals(g2)); g2 = new StandardXYZToolTipGenerator(f2, xnf2, ynf2, znf1); assertEquals(g1, g2); g1 = new StandardXYZToolTipGenerator(f2, xnf2, ynf2, znf2); assertFalse(g1.equals(g2)); g2 = new StandardXYZToolTipGenerator(f2, xnf2, ynf2, znf2); assertEquals(g1, g2); g1 = new StandardXYZToolTipGenerator(f2, xdf1, ydf1, zdf1); g2 = new StandardXYZToolTipGenerator(f2, xdf1, ydf1, zdf1); assertEquals(g1, g2); g1 = new StandardXYZToolTipGenerator(f2, xdf2, ydf1, zdf1); assertFalse(g1.equals(g2)); g2 = new StandardXYZToolTipGenerator(f2, xdf2, ydf1, zdf1); assertEquals(g1, g2); g1 = new StandardXYZToolTipGenerator(f2, xdf2, ydf2, zdf1); assertFalse(g1.equals(g2)); g2 = new StandardXYZToolTipGenerator(f2, xdf2, ydf2, zdf1); assertEquals(g1, g2); g1 = new StandardXYZToolTipGenerator(f2, xdf2, ydf2, zdf2); assertFalse(g1.equals(g2)); g2 = new StandardXYZToolTipGenerator(f2, xdf2, ydf2, zdf2); assertEquals(g1, g2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; }
StandardXYZToolTipGenerator extends StandardXYToolTipGenerator implements XYZToolTipGenerator, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; } }
StandardXYZToolTipGenerator extends StandardXYToolTipGenerator implements XYZToolTipGenerator, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; } StandardXYZToolTipGenerator();  StandardXYZToolTipGenerator(String formatString,
                                       NumberFormat xFormat,
                                       NumberFormat yFormat,
                                       NumberFormat zFormat);  StandardXYZToolTipGenerator(String formatString,
                                       DateFormat xFormat,
                                       DateFormat yFormat,
                                       DateFormat zFormat); }
StandardXYZToolTipGenerator extends StandardXYToolTipGenerator implements XYZToolTipGenerator, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; } StandardXYZToolTipGenerator();  StandardXYZToolTipGenerator(String formatString,
                                       NumberFormat xFormat,
                                       NumberFormat yFormat,
                                       NumberFormat zFormat);  StandardXYZToolTipGenerator(String formatString,
                                       DateFormat xFormat,
                                       DateFormat yFormat,
                                       DateFormat zFormat); NumberFormat getZFormat(); DateFormat getZDateFormat(); @Override String generateToolTip(XYZDataset dataset, int series, int item); @Override String generateLabelString(XYDataset dataset, int series, int item); @Override boolean equals(Object obj); }
StandardXYZToolTipGenerator extends StandardXYToolTipGenerator implements XYZToolTipGenerator, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; } StandardXYZToolTipGenerator();  StandardXYZToolTipGenerator(String formatString,
                                       NumberFormat xFormat,
                                       NumberFormat yFormat,
                                       NumberFormat zFormat);  StandardXYZToolTipGenerator(String formatString,
                                       DateFormat xFormat,
                                       DateFormat yFormat,
                                       DateFormat zFormat); NumberFormat getZFormat(); DateFormat getZDateFormat(); @Override String generateToolTip(XYZDataset dataset, int series, int item); @Override String generateLabelString(XYDataset dataset, int series, int item); @Override boolean equals(Object obj); static final String DEFAULT_TOOL_TIP_FORMAT; }