org.mitre.sim.api3
Class WaitResult

java.lang.Object
  extended byorg.mitre.sim.api3.WaitResult

public class WaitResult
extends java.lang.Object

Structure returned by Entity methods waitForTime, waitForAction, and waitForActionOrTrigger giving the circumstainces of the return.


Copyright © 2003-2004 The MITRE Corporation


Constructor Summary
WaitResult(boolean actionOccurred, boolean triggerOccurred, Trigger trigger, double returnTime, LogicalProcess lp)
           
WaitResult(double returnTime, java.lang.String comment, LogicalProcess lp)
          Used only for infrastructure development
 
Method Summary
 boolean actionOccurred()
          The wait method returned because an action method invocation was received.
 boolean eventOccurred()
          The wait method returned because either an action method invocation was received or a trigger became true.
 java.lang.String getComment()
          Used only for infrastructure development
 LogicalProcess getLP()
          Used only for infrastructure development
 double returnTime()
          Simulation time when the wait method returned.
 java.lang.String toString()
           
 Trigger trigger()
          If the wait method returned because a trigger became true, that trigger is return here.
 boolean triggerOccurred()
          The wait method returned because a trigger became true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WaitResult

public WaitResult(boolean actionOccurred,
                  boolean triggerOccurred,
                  Trigger trigger,
                  double returnTime,
                  LogicalProcess lp)

WaitResult

public WaitResult(double returnTime,
                  java.lang.String comment,
                  LogicalProcess lp)
Used only for infrastructure development

Method Detail

actionOccurred

public boolean actionOccurred()
The wait method returned because an action method invocation was received.

Returns:
true Wait method returned when an action method invocation was received.
false Wait method did not return because an action method invocation was received.

triggerOccurred

public boolean triggerOccurred()
The wait method returned because a trigger became true.

Returns:
true Wait method returned when an trigger became true.
false Wait method did not return because a trigger became true.

eventOccurred

public boolean eventOccurred()
The wait method returned because either an action method invocation was received or a trigger became true. This method is equivalent to:
    actionOccurred() || triggerOccurred().
    

Returns:
Logical disjunction of actionOccurred or triggerOccurred.

trigger

public Trigger trigger()
If the wait method returned because a trigger became true, that trigger is return here. If the wait method returned for other reasons, this method returns null.

Returns:
trigger that trigger the wait method return or
null if a trigger did not trigger the return.

returnTime

public double returnTime()
Simulation time when the wait method returned.

Returns:
Simulation time when the wait method returned.

toString

public java.lang.String toString()
Returns:
a string representation of the WaitResult object.

getLP

public LogicalProcess getLP()
Used only for infrastructure development


getComment

public java.lang.String getComment()
Used only for infrastructure development