gov.nasa.arc.brahms.vm.api.common
Interface IVariable


public interface IVariable

The IVariable interface is an interface to a variable specified in a frame and bound or not bound to a value. A Variable is used in Workframes and Thoughtframes. Variables allow for the writing of more generic re-usable workframes and thoughtframes. Before a variable can be used it has to be declared. The scope of the variable is bound to the frame it is declared in. A variable that is not declared within the workframe it is used in, must be declared higher up in the activity-tree the workframe is part of and passed down through a parameter. (The activity tree is created through composite activities.)

Variables initially do not have a value assigned but get a value assigned either through preconditions (assigned variable) when a precondition matched with a belief or fact, or through activities (unassigned variable) where the activity assigns a value to the variable.

Once a variable is assigned a value its value can no longer be changed. If on entering the activity the variable is not bound then in the activity the variable can be bound and its binding can be changed until the activity ends.

Version:
$Revision: 1.2 $ $Date: 2009/11/29 21:35:57 $ $Author: rnado $
Author:
Ron van Hoof

Field Summary
static int COLLECTALL
          The collect-all quantifier for a variable indicating multiple values fo the same type can be bound
static int FOREACH
          The for-each quantifier for a variable indicating only one value can be bound
static int FORONE
          The for-one quantifier for a variable indicating only one value can be bound
 
Method Summary
 void addValue(boolean value)
          Adds the specified value to the variable's binding.
 void addValue(byte value)
          Adds the specified value to the variable's binding.
 void addValue(char value)
          Adds the specified value to the variable's binding.
 void addValue(double value)
          Adds the specified value to the variable's binding.
 void addValue(float value)
          Adds the specified value to the variable's binding.
 void addValue(IConcept value)
          Adds the specified value to the variable's binding.
 void addValue(int value)
          Adds the specified value to the variable's binding.
 void addValue(IUnknown value)
          Adds the 'unknown' value to the variable's binding.
 void addValue(long value)
          Adds the specified value to the variable's binding.
 void addValue(java.lang.Object value)
          Adds the specified variable to the variable's binding.
 void addValue(java.io.Serializable value)
          Adds the specified variable to the variable's binding.
 void addValue(short value)
          Adds the specified value to the variable's binding.
 void addValue(java.lang.String value)
          Adds the specified value to the variable's binding.
 boolean getBooleanValue()
          Returns the bound value of the variable.
 byte getByteValue()
          Returns the bound value of the variable.
 char getCharValue()
          Returns the bound value of the variable.
 IConcept getConceptValue()
          Returns the bound value of the variable.
 double getDoubleValue()
          Returns the bound value of the variable.
 float getFloatValue()
          Returns the bound value of the variable.
 int getIntValue()
          Returns the bound value of the variable.
 java.lang.Object getJavaObjectValue()
          Returns the bound value of the variable.
 java.io.Serializable getJavaValue()
          Deprecated. Use getJavaObjectValue instead
 long getLongValue()
          Returns the bound value of the variable.
 java.lang.String getName()
          Returns the variable name.
 int getQuantification()
          Returns the variable's quantification, one of FORONE, FOREACH or COLLECTALL.
 short getShortValue()
          Returns the bound value of the variable.
 java.lang.String getStringValue()
          Returns the bound value of the variable.
 java.lang.String getSymbolValue()
          Returns the bound value of the variable.
 IType getType()
          Returns the type of the variable.
 IUnknown getUnknownValue()
          Returns the bound value of the variable.
 java.util.Enumeration getValues()
          Returns a list of the values bound to this variable.
 boolean hasMultipleValues()
          Returns true if this variable is bound to multiple values.
 boolean isBound()
          Indicates whether the variable is bound to a value.
 boolean isBoundAtStart()
          Indicates whether the variable was bound to a value at the start of the activity in which the variable is used.
 boolean isValueUnknown()
          Indicates whether the variable has as one of its values the value 'unknown'
 void setValue(boolean value)
          Binds the variable to the specified value.
 void setValue(byte value)
          Binds the variable to the specified value.
 void setValue(char value)
          Binds the variable to the specified value.
 void setValue(double value)
          Binds the variable to the specified value.
 void setValue(float value)
          Binds the variable to the specified value.
 void setValue(IConcept value)
          Binds the variable to the specified value.
 void setValue(int value)
          Binds the variable to the specified value.
 void setValue(IUnknown value)
          Binds the variable to the 'unknown' value.
 void setValue(long value)
          Binds the variable to the specified value.
 void setValue(java.lang.Object value)
          Binds the variable to the specified value.
 void setValue(java.io.Serializable value)
          Binds the variable to the specified value.
 void setValue(short value)
          Binds the variable to the specified value.
 void setValue(java.lang.String value)
          Binds the variable to the specified value.
 

