@Test public void testEquals() { PeriodAxisLabelInfo info1 = new PeriodAxisLabelInfo(Day.class, new SimpleDateFormat("d")); PeriodAxisLabelInfo info2 = new PeriodAxisLabelInfo(Day.class, new SimpleDateFormat("d")); assertEquals(info1, info2); assertEquals(info2, info1); Class c1 = Day.class; Class c2 = Month.class; DateFormat df1 = new SimpleDateFormat("d"); DateFormat df2 = new SimpleDateFormat("MMM"); RectangleInsets sp1 = new RectangleInsets(1, 1, 1, 1); RectangleInsets sp2 = new RectangleInsets(2, 2, 2, 2); Font lf1 = new Font("SansSerif", Font.PLAIN, 10); Font lf2 = new Font("SansSerif", Font.BOLD, 9); Paint lp1 = Color.BLACK; Paint lp2 = Color.BLUE; boolean b1 = true; boolean b2 = false; Stroke s1 = new BasicStroke(0.5f); Stroke s2 = new BasicStroke(0.25f); Paint dp1 = Color.RED; Paint dp2 = Color.green; info1 = new PeriodAxisLabelInfo(c2, df1, sp1, lf1, lp1, b1, s1, dp1); info2 = new PeriodAxisLabelInfo(c1, df1, sp1, lf1, lp1, b1, s1, dp1); assertFalse(info1.equals(info2)); info2 = new PeriodAxisLabelInfo(c2, df1, sp1, lf1, lp1, b1, s1, dp1); assertEquals(info1, info2); info1 = new PeriodAxisLabelInfo(c2, df2, sp1, lf1, lp1, b1, s1, dp1); assertFalse(info1.equals(info2)); info2 = new PeriodAxisLabelInfo(c2, df2, sp1, lf1, lp1, b1, s1, dp1); assertEquals(info1, info2); info1 = new PeriodAxisLabelInfo(c2, df2, sp2, lf1, lp1, b1, s1, dp1); assertFalse(info1.equals(info2)); info2 = new PeriodAxisLabelInfo(c2, df2, sp2, lf1, lp1, b1, s1, dp1); assertEquals(info1, info2); info1 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp1, b1, s1, dp1); assertFalse(info1.equals(info2)); info2 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp1, b1, s1, dp1); assertEquals(info1, info2); info1 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp2, b1, s1, dp1); assertFalse(info1.equals(info2)); info2 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp2, b1, s1, dp1); assertEquals(info1, info2); info1 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp2, b2, s1, dp1); assertFalse(info1.equals(info2)); info2 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp2, b2, s1, dp1); assertEquals(info1, info2); info1 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp2, b2, s2, dp1); assertFalse(info1.equals(info2)); info2 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp2, b2, s2, dp1); assertEquals(info1, info2); info1 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp2, b2, s2, dp2); assertFalse(info1.equals(info2)); info2 = new PeriodAxisLabelInfo(c2, df2, sp2, lf2, lp2, b2, s2, dp2); assertEquals(info1, info2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof PeriodAxisLabelInfo) { PeriodAxisLabelInfo info = (PeriodAxisLabelInfo) obj; if (!info.periodClass.equals(this.periodClass)) { return false; } if (!info.dateFormat.equals(this.dateFormat)) { return false; } if (!info.padding.equals(this.padding)) { return false; } if (!info.labelFont.equals(this.labelFont)) { return false; } if (!info.labelPaint.equals(this.labelPaint)) { return false; } if (info.drawDividers != this.drawDividers) { return false; } if (!info.dividerStroke.equals(this.dividerStroke)) { return false; } if (!info.dividerPaint.equals(this.dividerPaint)) { return false; } return true; } return false; }
PeriodAxisLabelInfo implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof PeriodAxisLabelInfo) { PeriodAxisLabelInfo info = (PeriodAxisLabelInfo) obj; if (!info.periodClass.equals(this.periodClass)) { return false; } if (!info.dateFormat.equals(this.dateFormat)) { return false; } if (!info.padding.equals(this.padding)) { return false; } if (!info.labelFont.equals(this.labelFont)) { return false; } if (!info.labelPaint.equals(this.labelPaint)) { return false; } if (info.drawDividers != this.drawDividers) { return false; } if (!info.dividerStroke.equals(this.dividerStroke)) { return false; } if (!info.dividerPaint.equals(this.dividerPaint)) { return false; } return true; } return false; } }
PeriodAxisLabelInfo implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof PeriodAxisLabelInfo) { PeriodAxisLabelInfo info = (PeriodAxisLabelInfo) obj; if (!info.periodClass.equals(this.periodClass)) { return false; } if (!info.dateFormat.equals(this.dateFormat)) { return false; } if (!info.padding.equals(this.padding)) { return false; } if (!info.labelFont.equals(this.labelFont)) { return false; } if (!info.labelPaint.equals(this.labelPaint)) { return false; } if (info.drawDividers != this.drawDividers) { return false; } if (!info.dividerStroke.equals(this.dividerStroke)) { return false; } if (!info.dividerPaint.equals(this.dividerPaint)) { return false; } return true; } return false; } PeriodAxisLabelInfo(Class<? extends RegularTimePeriod> periodClass, 
            DateFormat dateFormat);  PeriodAxisLabelInfo(Class<? extends RegularTimePeriod> periodClass, 
            DateFormat dateFormat, RectangleInsets padding, Font labelFont, 
            Paint labelPaint, boolean drawDividers, Stroke dividerStroke,
            Paint dividerPaint); }
