Class StandardEntityCollection

java.lang.Object
org.jfree.chart.entity.StandardEntityCollection
All Implemented Interfaces:
Serializable, Cloneable, EntityCollection

public class StandardEntityCollection
extends Object
implements EntityCollection, Cloneable, Serializable
A standard implementation of the EntityCollection interface.
See Also:
Serialized Form
  • Constructor Details

    • StandardEntityCollection

      public StandardEntityCollection()
      Constructs a new entity collection (initially empty).
  • Method Details

    • clear

      public void clear()
      Clears the entities.
      Specified by:
      clear in interface EntityCollection
    • addEntity

      public void addEntity​(ChartEntity entity)
      Adds an entity.
      Specified by:
      addEntity in interface EntityCollection
      Parameters:
      entity - the entity.
    • addEntities

      public void addEntities​(EntityCollection collection)
      Adds all the entities from the specified collection.
      Specified by:
      addEntities in interface EntityCollection
      Parameters:
      collection - the collection of entities.
    • getEntity

      public ChartEntity getEntity​(double x, double y)
      Returns an entity for the specified coordinates.
      Specified by:
      getEntity in interface EntityCollection
      Parameters:
      x - the x coordinate.
      y - the y coordinate.
      Returns:
      the entity.
    • getEntities

      public Collection getEntities()
      Returns the entities in an unmodifiable collection.
      Specified by:
      getEntities in interface EntityCollection
      Returns:
      The entities.
    • iterator

      public Iterator iterator()
      Returns an iterator for the entities in the collection.
      Specified by:
      iterator in interface EntityCollection
      Returns:
      An iterator.
    • equals

      public boolean equals​(Object obj)
      Tests this object for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to test against (null permitted).
      Returns:
      A boolean.
    • clone

      public Object clone() throws CloneNotSupportedException
      Returns a clone.
      Returns:
      A clone.
      Throws:
      CloneNotSupportedException - if the object cannot be cloned.