gov.nasa.arc.brahms.common.rt
Interface IVariableCtx

All Superinterfaces:
IBrahmsObjectCtx
All Known Implementing Classes:
VariableCtx, VMVariableCtx

public interface IVariableCtx
extends IBrahmsObjectCtx

The IVariableCtx interface is the interface for variable contexts that maintain 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.

Version:
$Revision: 1.4 $ $Date: 2009/11/23 19:12:22 $ $Author: rnado $
Author:
Ron van Hoof

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 (IPreconditionCtx, IDetectableCtx, ITransferDefinitionCtx, IActivityCtx)
 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 (IPreconditionCtx, IDetectableCtx, ITransferDefinitionCtx, IActivityCtx)
 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 interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Method Detail

setBindingFrame

void setBindingFrame(IFrameCtx frame)
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the frame context in which the variable is bound.

Parameters:
frame - the IFrameCtx in which the variable is bound.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null frame is specified

getBindingFrame

IFrameCtx getBindingFrame()
                          throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the frame context in which the variable is bound.

Returns:
FrameCtx the frame in which the variable is bound.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no binding frame is specified

setBindingElement

void setBindingElement(IBrahmsObjectCtx elm)
                       throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the element binding the variable (IPreconditionCtx, IDetectableCtx, ITransferDefinitionCtx, IActivityCtx)

Parameters:
elm - the IBrahmsObjectCtx binding the variable.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null element is specified

getBindingElement

IBrahmsObjectCtx getBindingElement()
                                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the element binding the variable (IPreconditionCtx, IDetectableCtx, ITransferDefinitionCtx, IActivityCtx)

Returns:
IBrahmsObjectCtx the element binding the variable.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no binding element is specified

setBound

void setBound(boolean bound)
Specifies whether the variable is bound to a value (true) or not (false).

Parameters:
bound - true if a value is assigned, false otherwise

isBound

boolean isBound()
Returns whether the variable is bound to a value (true) or not (false).

Returns:
boolean true if a value is assigned, false otherwise

addBinding

void addBinding(java.lang.Object value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the object to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.Integer value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Integer to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.Character value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Character to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.Byte value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Byte to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.Short value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Short to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.Long value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Long to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.Float value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Float to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.Double value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Double to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.Boolean value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Boolean to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(java.lang.String value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the String to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(IConceptCtx value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the IConceptCtx to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addJavaBinding

void addJavaBinding(java.lang.Object value)
                    throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Java Object to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(Unknown value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Unknown value to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

addBinding

void addBinding(Value value)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified value to bind the variable.

Parameters:
value - the Value to be added as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null

hasBinding

boolean hasBinding(java.lang.Object value)
Tests whether this context has the specified value as a binding. To test for primitive values use their object wrappers to test for the binding.

Parameters:
value - the value to be tested

removeBinding

void removeBinding(java.lang.Object value)
                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified value as a binding for the variable. The value can be a Value object, a concept context or a primitive value wrapped into an object.

Parameters:
value - the value to be removed as a binding
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if value is null, no values are present, or the value is not found

clearBinding

void clearBinding()
Clears the bindings, removing all binding values.


getBinding

java.util.Enumeration getBinding()
                                 throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the value bindings for this variable.

Returns:
Enumeration an enumeration of Value
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no bindings


Copyright © 1997-2012 All Rights Reserved.