@Test public void testEquals() { MeterInterval m1 = new MeterInterval( "Label 1", new Range(1.2, 3.4), Color.RED, new BasicStroke(1.0f), Color.BLUE ); MeterInterval m2 = new MeterInterval( "Label 1", new Range(1.2, 3.4), Color.RED, new BasicStroke(1.0f), Color.BLUE ); assertEquals(m1, m2); assertEquals(m2, m1); m1 = new MeterInterval( "Label 2", new Range(1.2, 3.4), Color.RED, new BasicStroke(1.0f), Color.BLUE ); assertFalse(m1.equals(m2)); m2 = new MeterInterval( "Label 2", new Range(1.2, 3.4), Color.RED, new BasicStroke(1.0f), Color.BLUE ); assertEquals(m1, m2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MeterInterval)) { return false; } MeterInterval that = (MeterInterval) obj; if (!this.label.equals(that.label)) { return false; } if (!this.range.equals(that.range)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } return true; }
MeterInterval implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MeterInterval)) { return false; } MeterInterval that = (MeterInterval) obj; if (!this.label.equals(that.label)) { return false; } if (!this.range.equals(that.range)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } return true; } }
MeterInterval implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MeterInterval)) { return false; } MeterInterval that = (MeterInterval) obj; if (!this.label.equals(that.label)) { return false; } if (!this.range.equals(that.range)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } return true; } MeterInterval(String label, Range range);  MeterInterval(String label, Range range, Paint outlinePaint,
                         Stroke outlineStroke, Paint backgroundPaint); }
MeterInterval implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MeterInterval)) { return false; } MeterInterval that = (MeterInterval) obj; if (!this.label.equals(that.label)) { return false; } if (!this.range.equals(that.range)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } return true; } MeterInterval(String label, Range range);  MeterInterval(String label, Range range, Paint outlinePaint,
                         Stroke outlineStroke, Paint backgroundPaint); String getLabel(); Range getRange(); Paint getBackgroundPaint(); Paint getOutlinePaint(); Stroke getOutlineStroke(); @Override boolean equals(Object obj); }
MeterInterval implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MeterInterval)) { return false; } MeterInterval that = (MeterInterval) obj; if (!this.label.equals(that.label)) { return false; } if (!this.range.equals(that.range)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } return true; } MeterInterval(String label, Range range);  MeterInterval(String label, Range range, Paint outlinePaint,
                         Stroke outlineStroke, Paint backgroundPaint); String getLabel(); Range getRange(); Paint getBackgroundPaint(); Paint getOutlinePaint(); Stroke getOutlineStroke(); @Override boolean equals(Object obj);  }