com.jrefinery.chart.entity
Interface EntityCollection

All Known Implementing Classes:
StandardEntityCollection

public interface EntityCollection

Defines the methods that a collection of entities is required to implement.

The StandardEntityCollection class provides one implementation of this interface.

Author:
DG

Method Summary
 void addEntity(ChartEntity entity)
          Adds an entity to the collection.
 void clear()
          Clears all entities.
 ChartEntity getEntity(double x, double y)
          Returns an entity whose area contains the specified point.
 java.util.Iterator iterator()
          Returns an iterator for the entities in the collection.
 

Method Detail

clear

public void clear()
Clears all entities.

addEntity

public void addEntity(ChartEntity entity)
Adds an entity to the collection.
Parameters:
entity - the entity.

getEntity

public ChartEntity getEntity(double x,
                             double y)
Returns an entity whose area contains the specified point.
Parameters:
x - the x coordinate.
y - the y coordinate.
Returns:
The entity.

iterator

public java.util.Iterator iterator()
Returns an iterator for the entities in the collection.
Returns:
an iterator.