org.qi4j.api.association

## Class ManyAssociationWrapper

- java.lang.Object
- - org.qi4j.api.association.ManyAssociationWrapper

- All Implemented Interfaces:
    Iterable<Object>, AbstractAssociation, ManyAssociation<Object>

      public class ManyAssociationWrapper
      extends Object
      implements ManyAssociation<Object>

  If you want to catch calls to ManyAssociations, then create a GenericConcern that wraps the Zest-supplied ManyAssociation instance with ManyAssociationWrappers. Override methods to perform your custom code.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ManyAssociation<Object>` | `next`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManyAssociationWrapper(ManyAssociation<Object> next)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(int i, Object entity)`
    `boolean` | `add(Object entity)`
    `boolean` | `contains(Object entity)`
    `int` | `count()` Returns the number of references in this association.
    `boolean` | `equals(Object obj)`
    `Object` | `get(int i)`
    `int` | `hashCode()`
    `Iterator<Object>` | `iterator()`
    `ManyAssociation<Object>` | `next()`
    `Iterable<EntityReference>` | `references()` Returns an unmodifiable Iterable of the references to the associated entities.
    `boolean` | `remove(Object entity)`
    `List<Object>` | `toList()`
    `Set<Object>` | `toSet()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### next

          protected ManyAssociation<Object> next

  - ### Constructor Detail

    - #### ManyAssociationWrapper

          public ManyAssociationWrapper(ManyAssociation<Object> next)

  - ### Method Detail

    - #### next

          public ManyAssociation<Object> next()

    - #### count

          public int count()

      Description copied from interface: `ManyAssociation`
      Returns the number of references in this association.
      Specified by:
        `count` in interface `ManyAssociation<Object>`
      Returns:
        the number of references in this association.

    - #### contains

          public boolean contains(Object entity)

      Specified by:
        `contains` in interface `ManyAssociation<Object>`

    - #### add

          public boolean add(int i,
                    Object entity)

      Specified by:
        `add` in interface `ManyAssociation<Object>`

    - #### add

          public boolean add(Object entity)

      Specified by:
        `add` in interface `ManyAssociation<Object>`

    - #### remove

          public boolean remove(Object entity)

      Specified by:
        `remove` in interface `ManyAssociation<Object>`

    - #### get

          public Object get(int i)

      Specified by:
        `get` in interface `ManyAssociation<Object>`

    - #### toList

          public List<Object> toList()

      Specified by:
        `toList` in interface `ManyAssociation<Object>`

    - #### toSet

          public Set<Object> toSet()

      Specified by:
        `toSet` in interface `ManyAssociation<Object>`

    - #### references

          public Iterable<EntityReference> references()

      Description copied from interface: `ManyAssociation`
      Returns an unmodifiable Iterable of the references to the associated entities.
      Specified by:
        `references` in interface `ManyAssociation<Object>`
      Returns:
        the references to the associated entities.

    - #### iterator

          public Iterator<Object> iterator()

      Specified by:
        `iterator` in interface `Iterable<Object>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`