org.jfree.chart.entity

## Interface EntityCollection

- All Known Implementing Classes:
    StandardEntityCollection

      public interface EntityCollection

  This interface defines the methods used to access an ordered list of `ChartEntity` objects.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(ChartEntity entity)` Adds an entity to the collection.
    `void` | `addAll(EntityCollection collection)` Adds the entities from another collection to this collection.
    `void` | `clear()` Clears all entities.
    `java.util.Collection` | `getEntities()` Returns the entities in an unmodifiable collection.
    `ChartEntity` | `getEntity(double x, double y)` Returns an entity whose area contains the specified point.
    `ChartEntity` | `getEntity(int index)` Returns an entity from the collection.
    `int` | `getEntityCount()` Returns the entity count.
    `java.util.Iterator` | `iterator()` Returns an iterator for the entities in the collection.

- - ### Method Detail

    - #### clear

          void clear()

      Clears all entities.

    - #### add

          void add(ChartEntity entity)

      Adds an entity to the collection.
      Parameters:
        `entity` - the entity (`null` not permitted).

    - #### addAll

          void addAll(EntityCollection collection)

      Adds the entities from another collection to this collection.
      Parameters:
        `collection` - the other collection.

    - #### getEntity

          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.

    - #### getEntity

          ChartEntity getEntity(int index)

      Returns an entity from the collection.
      Parameters:
        `index` - the index (zero-based).
      Returns:
        An entity.

    - #### getEntityCount

          int getEntityCount()

      Returns the entity count.
      Returns:
        The entity count.

    - #### getEntities

          java.util.Collection getEntities()

      Returns the entities in an unmodifiable collection.
      Returns:
        The entities.

    - #### iterator

          java.util.Iterator iterator()

      Returns an iterator for the entities in the collection.
      Returns:
        An iterator.