org.qi4j.spi.entitystore.helpers
Class DefaultManyAssociationState

java.lang.Object
  extended by org.qi4j.spi.entitystore.helpers.DefaultManyAssociationState
All Implemented Interfaces:
java.lang.Iterable<EntityReference>, ManyAssociationState

public final class DefaultManyAssociationState
extends java.lang.Object
implements ManyAssociationState

Default implementation of ManyAssociationState. Backed by ArrayList.


Constructor Summary
DefaultManyAssociationState(DefaultEntityState entityState, java.util.List<EntityReference> references)
           
 
Method Summary
 boolean add(int i, EntityReference entityReference)
           
 boolean contains(EntityReference entityReference)
           
 int count()
           
 EntityReference get(int i)
           
 java.util.Iterator<EntityReference> iterator()
           
 boolean remove(EntityReference entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultManyAssociationState

public DefaultManyAssociationState(DefaultEntityState entityState,
                                   java.util.List<EntityReference> references)
Method Detail

count

public int count()
Specified by:
count in interface ManyAssociationState

contains

public boolean contains(EntityReference entityReference)
Specified by:
contains in interface ManyAssociationState

add

public boolean add(int i,
                   EntityReference entityReference)
Specified by:
add in interface ManyAssociationState

remove

public boolean remove(EntityReference entity)
Specified by:
remove in interface ManyAssociationState

get

public EntityReference get(int i)
Specified by:
get in interface ManyAssociationState

iterator

public java.util.Iterator<EntityReference> iterator()
Specified by:
iterator in interface java.lang.Iterable<EntityReference>