org.jfree.chart.entity
Class StandardEntityCollection

java.lang.Object
  |
  +--org.jfree.chart.entity.StandardEntityCollection
All Implemented Interfaces:
EntityCollection

public class StandardEntityCollection
extends java.lang.Object
implements EntityCollection

A default implementation of the EntityCollection interface.

Author:
David Gilbert

Constructor Summary
StandardEntityCollection()
          Constructs a new entity collection (initially empty).
 
Method Summary
 void addEntity(ChartEntity entity)
          Adds an entity.
 void clear()
          Clears the entities.
 ChartEntity getEntity(double x, double y)
          Returns an entity for the specified coordinates.
 java.util.Iterator iterator()
          Returns an iterator for the entities in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardEntityCollection

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

Method Detail

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.

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.

iterator

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

Specified by:
iterator in interface EntityCollection
Returns:
an iterator.