@Test public void testEquals() { StandardPieSectionLabelGenerator g1 = new StandardPieSectionLabelGenerator(); StandardPieSectionLabelGenerator g2 = new StandardPieSectionLabelGenerator(); assertEquals(g1, g2); assertEquals(g2, g1); g1 = new StandardPieSectionLabelGenerator("{0}", new DecimalFormat("#,##0.00"), NumberFormat.getPercentInstance()); assertFalse(g1.equals(g2)); g2 = new StandardPieSectionLabelGenerator("{0}", new DecimalFormat("#,##0.00"), NumberFormat.getPercentInstance()); assertEquals(g1, g2); g1 = new StandardPieSectionLabelGenerator("{0} {1}", new DecimalFormat("#,##0.00"), NumberFormat.getPercentInstance()); assertFalse(g1.equals(g2)); g2 = new StandardPieSectionLabelGenerator("{0} {1}", new DecimalFormat("#,##0.00"), NumberFormat.getPercentInstance()); assertEquals(g1, g2); g1 = new StandardPieSectionLabelGenerator("{0} {1}", new DecimalFormat("#,##0"), NumberFormat.getPercentInstance()); assertFalse(g1.equals(g2)); g2 = new StandardPieSectionLabelGenerator("{0} {1}", new DecimalFormat("#,##0"), NumberFormat.getPercentInstance()); assertEquals(g1, g2); g1 = new StandardPieSectionLabelGenerator("{0} {1}", new DecimalFormat("#,##0"), new DecimalFormat("0.000%")); assertFalse(g1.equals(g2)); g2 = new StandardPieSectionLabelGenerator("{0} {1}", new DecimalFormat("#,##0"), new DecimalFormat("0.000%")); assertEquals(g1, g2); AttributedString as = new AttributedString("XYZ"); g1.setAttributedLabel(0, as); assertFalse(g1.equals(g2)); g2.setAttributedLabel(0, as); assertEquals(g1, g2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieSectionLabelGenerator)) { return false; } StandardPieSectionLabelGenerator that = (StandardPieSectionLabelGenerator) obj; if (!this.attributedLabels.equals(that.attributedLabels)) { return false; } if (!super.equals(obj)) { return false; } return true; }
StandardPieSectionLabelGenerator extends AbstractPieItemLabelGenerator implements PieSectionLabelGenerator, Cloneable, PublicCloneable,
                   Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieSectionLabelGenerator)) { return false; } StandardPieSectionLabelGenerator that = (StandardPieSectionLabelGenerator) obj; if (!this.attributedLabels.equals(that.attributedLabels)) { return false; } if (!super.equals(obj)) { return false; } return true; } }
StandardPieSectionLabelGenerator extends AbstractPieItemLabelGenerator implements PieSectionLabelGenerator, Cloneable, PublicCloneable,
                   Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieSectionLabelGenerator)) { return false; } StandardPieSectionLabelGenerator that = (StandardPieSectionLabelGenerator) obj; if (!this.attributedLabels.equals(that.attributedLabels)) { return false; } if (!super.equals(obj)) { return false; } return true; } StandardPieSectionLabelGenerator();  StandardPieSectionLabelGenerator(Locale locale);  StandardPieSectionLabelGenerator(String labelFormat);  StandardPieSectionLabelGenerator(String labelFormat, Locale locale);  StandardPieSectionLabelGenerator(String labelFormat,
            NumberFormat numberFormat, NumberFormat percentFormat); }
StandardPieSectionLabelGenerator extends AbstractPieItemLabelGenerator implements PieSectionLabelGenerator, Cloneable, PublicCloneable,
                   Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieSectionLabelGenerator)) { return false; } StandardPieSectionLabelGenerator that = (StandardPieSectionLabelGenerator) obj; if (!this.attributedLabels.equals(that.attributedLabels)) { return false; } if (!super.equals(obj)) { return false; } return true; } StandardPieSectionLabelGenerator();  StandardPieSectionLabelGenerator(Locale locale);  StandardPieSectionLabelGenerator(String labelFormat);  StandardPieSectionLabelGenerator(String labelFormat, Locale locale);  StandardPieSectionLabelGenerator(String labelFormat,
            NumberFormat numberFormat, NumberFormat percentFormat); AttributedString getAttributedLabel(int section); void setAttributedLabel(int section, AttributedString label); @Override String generateSectionLabel(PieDataset dataset, Comparable key); @Override AttributedString generateAttributedSectionLabel(PieDataset dataset,
                                                           Comparable key); @Override boolean equals(Object obj); @Override Object clone(); }
StandardPieSectionLabelGenerator extends AbstractPieItemLabelGenerator implements PieSectionLabelGenerator, Cloneable, PublicCloneable,
                   Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieSectionLabelGenerator)) { return false; } StandardPieSectionLabelGenerator that = (StandardPieSectionLabelGenerator) obj; if (!this.attributedLabels.equals(that.attributedLabels)) { return false; } if (!super.equals(obj)) { return false; } return true; } StandardPieSectionLabelGenerator();  StandardPieSectionLabelGenerator(Locale locale);  StandardPieSectionLabelGenerator(String labelFormat);  StandardPieSectionLabelGenerator(String labelFormat, Locale locale);  StandardPieSectionLabelGenerator(String labelFormat,
            NumberFormat numberFormat, NumberFormat percentFormat); AttributedString getAttributedLabel(int section); void setAttributedLabel(int section, AttributedString label); @Override String generateSectionLabel(PieDataset dataset, Comparable key); @Override AttributedString generateAttributedSectionLabel(PieDataset dataset,
                                                           Comparable key); @Override boolean equals(Object obj); @Override Object clone(); static final String DEFAULT_SECTION_LABEL_FORMAT; }