|
||||||||||
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.VariableCtx
public class VariableCtx
The VariableCtx maintains information regarding the binding of a variable defined for a frame and bound in a frame context. The binding of a variable can be one or more values depending on the type of variable and depending on the binding of the variable in a precondition or activity.
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 | |
---|---|
protected |
VariableCtx(Variable var)
Constructor, creates a new context for a variable. |
|
VariableCtx(Variable var,
IFrameCtx frame)
Constructor, creates a new context for a variable bound in a specific frame context. |
Method Summary | |
---|---|
void |
addBinding(java.lang.Boolean value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.Byte value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.Character value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.Double value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.Float value)
Adds the specified value to bind the variable. |
void |
addBinding(IConceptCtx value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.Integer value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.Long value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.Object value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.Short value)
Adds the specified value to bind the variable. |
void |
addBinding(java.lang.String value)
Adds the specified value to bind the variable. |
void |
addBinding(Unknown value)
Adds the specified value to bind the variable. |
void |
addBinding(Value value)
Adds the specified value to bind the variable. |
void |
addJavaBinding(java.lang.Object value)
Adds the specified value to bind the variable. |
void |
clearBinding()
Clears the bindings, removing all binding values. |
java.util.Enumeration |
getBinding()
Returns a list of all the value bindings for this variable. |
IBrahmsObjectCtx |
getBindingElement()
Returns the element binding the variable (PreconditionCtx, DetectableCtx, TransferDefinitionCtx, ActivityCtx) |
IFrameCtx |
getBindingFrame()
Returns the frame context in which the variable is bound. |
boolean |
hasBinding(java.lang.Object value)
Tests whether this context has the specified value as a binding. |
boolean |
isBound()
Returns whether the variable is bound to a value (true) or not (false). |
void |
removeBinding(java.lang.Object value)
Removes the specified value as a binding for the variable. |
void |
setBindingElement(IBrahmsObjectCtx elm)
Sets the element binding the variable (PreconditionCtx, DetectableCtx, TransferDefinitionCtx, ActivityCtx) |
void |
setBindingFrame(IFrameCtx frame)
Sets the frame context in which the variable is bound. |
void |
setBound(boolean bound)
Specifies whether the variable is bound to a value (true) or not (false). |
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 |
---|
protected VariableCtx(Variable var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
var
- the variable for which this variable context is the context
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an internal error occurspublic VariableCtx(Variable var, IFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
var
- the variable for which this variable context is the contextframe
- the frame context in which the variable is bound
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame is nullMethod Detail |
---|
public void setBindingFrame(IFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setBindingFrame
in interface IVariableCtx
frame
- the IFrameCtx in which the variable is bound.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null frame is specifiedpublic IFrameCtx getBindingFrame() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getBindingFrame
in interface IVariableCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no binding frame is specifiedpublic void setBindingElement(IBrahmsObjectCtx elm) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setBindingElement
in interface IVariableCtx
elm
- the IBrahmsObjectCtx binding the variable.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null element is specifiedpublic IBrahmsObjectCtx getBindingElement() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getBindingElement
in interface IVariableCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no binding element is specifiedpublic void setBound(boolean bound)
setBound
in interface IVariableCtx
bound
- true if a value is assigned, false otherwisepublic boolean isBound()
isBound
in interface IVariableCtx
public void addBinding(java.lang.Object value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the object to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.Integer value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Integer to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.Character value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Character to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.Byte value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Byte to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.Short value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Short to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.Long value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Long to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.Float value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Float to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.Double value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Double to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.Boolean value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Boolean to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(java.lang.String value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the String to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(IConceptCtx value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the IConceptCtx to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addJavaBinding(java.lang.Object value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addJavaBinding
in interface IVariableCtx
value
- the Java Object to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(Unknown value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Unknown value to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic void addBinding(Value value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addBinding
in interface IVariableCtx
value
- the Value to be added as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is nullpublic boolean hasBinding(java.lang.Object value)
hasBinding
in interface IVariableCtx
value
- the value to be testedpublic void removeBinding(java.lang.Object value) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeBinding
in interface IVariableCtx
value
- the value to be removed as a binding
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if value is null, no values
are present, or the value is not foundpublic void clearBinding()
clearBinding
in interface IVariableCtx
public java.util.Enumeration getBinding() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getBinding
in interface IVariableCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no bindings
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |