com.newisys.eventsim
Class StepEvent

java.lang.Object
  extended by com.newisys.eventsim.Event
      extended by com.newisys.eventsim.StepEvent
Direct Known Subclasses:
MetaEvent

public class StepEvent
extends Event

An Event that retains its state as on or off.

A StepEvent is turned on by calling hasOccurred(true) and maintains that state until hasOccurred(false) is called.


Field Summary
static StepEvent ALWAYS
          A StepEvent that is always on.
static StepEvent NEVER
          A StepEvent that is always off.
 
Constructor Summary
StepEvent()
          Create a new StepEvent.
StepEvent(String name)
          Create a new StepEvent with the specified name.
 
Method Summary
 boolean hasOccurred()
          Returns whether or not this StepEvent has occurred.
 
Methods inherited from class com.newisys.eventsim.Event
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALWAYS

public static final StepEvent ALWAYS
A StepEvent that is always on.


NEVER

public static final StepEvent NEVER
A StepEvent that is always off.

Constructor Detail

StepEvent

public StepEvent()
Create a new StepEvent.


StepEvent

public StepEvent(String name)
Create a new StepEvent with the specified name.

Parameters:
name - the name of this StepEvent
Method Detail

hasOccurred

public boolean hasOccurred()
Returns whether or not this StepEvent has occurred.

Specified by:
hasOccurred in class Event
Returns:
true if this StepEvent has occurred, false otherwise