com.newisys.eventsim
Class AllEvent

java.lang.Object
  extended by com.newisys.eventsim.Event
      extended by com.newisys.eventsim.StepEvent
          extended by com.newisys.eventsim.MetaEvent
              extended by com.newisys.eventsim.AllEvent

public final class AllEvent
extends MetaEvent

A MetaEvent which occurs once all of its constituent events have occurred.


Field Summary
 
Fields inherited from class com.newisys.eventsim.StepEvent
ALWAYS, NEVER
 
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.
 
Methods inherited from class com.newisys.eventsim.MetaEvent
isAutoReset
 
Methods inherited from class com.newisys.eventsim.Event
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 satisfied
autoReset - 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 AllEvent
events - a Collection of events that must occur for this AllEvent to be satisfied
autoReset - true if this event should be reset after it has been satisfied, false otherwise
Method Detail

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