public class

StandardEntityCollection

extends Object
implements Serializable Cloneable EntityCollection
java.lang.Object
   ↳ org.jfree.chart.entity.StandardEntityCollection

Class Overview

A standard implementation of the EntityCollection interface.

Summary

Public Constructors
StandardEntityCollection()
Constructs a new entity collection (initially empty).
Public Methods
void add(ChartEntity entity)
Adds an entity to the collection.
void addAll(EntityCollection collection)
Adds all the entities from the specified collection.
void clear()
Clears all the entities from the collection.
Object clone()
Returns a clone of this entity collection.
boolean equals(Object obj)
Tests this object for equality with an arbitrary object.
Collection getEntities()
Returns the entities in an unmodifiable collection.
ChartEntity getEntity(int index)
Returns a chart entity from the collection.
ChartEntity getEntity(double x, double y)
Returns the last entity in the list with an area that encloses the specified coordinates, or null if there is no such entity.
int getEntityCount()
Returns the number of entities in the collection.
Iterator iterator()
Returns an iterator for the entities in the collection.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.jfree.chart.entity.EntityCollection

Public Constructors

public StandardEntityCollection ()

Constructs a new entity collection (initially empty).

Public Methods

public void add (ChartEntity entity)

Adds an entity to the collection.

Parameters
entity the entity (null not permitted).

public void addAll (EntityCollection collection)

Adds all the entities from the specified collection.

Parameters
collection the collection of entities (null not permitted).

public void clear ()

Clears all the entities from the collection.

public Object clone ()

Returns a clone of this entity collection.

Returns
  • A clone.
Throws
CloneNotSupportedException if the object cannot be cloned.

public boolean equals (Object obj)

Tests this object for equality with an arbitrary object.

Parameters
obj the object to test against (null permitted).
Returns
  • A boolean.

public Collection getEntities ()

Returns the entities in an unmodifiable collection.

Returns
  • The entities.

public ChartEntity getEntity (int index)

Returns a chart entity from the collection.

Parameters
index the entity index.
Returns
  • The entity.
See Also

public ChartEntity getEntity (double x, double y)

Returns the last entity in the list with an area that encloses the specified coordinates, or null if there is no such entity.

Parameters
x the x coordinate.
y the y coordinate.
Returns
  • The entity (possibly null).

public int getEntityCount ()

Returns the number of entities in the collection.

Returns
  • The entity count.

public Iterator iterator ()

Returns an iterator for the entities in the collection.

Returns
  • An iterator.