@Test public void testSerialization() throws IOException, ClassNotFoundException { BlockContainer c1 = new BlockContainer(); c1.add(new EmptyBlock(1.2, 3.4)); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(c1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray()) ); BlockContainer c2 = (BlockContainer) in.readObject(); in.close(); assertEquals(c1, c2); }
public void add(Block block) { add(block, null); }
BlockContainer extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { public void add(Block block) { add(block, null); } }
BlockContainer extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { public void add(Block block) { add(block, null); } BlockContainer();  BlockContainer(Arrangement arrangement); }
BlockContainer extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { public void add(Block block) { add(block, null); } BlockContainer();  BlockContainer(Arrangement arrangement); Arrangement getArrangement(); void setArrangement(Arrangement arrangement); boolean isEmpty(); List<Block> getBlocks(); void add(Block block); void add(Block block, Object key); void clear(); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); @Override boolean equals(Object obj); @Override Object clone(); }
BlockContainer extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { public void add(Block block) { add(block, null); } BlockContainer();  BlockContainer(Arrangement arrangement); Arrangement getArrangement(); void setArrangement(Arrangement arrangement); boolean isEmpty(); List<Block> getBlocks(); void add(Block block); void add(Block block, Object key); void clear(); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); @Override boolean equals(Object obj); @Override Object clone();  }