Package org.jfree.chart.entity
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 Summary
Constructors Constructor Description StandardEntityCollection()
Constructs a new entity collection (initially empty). -
Method Summary
Modifier and Type Method Description void
addEntities(EntityCollection collection)
Adds all the entities from the specified collection.void
addEntity(ChartEntity entity)
Adds an entity.void
clear()
Clears the entities.Object
clone()
Returns a clone.boolean
equals(Object obj)
Tests this object for equality with an arbitrary object.Collection
getEntities()
Returns the entities in an unmodifiable collection.ChartEntity
getEntity(double x, double y)
Returns an entity for the specified coordinates.Iterator
iterator()
Returns an iterator for the entities in the collection.
-
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 interfaceEntityCollection
-
addEntity
Adds an entity.- Specified by:
addEntity
in interfaceEntityCollection
- Parameters:
entity
- the entity.
-
addEntities
Adds all the entities from the specified collection.- Specified by:
addEntities
in interfaceEntityCollection
- Parameters:
collection
- the collection of entities.
-
getEntity
Returns an entity for the specified coordinates.- Specified by:
getEntity
in interfaceEntityCollection
- Parameters:
x
- the x coordinate.y
- the y coordinate.- Returns:
- the entity.
-
getEntities
Returns the entities in an unmodifiable collection.- Specified by:
getEntities
in interfaceEntityCollection
- Returns:
- The entities.
-
iterator
Returns an iterator for the entities in the collection.- Specified by:
iterator
in interfaceEntityCollection
- Returns:
- An iterator.
-
equals
Tests this object for equality with an arbitrary object. -
clone
Returns a clone.- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if the object cannot be cloned.
-