@Test public void testEquals() { StandardEntityCollection c1 = new StandardEntityCollection(); StandardEntityCollection c2 = new StandardEntityCollection(); assertEquals(c1, c2); PieSectionEntity e1 = new PieSectionEntity(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), new DefaultPieDataset(), 0, 1, "Key", "ToolTip", "URL"); c1.add(e1); assertFalse(c1.equals(c2)); PieSectionEntity e2 = new PieSectionEntity(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), new DefaultPieDataset(), 0, 1, "Key", "ToolTip", "URL"); c2.add(e2); assertEquals(c1, c2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof StandardEntityCollection) { StandardEntityCollection that = (StandardEntityCollection) obj; return ObjectUtilities.equal(this.entities, that.entities); } return false; }
StandardEntityCollection implements EntityCollection,
        Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof StandardEntityCollection) { StandardEntityCollection that = (StandardEntityCollection) obj; return ObjectUtilities.equal(this.entities, that.entities); } return false; } }
StandardEntityCollection implements EntityCollection,
        Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof StandardEntityCollection) { StandardEntityCollection that = (StandardEntityCollection) obj; return ObjectUtilities.equal(this.entities, that.entities); } return false; } StandardEntityCollection(); }
StandardEntityCollection implements EntityCollection,
        Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof StandardEntityCollection) { StandardEntityCollection that = (StandardEntityCollection) obj; return ObjectUtilities.equal(this.entities, that.entities); } return false; } 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 boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof StandardEntityCollection) { StandardEntityCollection that = (StandardEntityCollection) obj; return ObjectUtilities.equal(this.entities, that.entities); } return false; } 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();  }