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 voidaddEntities(EntityCollection collection)Adds all the entities from the specified collection.voidaddEntity(ChartEntity entity)Adds an entity.voidclear()Clears the entities.Objectclone()Returns a clone.booleanequals(Object obj)Tests this object for equality with an arbitrary object.CollectiongetEntities()Returns the entities in an unmodifiable collection.ChartEntitygetEntity(double x, double y)Returns an entity for the specified coordinates.Iteratoriterator()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:
clearin interfaceEntityCollection
-
addEntity
Adds an entity.- Specified by:
addEntityin interfaceEntityCollection- Parameters:
entity- the entity.
-
addEntities
Adds all the entities from the specified collection.- Specified by:
addEntitiesin interfaceEntityCollection- Parameters:
collection- the collection of entities.
-
getEntity
Returns an entity for the specified coordinates.- Specified by:
getEntityin interfaceEntityCollection- Parameters:
x- the x coordinate.y- the y coordinate.- Returns:
- the entity.
-
getEntities
Returns the entities in an unmodifiable collection.- Specified by:
getEntitiesin interfaceEntityCollection- Returns:
- The entities.
-
iterator
Returns an iterator for the entities in the collection.- Specified by:
iteratorin 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.
-