@Test public void testEquals() { BlockBorder b1 = new BlockBorder(new RectangleInsets(1.0, 2.0, 3.0, 4.0), Color.RED); BlockBorder b2 = new BlockBorder(new RectangleInsets(1.0, 2.0, 3.0, 4.0), Color.RED); assertEquals(b1, b2); assertEquals(b2, b2); b1 = new BlockBorder(new RectangleInsets(UnitType.RELATIVE, 1.0, 2.0, 3.0, 4.0), Color.RED); assertFalse(b1.equals(b2)); b2 = new BlockBorder(new RectangleInsets(UnitType.RELATIVE, 1.0, 2.0, 3.0, 4.0), Color.RED); assertEquals(b1, b2); b1 = new BlockBorder(new RectangleInsets(1.0, 2.0, 3.0, 4.0), Color.BLUE); assertFalse(b1.equals(b2)); b2 = new BlockBorder(new RectangleInsets(1.0, 2.0, 3.0, 4.0), Color.BLUE); assertEquals(b1, b2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlockBorder)) { return false; } BlockBorder that = (BlockBorder) obj; if (!this.insets.equals(that.insets)) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; }
BlockBorder implements BlockFrame, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlockBorder)) { return false; } BlockBorder that = (BlockBorder) obj; if (!this.insets.equals(that.insets)) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; } }
BlockBorder implements BlockFrame, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlockBorder)) { return false; } BlockBorder that = (BlockBorder) obj; if (!this.insets.equals(that.insets)) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; } BlockBorder();  BlockBorder(Paint paint);  BlockBorder(double top, double left, double bottom, double right);  BlockBorder(double top, double left, double bottom, double right,
                       Paint paint);  BlockBorder(RectangleInsets insets, Paint paint); }
BlockBorder implements BlockFrame, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlockBorder)) { return false; } BlockBorder that = (BlockBorder) obj; if (!this.insets.equals(that.insets)) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; } BlockBorder();  BlockBorder(Paint paint);  BlockBorder(double top, double left, double bottom, double right);  BlockBorder(double top, double left, double bottom, double right,
                       Paint paint);  BlockBorder(RectangleInsets insets, Paint paint); @Override RectangleInsets getInsets(); Paint getPaint(); @Override void draw(Graphics2D g2, Rectangle2D area); @Override boolean equals(Object obj); }
BlockBorder implements BlockFrame, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlockBorder)) { return false; } BlockBorder that = (BlockBorder) obj; if (!this.insets.equals(that.insets)) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; } BlockBorder();  BlockBorder(Paint paint);  BlockBorder(double top, double left, double bottom, double right);  BlockBorder(double top, double left, double bottom, double right,
                       Paint paint);  BlockBorder(RectangleInsets insets, Paint paint); @Override RectangleInsets getInsets(); Paint getPaint(); @Override void draw(Graphics2D g2, Rectangle2D area); @Override boolean equals(Object obj); static final BlockBorder NONE; }