public class StandardEntityCollection extends Object implements EntityCollection, Cloneable, PublicCloneable, Serializable
EntityCollection interface.| Constructor and Description |
|---|
StandardEntityCollection()
Constructs a new entity collection (initially empty).
|
| Modifier and Type | Method and Description |
|---|---|
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(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. |
ChartEntity |
getEntity(int index)
Returns a chart entity from the collection.
|
int |
getEntityCount()
Returns the number of entities in the collection.
|
Iterator |
iterator()
Returns an iterator for the entities in the collection.
|
public StandardEntityCollection()
public int getEntityCount()
getEntityCount in interface EntityCollectionpublic ChartEntity getEntity(int index)
getEntity in interface EntityCollectionindex - the entity index.add(ChartEntity)public void clear()
clear in interface EntityCollectionpublic void add(ChartEntity entity)
add in interface EntityCollectionentity - the entity (null not permitted).public void addAll(EntityCollection collection)
addAll in interface EntityCollectioncollection - the collection of entities (null not
permitted).public ChartEntity getEntity(double x, double y)
null if there is no such entity.getEntity in interface EntityCollectionx - the x coordinate.y - the y coordinate.null).public Collection getEntities()
getEntities in interface EntityCollectionpublic Iterator iterator()
iterator in interface EntityCollectionpublic boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone in interface PublicCloneableclone in class ObjectCloneNotSupportedException - if the object cannot be cloned.Copyright © 2001–2017 JFree.org. All rights reserved.