Field Detail

FORONE

static final int FORONE
The for-one quantifier for a variable indicating only one value can be bound

See Also:
Constant Field Values

FOREACH

static final int FOREACH
The for-each quantifier for a variable indicating only one value can be bound

See Also:
Constant Field Values

COLLECTALL

static final int COLLECTALL
The collect-all quantifier for a variable indicating multiple values fo the same type can be bound

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
                         throws ExternalException
Returns the variable name.

Returns:
String the name of the variable
Throws:
ExternalException - if an internal error occurs

getQuantification

int getQuantification()
                      throws ExternalException
Returns the variable's quantification, one of FORONE, FOREACH or COLLECTALL. FORONE and FOREACH variables can be bound to only one value. COLLECTALL variables can be bound to multiple values.

Returns:
int the quantification
Throws:
ExternalException - if an internal error occurs
See Also:
FORONE, FOREACH, COLLECTALL

getType

IType getType()
              throws ExternalException
Returns the type of the variable.

Returns:
IType the variable's type.
Throws:
ExternalException - if an internal error occurs
See Also:
IType

isBound

boolean isBound()
                throws ExternalException
Indicates whether the variable is bound to a value.

Returns:
true if the variable is bound, false otherwise.
Throws:
ExternalException - if an internal error occurs

isBoundAtStart

boolean isBoundAtStart()
                       throws ExternalException
Indicates whether the variable was bound to a value at the start of the activity in which the variable is used. Note that if the variable was not bound at the start of the activity and the variable is bound during the activity, this method will still return false.

Returns:
true if the variable was bound at the start of the activity, false otherwise.
Throws:
ExternalException - if an internal error occurs

isValueUnknown

boolean isValueUnknown()
                       throws ExternalException
Indicates whether the variable has as one of its values the value 'unknown'

Returns:
true if one of the values is unknown, false otherwise
Throws:
ExternalException - if an internal error occurs

setValue

