org.qi4j.api.association

## Interface ManyAssociation<T>

- All Superinterfaces:
    AbstractAssociation, Iterable<T>
  All Known Implementing Classes:
    ManyAssociationWrapper

      public interface ManyAssociation<T>
      extends Iterable<T>, AbstractAssociation

  Association to a collection of entities.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(int i, T entity)`
    `boolean` | `add(T entity)`
    `boolean` | `contains(T entity)`
    `int` | `count()` Returns the number of references in this association.
    `T` | `get(int i)`
    `Iterable<EntityReference>` | `references()` Returns an unmodifiable Iterable of the references to the associated entities.
    `boolean` | `remove(T entity)`
    `List<T>` | `toList()`
    `Set<T>` | `toSet()`

    - ### Methods inherited from interface java.lang.Iterable

      `iterator`

- - ### Method Detail

    - #### count

          int count()

      Returns the number of references in this association.
      Returns:
        the number of references in this association.

    - #### contains

          boolean contains(T entity)

    - #### add

          boolean add(int i,
                    T entity)

    - #### add

          boolean add(T entity)

    - #### remove

          boolean remove(T entity)

    - #### get

          T get(int i)

    - #### toList

          List<T> toList()

    - #### toSet

          Set<T> toSet()

    - #### references

          Iterable<EntityReference> references()

      Returns an unmodifiable Iterable of the references to the associated entities.
      Returns:
        the references to the associated entities.