Eidola home

org.eidola.kernel.event
Class ContainerEvent

java.lang.Object
  |
  +--org.eidola.kernel.event.ContainerEvent
All Implemented Interfaces:
Event
Direct Known Subclasses:
CompileCompleted, CompileRequired, GeneralizationsChanged

public abstract class ContainerEvent
extends Object
implements Event

An event originating from a container.

Version:
[Development version]
Author:
Paul Cantrell
See Also:
Event, Container

Constructor Summary
ContainerEvent(Container source)
          Creates a new blank element event.
ContainerEvent(Container source, ContainerEvent propagatedFrom)
          Creates a new blank element event which was spawned by another event.
 
Method Summary
 boolean equals(Object other)
          Two ContainerEvents are equal if they have the same dynamic type, and came from the same source element.
 ContainerEvent getPropagatedFrom()
          Returns the event which propagated this one, or null if this event was spawned by an action from outside the kernel.
 Container getSource()
          Returns the element which caused this event.
 int hashCode()
           
 boolean propagationChainContains(Event event)
          Determines whether a given element is involved in the chain of events which lead to this event.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerEvent

public ContainerEvent(Container source)
Creates a new blank element event.
Parameters:
source - The element which sent the event.

ContainerEvent

public ContainerEvent(Container source,
                      ContainerEvent propagatedFrom)
Creates a new blank element event which was spawned by another event.
Parameters:
source - The element which sent the event.
Method Detail

getSource

public Container getSource()
Returns the element which caused this event.

getPropagatedFrom

public ContainerEvent getPropagatedFrom()
Returns the event which propagated this one, or null if this event was spawned by an action from outside the kernel.

propagationChainContains

public boolean propagationChainContains(Event event)
Determines whether a given element is involved in the chain of events which lead to this event. Useful for detecting cycles in event triggering, such as when two elements' signatures affect one another.

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Two ContainerEvents are equal if they have the same dynamic type, and came from the same source element.
Overrides:
equals in class Object

Eidola home