com.newisys.eventsim
Class AnyEvent
java.lang.Object
com.newisys.eventsim.Event
com.newisys.eventsim.StepEvent
com.newisys.eventsim.MetaEvent
com.newisys.eventsim.AnyEvent
public final class AnyEvent
- extends MetaEvent
A MetaEvent which occurs once any of its constituent events have occurred.
|
Constructor Summary |
AnyEvent(Collection<? extends Event> events,
boolean autoReset)
Creates a new AnyEvent from the collection specified. |
AnyEvent(String name,
Collection<? extends Event> events,
boolean autoReset)
Creates a new AnyEvent from the collection specified. |
|
Method Summary |
boolean |
hasOccurred()
Return whether or not this AnyEvent has occurred. |
AnyEvent
public AnyEvent(Collection<? extends Event> events,
boolean autoReset)
- Creates a new AnyEvent from the collection specified. If
autoReset
is true, the event will be reset after it has been
satisfied.
- Parameters:
events - a Collection of events that can occur for this AnyEvent to
be satisfiedautoReset - true if this event should be reset after
it has been satisfied, false otherwise
AnyEvent
public AnyEvent(String name,
Collection<? extends Event> events,
boolean autoReset)
- Creates a new AnyEvent from the collection specified. If
autoReset
is true, the event will be reset after it has been
satisfied.
- Parameters:
name - the name of this AnyEventevents - a Collection of events that can occur for this AnyEvent to
be satisfiedautoReset - true if this event should be reset after
it has been satisfied, false otherwise
hasOccurred
public boolean hasOccurred()
- Return whether or not this AnyEvent has occurred. An AnyEvent is
considered to have occurred when any of its constituent events has occurred.
- Overrides:
hasOccurred in class StepEvent
- Returns:
true if this AnyEvent has occurred, false
otherwise