@Test public void testCloning() throws CloneNotSupportedException { EmptyBlock b1 = new EmptyBlock(1.0, 2.0); EmptyBlock b2 = (EmptyBlock) b1.clone(); assertNotSame(b1, b2); assertSame(b1.getClass(), b2.getClass()); assertEquals(b1, b2); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
EmptyBlock extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
EmptyBlock extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } EmptyBlock(double width, double height); }
EmptyBlock extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } EmptyBlock(double width, double height); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); @Override Object clone(); }
EmptyBlock extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } EmptyBlock(double width, double height); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); @Override Object clone();  }