|
||||||||||
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.ConsequenceCtx
public class ConsequenceCtx
The ConsequenceCtx defines the context for a fired consequence defining the consequence that was fired, what frame fired the consequence and defining what beliefs and/or facts were created by the consequence.
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 | |
---|---|
ConsequenceCtx(Consequence consequence)
Constructor, creates a new consequence context for the specified consequence. |
Method Summary | |
---|---|
void |
addCreatedStatement(IStatementCtx statement)
Adds the specified statement (belief or fact) as a statement created by this consequence. |
void |
addUsedVariable(VariableCtx var)
Adds the specified variable as a variable used by this consequence. |
java.util.Enumeration |
getCreatedStatements()
Returns a list of all the statements (facts and beliefs) created by this consequence. |
IFrameCtx |
getParent()
Returns the parent frame context in which this consequence is fired. |
java.util.Enumeration |
getUsedVariables()
Returns a list of all the variables used by this consequence. |
void |
removeCreatedStatement(IStatementCtx statement)
Removes the specified statement (belief or fact) as a statement created by this consequence. |
void |
removeUsedVariable(VariableCtx var)
Removes the specified variable as a variable used by this consequence. |
void |
setParent(IFrameCtx parent)
Sets the parent frame context in which this consequence is fired. |
java.lang.String |
toString()
Returns the string representation of the consequence context, returning the id and the consequence itself. |
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, 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 ConsequenceCtx(Consequence consequence)
consequence
- the fired consequence for which this context is the contextMethod Detail |
---|
public void setParent(IFrameCtx parent) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setParent
in interface IConsequenceCtx
parent
- the IFrameCtx in which the consequence is fired
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 IConsequenceCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no parent is specifiedpublic void addCreatedStatement(IStatementCtx statement) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addCreatedStatement
in interface IConsequenceCtx
statement
- the statement (IBeliefCtx or IFactCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if statement is nullpublic void removeCreatedStatement(IStatementCtx statement) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeCreatedStatement
in interface IConsequenceCtx
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 getCreatedStatements() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getCreatedStatements
in interface IConsequenceCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no statementspublic void addUsedVariable(VariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addUsedVariable
in interface IConsequenceCtx
var
- the variable (VariableCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if var is nullpublic void removeUsedVariable(VariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeUsedVariable
in interface IConsequenceCtx
var
- the variable (VariableCtx) 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 getUsedVariables() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getUsedVariables
in interface IConsequenceCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no variablespublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |