net.dpml.state
Class DefaultTrigger

java.lang.Object
  extended by net.dpml.state.DefaultTrigger
All Implemented Interfaces:
Serializable, Trigger

public class DefaultTrigger
extends Object
implements Trigger, Serializable

Default implementation of trigger.

Version:
1.2.0
Author:
Digital Product Meta Library
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.dpml.state.Trigger
Trigger.TriggerEvent
 
Field Summary
 
Fields inherited from interface net.dpml.state.Trigger
INITIALIZATION, TERMINATION
 
Constructor Summary
DefaultTrigger(Trigger.TriggerEvent event, Action action)
          Creation of a new trigger.
 
Method Summary
 boolean equals(Object other)
          Compare this object to another for equality.
 Action getAction()
          Return the actions that this trigger initiates.
 Trigger.TriggerEvent getEvent()
          Return the event enumneration that this trigger is associated with.
 int hashCode()
          Compute the hashcode for this instance.
 String toString()
          Return a string representation of the instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTrigger

public DefaultTrigger(Trigger.TriggerEvent event,
                      Action action)
Creation of a new trigger.

Parameters:
event - the trigger event constant
action - the action fired by the trigger
Method Detail

getEvent

public Trigger.TriggerEvent getEvent()
Return the event enumneration that this trigger is associated with.

Specified by:
getEvent in interface Trigger
Returns:
the triggering event class

getAction

public Action getAction()
Return the actions that this trigger initiates.

Specified by:
getAction in interface Trigger
Returns:
the triggered action

equals

public boolean equals(Object other)
Compare this object to another for equality.

Overrides:
equals in class Object
Parameters:
other - the other object
Returns:
true if the object is equal to this object

hashCode

public int hashCode()
Compute the hashcode for this instance.

Overrides:
hashCode in class Object
Returns:
the hashcode value

toString

public String toString()
Return a string representation of the instance.

Overrides:
toString in class Object
Returns:
the string value