|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx gov.nasa.arc.brahms.common.rt.ConditionCtx gov.nasa.arc.brahms.common.rt.PreconditionCtx
public class PreconditionCtx
The PreconditionCtx defines the context for a precondition defining the beliefs or facts that made the precondition evaluate to true and defining the frame for which the precondition evaluated to true.
Field Summary |
---|
Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants |
---|
ABORTED, ACTIVE, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, DETECTABLE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE |
Constructor Summary | |
---|---|
PreconditionCtx(Precondition precondition)
Constructor, creates a new precondition context for the specified precondition |
Method Summary | |
---|---|
void |
addBoundVariable(IVariableCtx var)
Adds the specified variable as a variable bound by this precondition. |
void |
addEvaluatedStatement(IStatementCtx statement)
Adds the specified statement (belief or fact) as a statement evaluated by this precondition causing this precondition to evaluate to true. |
java.util.Enumeration |
getBoundVariables()
Returns a list of all the variables bound by this precondition. |
java.util.Enumeration |
getEvaluatedStatements()
Returns a list of all the statements (facts or beliefs) evaluated by this precondition to result in the precondition evaluating to true. |
IFrameCtx |
getParent()
Returns the parent frame context in which this precondition is evaluated. |
void |
removeBoundVariable(IVariableCtx var)
Removes the specified variable as a variable bound by this precondition. |
void |
removeEvaluatedStatement(IStatementCtx statement)
Removes the specified statement (belief or fact) as a statement evaluated by this precondition. |
void |
setParent(IFrameCtx parent)
Sets the parent frame context in which this precondition is evaluated. |
Methods inherited from class gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setContextFor, setEndTime, setID, setStartTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
Constructor Detail |
---|
public PreconditionCtx(Precondition precondition)
precondition
- the precondition for which this is a contextMethod Detail |
---|
public void setParent(IFrameCtx parent) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setParent
in interface IPreconditionCtx
parent
- the IFrameCtx in which the precondition is evaluated.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null parent is specifiedpublic IFrameCtx getParent() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getParent
in interface IPreconditionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no parent is specifiedpublic void addEvaluatedStatement(IStatementCtx statement) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addEvaluatedStatement
in interface IPreconditionCtx
statement
- the statement (IBeliefCtx or IFactCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if statement is nullpublic void removeEvaluatedStatement(IStatementCtx statement) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeEvaluatedStatement
in interface IPreconditionCtx
statement
- the statement to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if statement is null, no statements
are present, or the statements is not foundpublic java.util.Enumeration getEvaluatedStatements() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getEvaluatedStatements
in interface IPreconditionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no statementspublic void addBoundVariable(IVariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBoundVariable
in interface IPreconditionCtx
var
- the variable (IVariableCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if var is nullpublic void removeBoundVariable(IVariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeBoundVariable
in interface IPreconditionCtx
var
- the variable (IVariableCtx) to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if variable is null, no variables
are present, or the variable is not foundpublic java.util.Enumeration getBoundVariables() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getBoundVariables
in interface IPreconditionCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no variables
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |