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