void setValue(int value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(char value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(byte value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(short value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(long value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(float value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(double value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(boolean value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(java.lang.String value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable, if the variable type is a symbol then the string will automatically be converted to a symbol.
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(IConcept value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(java.io.Serializable value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(java.lang.Object value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the specified value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

setValue

void setValue(IUnknown value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Binds the variable to the 'unknown' value. If the variable can have multiple values it will replace all its values with the one specified value. Note that variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value for the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs
See Also:
IUnknown.UNKNOWN

getIntValue

int getIntValue()
                throws VariableNotBoundException,
                       InvalidTypeException,
                       ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
int the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getCharValue

char getCharValue()
                  throws VariableNotBoundException,
                         InvalidTypeException,
                         ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
char the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getByteValue

byte getByteValue()
                  throws VariableNotBoundException,
                         InvalidTypeException,
                         ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
byte the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getShortValue

short getShortValue()
                    throws VariableNotBoundException,
                           InvalidTypeException,
                           ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
short the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getLongValue

long getLongValue()
                  throws VariableNotBoundException,
                         InvalidTypeException,
                         ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
long the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getFloatValue

float getFloatValue()
                    throws VariableNotBoundException,
                           InvalidTypeException,
                           ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
float the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getDoubleValue

double getDoubleValue()
                      throws VariableNotBoundException,
                             InvalidTypeException,
                             ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
double the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getBooleanValue

boolean getBooleanValue()
                        throws VariableNotBoundException,
                               InvalidTypeException,
                               ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
boolean the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getStringValue

java.lang.String getStringValue()
                                throws VariableNotBoundException,
                                       InvalidTypeException,
                                       ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
String the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getSymbolValue

java.lang.String getSymbolValue()
                                throws VariableNotBoundException,
                                       InvalidTypeException,
                                       ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
String the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getConceptValue

IConcept getConceptValue()
                         throws VariableNotBoundException,
                                InvalidTypeException,
                                ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
IConcept the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getJavaValue

@Deprecated
java.io.Serializable getJavaValue()
                                  throws VariableNotBoundException,
                                         InvalidTypeException,
                                         ExternalException
Deprecated. Use getJavaObjectValue instead

Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
Serializable the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getJavaObjectValue

java.lang.Object getJavaObjectValue()
                                    throws VariableNotBoundException,
                                           InvalidTypeException,
                                           ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
Object the value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the variable is of a different type
ExternalException - if an internal error occurs

getUnknownValue

IUnknown getUnknownValue()
                         throws VariableNotBoundException,
                                InvalidTypeException,
                                ExternalException
Returns the bound value of the variable. If the binding consists of multiple values only the first binding is returned.

Returns:
IUnknown the 'unknown' value bound to the variable
Throws:
VariableNotBoundException - if the variable has no binding
InvalidTypeException - if the value is not 'unknown'
ExternalException - if an internal error occurs
See Also:
IUnknown.UNKNOWN

addValue

void addValue(int value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(char value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(byte value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(short value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(long value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(float value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates whether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(double value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates wether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(boolean value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates wether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(java.lang.String value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates wether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(IConcept value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates wether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(java.io.Serializable value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified variable to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates wether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(java.lang.Object value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the specified variable to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates wether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs

addValue

void addValue(IUnknown value)
              throws VariableBoundException,
                     InvalidTypeException,
                     ExternalException
Adds the 'unknown' value to the variable's binding. If the variable's quantification is one of forone or foreach and the variable is not yet bound it will set the value to the specified value, if however the variable is bound already to a value in the activity a VariableAlreadyBoundException is thrown. Note that the variable must have been unbound at the start of the activity in which it is bound. The isBoundAtStart method indicates this state. The isBound method indicates wether the variable is bound at any point in time, before or during an activity.

Parameters:
value - the value to be added to the binding of the variable
Throws:
VariableBoundException - if the variable was already bound at the start of the activity in which this method is called or if the quantification of the variable is forone or foreach and a value is already set for the variable.
InvalidTypeException - the variable is of a different type then the specified value and the types are not compatible
ExternalException - if an internal error occurs
See Also:
IUnknown.UNKNOWN

getValues

java.util.Enumeration getValues()
                                throws VariableNotBoundException,
                                       ExternalException
Returns a list of the values bound to this variable. Values of a primitive types are wrapped in their object counterparts (Integer, Double, and Boolean). If the quantification of the variable is forone or foreach it will return a list containing only one value.

Returns:
Enumeration a list of the values bound to the variable.
Throws:
VariableNotBoundException - if the variable has no binding
ExternalException - if an internal error occurs

hasMultipleValues

boolean hasMultipleValues()
                          throws ExternalException
Returns true if this variable is bound to multiple values. This will only be the case for bound collectall variables.

Returns:
true if this variable is bound to multiple values, else false
Throws:
ExternalException - if an internal error occurs


Copyright © 1997-2012 All Rights Reserved.