PeriodAxisLabelInfo implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof PeriodAxisLabelInfo) { PeriodAxisLabelInfo info = (PeriodAxisLabelInfo) obj; if (!info.periodClass.equals(this.periodClass)) { return false; } if (!info.dateFormat.equals(this.dateFormat)) { return false; } if (!info.padding.equals(this.padding)) { return false; } if (!info.labelFont.equals(this.labelFont)) { return false; } if (!info.labelPaint.equals(this.labelPaint)) { return false; } if (info.drawDividers != this.drawDividers) { return false; } if (!info.dividerStroke.equals(this.dividerStroke)) { return false; } if (!info.dividerPaint.equals(this.dividerPaint)) { return false; } return true; } return false; } PeriodAxisLabelInfo(Class<? extends RegularTimePeriod> periodClass, 
            DateFormat dateFormat);  PeriodAxisLabelInfo(Class<? extends RegularTimePeriod> periodClass, 
            DateFormat dateFormat, RectangleInsets padding, Font labelFont, 
            Paint labelPaint, boolean drawDividers, Stroke dividerStroke,
            Paint dividerPaint); Class getPeriodClass(); DateFormat getDateFormat(); RectangleInsets getPadding(); Font getLabelFont(); Paint getLabelPaint(); boolean getDrawDividers(); Stroke getDividerStroke(); Paint getDividerPaint(); RegularTimePeriod createInstance(Date millisecond, TimeZone zone,
            Locale locale); @Override boolean equals(Object obj); @Override int hashCode(); }
PeriodAxisLabelInfo implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof PeriodAxisLabelInfo) { PeriodAxisLabelInfo info = (PeriodAxisLabelInfo) obj; if (!info.periodClass.equals(this.periodClass)) { return false; } if (!info.dateFormat.equals(this.dateFormat)) { return false; } if (!info.padding.equals(this.padding)) { return false; } if (!info.labelFont.equals(this.labelFont)) { return false; } if (!info.labelPaint.equals(this.labelPaint)) { return false; } if (info.drawDividers != this.drawDividers) { return false; } if (!info.dividerStroke.equals(this.dividerStroke)) { return false; } if (!info.dividerPaint.equals(this.dividerPaint)) { return false; } return true; } return false; } PeriodAxisLabelInfo(Class<? extends RegularTimePeriod> periodClass, 
            DateFormat dateFormat);  PeriodAxisLabelInfo(Class<? extends RegularTimePeriod> periodClass, 
            DateFormat dateFormat, RectangleInsets padding, Font labelFont, 
            Paint labelPaint, boolean drawDividers, Stroke dividerStroke,
            Paint dividerPaint); Class getPeriodClass(); DateFormat getDateFormat(); RectangleInsets getPadding(); Font getLabelFont(); Paint getLabelPaint(); boolean getDrawDividers(); Stroke getDividerStroke(); Paint getDividerPaint(); RegularTimePeriod createInstance(Date millisecond, TimeZone zone,
            Locale locale); @Override boolean equals(Object obj); @Override int hashCode(); static final RectangleInsets DEFAULT_INSETS; static final Font DEFAULT_FONT; static final Paint DEFAULT_LABEL_PAINT; static final Stroke DEFAULT_DIVIDER_STROKE; static final Paint DEFAULT_DIVIDER_PAINT; }