@Test public void testSerialization() throws IOException, ClassNotFoundException { PieSectionEntity e1 = new PieSectionEntity(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), new DefaultPieDataset(), 0, 1, "Key", "ToolTip", "URL"); StandardEntityCollection c1 = new StandardEntityCollection(); c1.add(e1); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(c1); out.close(); ObjectInput in = new ObjectInputStream(new ByteArrayInputStream( buffer.toByteArray())); StandardEntityCollection c2 = (StandardEntityCollection) in.readObject(); in.close(); assertEquals(c1, c2); }
@Override public void add(ChartEntity entity) { if (entity == null) { throw new IllegalArgumentException("Null 'entity' argument."); } this.entities.add(entity); }
StandardEntityCollection implements EntityCollection,
        Cloneable, PublicCloneable, Serializable { @Override public void add(ChartEntity entity) { if (entity == null) { throw new IllegalArgumentException("Null 'entity' argument."); } this.entities.add(entity); } }
StandardEntityCollection implements EntityCollection,
        Cloneable, PublicCloneable, Serializable { @Override public void add(ChartEntity entity) { if (entity == null) { throw new IllegalArgumentException("Null 'entity' argument."); } this.entities.add(entity); } StandardEntityCollection(); }
StandardEntityCollection implements EntityCollection,
        Cloneable, PublicCloneable, Serializable { @Override public void add(ChartEntity entity) { if (entity == null) { throw new IllegalArgumentException("Null 'entity' argument."); } this.entities.add(entity); } StandardEntityCollection(); @Override int getEntityCount(); @Override ChartEntity getEntity(int index); @Override void clear(); @Override void add(ChartEntity entity); @Override void addAll(EntityCollection collection); @Override ChartEntity getEntity(double x, double y); @Override Collection<ChartEntity> getEntities(); @Override Iterator<ChartEntity> iterator(); @Override boolean equals(Object obj); @Override Object clone(); }
StandardEntityCollection implements EntityCollection,
        Cloneable, PublicCloneable, Serializable { @Override public void add(ChartEntity entity) { if (entity == null) { throw new IllegalArgumentException("Null 'entity' argument."); } this.entities.add(entity); } StandardEntityCollection(); @Override int getEntityCount(); @Override ChartEntity getEntity(int index); @Override void clear(); @Override void add(ChartEntity entity); @Override void addAll(EntityCollection collection); @Override ChartEntity getEntity(double x, double y); @Override Collection<ChartEntity> getEntities(); @Override Iterator<ChartEntity> iterator(); @Override boolean equals(Object obj); @Override Object clone();  }