@Test public void testEquals() { FlowArrangement f1 = new FlowArrangement(HorizontalAlignment.LEFT, VerticalAlignment.TOP, 1.0, 2.0); FlowArrangement f2 = new FlowArrangement(HorizontalAlignment.LEFT, VerticalAlignment.TOP, 1.0, 2.0); assertEquals(f1, f2); assertEquals(f2, f1); f1 = new FlowArrangement(HorizontalAlignment.RIGHT, VerticalAlignment.TOP, 1.0, 2.0); assertFalse(f1.equals(f2)); f2 = new FlowArrangement(HorizontalAlignment.RIGHT, VerticalAlignment.TOP, 1.0, 2.0); assertEquals(f1, f2); f1 = new FlowArrangement(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM, 1.0, 2.0); assertFalse(f1.equals(f2)); f2 = new FlowArrangement(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM, 1.0, 2.0); assertEquals(f1, f2); f1 = new FlowArrangement(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM, 1.1, 2.0); assertFalse(f1.equals(f2)); f2 = new FlowArrangement(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM, 1.1, 2.0); assertEquals(f1, f2); f1 = new FlowArrangement(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM, 1.1, 2.2); assertFalse(f1.equals(f2)); f2 = new FlowArrangement(HorizontalAlignment.RIGHT, VerticalAlignment.BOTTOM, 1.1, 2.2); assertEquals(f1, f2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FlowArrangement)) { return false; } FlowArrangement that = (FlowArrangement) obj; if (this.horizontalAlignment != that.horizontalAlignment) { return false; } if (this.verticalAlignment != that.verticalAlignment) { return false; } if (this.horizontalGap != that.horizontalGap) { return false; } if (this.verticalGap != that.verticalGap) { return false; } return true; }
FlowArrangement implements Arrangement, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FlowArrangement)) { return false; } FlowArrangement that = (FlowArrangement) obj; if (this.horizontalAlignment != that.horizontalAlignment) { return false; } if (this.verticalAlignment != that.verticalAlignment) { return false; } if (this.horizontalGap != that.horizontalGap) { return false; } if (this.verticalGap != that.verticalGap) { return false; } return true; } }
FlowArrangement implements Arrangement, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FlowArrangement)) { return false; } FlowArrangement that = (FlowArrangement) obj; if (this.horizontalAlignment != that.horizontalAlignment) { return false; } if (this.verticalAlignment != that.verticalAlignment) { return false; } if (this.horizontalGap != that.horizontalGap) { return false; } if (this.verticalGap != that.verticalGap) { return false; } return true; } FlowArrangement();  FlowArrangement(HorizontalAlignment hAlign, VerticalAlignment vAlign,
                           double hGap, double vGap); }
FlowArrangement implements Arrangement, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FlowArrangement)) { return false; } FlowArrangement that = (FlowArrangement) obj; if (this.horizontalAlignment != that.horizontalAlignment) { return false; } if (this.verticalAlignment != that.verticalAlignment) { return false; } if (this.horizontalGap != that.horizontalGap) { return false; } if (this.verticalGap != that.verticalGap) { return false; } return true; } FlowArrangement();  FlowArrangement(HorizontalAlignment hAlign, VerticalAlignment vAlign,
                           double hGap, double vGap); @Override void add(Block block, Object key); @Override Size2D arrange(BlockContainer container, Graphics2D g2,
                          RectangleConstraint constraint); @Override void clear(); @Override boolean equals(Object obj); }
FlowArrangement implements Arrangement, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FlowArrangement)) { return false; } FlowArrangement that = (FlowArrangement) obj; if (this.horizontalAlignment != that.horizontalAlignment) { return false; } if (this.verticalAlignment != that.verticalAlignment) { return false; } if (this.horizontalGap != that.horizontalGap) { return false; } if (this.verticalGap != that.verticalGap) { return false; } return true; } FlowArrangement();  FlowArrangement(HorizontalAlignment hAlign, VerticalAlignment vAlign,
                           double hGap, double vGap); @Override void add(Block block, Object key); @Override Size2D arrange(BlockContainer container, Graphics2D g2,
                          RectangleConstraint constraint); @Override void clear(); @Override boolean equals(Object obj);  }