org.entityfs.event
Class AbstractChildEntitiesEvent<T extends ChildEntitiesEvent<?>>

java.lang.Object
  extended by org.entityfs.event.AbstractEntityEvent<T>
      extended by org.entityfs.event.AbstractChildEntitiesEvent<T>
All Implemented Interfaces:
ChildEntitiesEvent<T>, EntityEvent<T>
Direct Known Subclasses:
AbstractOneChildEntityEvent, ChildEntitiesAddedEvent, ChildEntitiesModifiedEvent, ChildEntitiesRemovedEvent, ChildEntitiesStabilizedEvent

public abstract class AbstractChildEntitiesEvent<T extends ChildEntitiesEvent<?>>
extends AbstractEntityEvent<T>
implements ChildEntitiesEvent<T>

Abstract implementation of ChildEntitiesEvent. Event classes can inherit this.

Since:
1.0
Author:
Karl Gustafsson

Constructor Summary
protected AbstractChildEntitiesEvent(EntityView sender, Collection<? extends EntityView> entities)
           
protected AbstractChildEntitiesEvent(EntityView sender, EntityView childEntity)
           
 
Method Summary
 T copy(EntityView sender)
          Copy this event, but set the given entity view as sender.
 Collection<EntityView> getChildEntities()
          Get the collection of child entities that were affected by this event.
protected  Collection<EntityView> getChildEntitiesInternal()
           
 String toString()
           
 
Methods inherited from class org.entityfs.event.AbstractEntityEvent
getSender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.entityfs.event.ChildEntitiesEvent
copy
 
Methods inherited from interface org.entityfs.event.EntityEvent
getSender
 

Constructor Detail

AbstractChildEntitiesEvent

protected AbstractChildEntitiesEvent(EntityView sender,
                                     Collection<? extends EntityView> entities)

AbstractChildEntitiesEvent

protected AbstractChildEntitiesEvent(EntityView sender,
                                     EntityView childEntity)
Method Detail

getChildEntitiesInternal

protected Collection<EntityView> getChildEntitiesInternal()

getChildEntities

public Collection<EntityView> getChildEntities()
Description copied from interface: ChildEntitiesEvent
Get the collection of child entities that were affected by this event.

Specified by:
getChildEntities in interface ChildEntitiesEvent<T extends ChildEntitiesEvent<?>>
Returns:
The collection of child entities. Possibly an empty collection, but never null.

copy

public T copy(EntityView sender)
Description copied from interface: EntityEvent
Copy this event, but set the given entity view as sender. This is used by views to send events to their listeners.

Specified by:
copy in interface EntityEvent<T extends ChildEntitiesEvent<?>>
Parameters:
sender - The entity view to set as sender.
Returns:
An EntityEvent of the same type, but with a new sender.

toString

public String toString()
Overrides:
toString in class AbstractEntityEvent<T extends ChildEntitiesEvent<?>>