@Test public void testEquals() { GridArrangement f1 = new GridArrangement(11, 22); GridArrangement f2 = new GridArrangement(11, 22); assertEquals(f1, f2); assertEquals(f2, f1); f1 = new GridArrangement(33, 22); assertFalse(f1.equals(f2)); f2 = new GridArrangement(33, 22); assertEquals(f1, f2); f1 = new GridArrangement(33, 44); assertFalse(f1.equals(f2)); f2 = new GridArrangement(33, 44); assertEquals(f1, f2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GridArrangement)) { return false; } GridArrangement that = (GridArrangement) obj; if (this.columns != that.columns) { return false; } if (this.rows != that.rows) { return false; } return true; }
GridArrangement implements Arrangement, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GridArrangement)) { return false; } GridArrangement that = (GridArrangement) obj; if (this.columns != that.columns) { return false; } if (this.rows != that.rows) { return false; } return true; } }
GridArrangement implements Arrangement, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GridArrangement)) { return false; } GridArrangement that = (GridArrangement) obj; if (this.columns != that.columns) { return false; } if (this.rows != that.rows) { return false; } return true; } GridArrangement(int rows, int columns); }
GridArrangement implements Arrangement, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GridArrangement)) { return false; } GridArrangement that = (GridArrangement) obj; if (this.columns != that.columns) { return false; } if (this.rows != that.rows) { return false; } return true; } GridArrangement(int rows, int columns); @Override void add(Block block, Object key); @Override Size2D arrange(BlockContainer container, Graphics2D g2,
                          RectangleConstraint constraint); @Override void clear(); @Override boolean equals(Object obj); }
GridArrangement implements Arrangement, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GridArrangement)) { return false; } GridArrangement that = (GridArrangement) obj; if (this.columns != that.columns) { return false; } if (this.rows != that.rows) { return false; } return true; } GridArrangement(int rows, int columns); @Override void add(Block block, Object key); @Override Size2D arrange(BlockContainer container, Graphics2D g2,
                          RectangleConstraint constraint); @Override void clear(); @Override boolean equals(Object obj);  }