de.xabsl.jxabsl.parameters
Class ParameterAssignment

java.lang.Object
  extended by de.xabsl.jxabsl.parameters.ParameterAssignment

public class ParameterAssignment
extends java.lang.Object

Represents the assignment of parameters of a subsequent basic behaviors or an option or an input symbol, i.e. stores expressions and writes them to the appropriate parameters before execution of a behavior or input symbol. Parameters that have no assigned expression are set to a standard value.


Field Summary
protected  DebugMessages debug
           
 
Constructor Summary
ParameterAssignment(DebugMessages debug, Parameters refParameters)
           
 
Method Summary
 void create(InputSource input, OptionParameters optionParameters, Symbols symbols, TimeFunction timeOfOptionExecution, TimeFunction timeOfStateExecution, java.util.List<Action> actions)
          Creates the parameter assignment.
 java.lang.String getBooleanDebugName(int pos)
          Returns the name of a parameter for debugging
 boolean[] getBooleanDebugValues()
           
 java.util.Set<java.lang.String> getBooleanNames()
          May only be called before refParameters are set.
 java.lang.String getDecimalDebugName(int pos)
          Returns the name of a parameter for debugging
 double[] getDecimalDebugValues()
          for debugging **
 java.util.Set<java.lang.String> getDecimalNames()
          May only be called before refParameters are set.
 java.lang.String getEnumeratedDebugName(int pos)
          Returns the name of a parameter for debugging
 java.lang.Object[] getEnumeratedDebugValues()
           
 java.util.Set<java.lang.String> getEnumeratedNames()
          May only be called before refParameters are set.
 Parameters getRefParameters()
          Return the referenced parameters.
 void set()
          sets parameter variables to current expression values
 void setRefParameters(Parameters refParameters)
          Set the referenced parameters, to which values will be written
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

protected DebugMessages debug
Constructor Detail

ParameterAssignment

public ParameterAssignment(DebugMessages debug,
                           Parameters refParameters)
Parameters:
debug -
refParameters - The referenced Parameters. May be null, but in that case setRefParameters must be called later on.
Method Detail

create

public void create(InputSource input,
                   OptionParameters optionParameters,
                   Symbols symbols,
                   TimeFunction timeOfOptionExecution,
                   TimeFunction timeOfStateExecution,
                   java.util.List<Action> actions)
            throws IntermediateCodeMalformedException
Creates the parameter assignment.

Parameters:
input - An input source for the intermediate code. It must be opened and read until a position where a parameter assignment starts.
optionParameters - The parameters of the option
symbols - All available symbols
timeOfOptionExecution - The time how long the option is already active
timeOfStateExecution - The time how long the current state is already active
actions - The subsequent behaviors i.e options and basic behaviors of the state.
Throws:
IntermediateCodeMalformedException

set

public void set()
sets parameter variables to current expression values


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setRefParameters

public void setRefParameters(Parameters refParameters)
Set the referenced parameters, to which values will be written

Parameters:
refParameters - the referenced parameters

getDecimalNames

public java.util.Set<java.lang.String> getDecimalNames()
May only be called before refParameters are set.

Returns:
the names of all decimal parameters to be referenced.

getBooleanNames

public java.util.Set<java.lang.String> getBooleanNames()
May only be called before refParameters are set.

Returns:
the names of all boolean parameters to be referenced.

getEnumeratedNames

public java.util.Set<java.lang.String> getEnumeratedNames()
May only be called before refParameters are set.

Returns:
the names of all enumerated parameters to be referenced.

getRefParameters

public Parameters getRefParameters()
Return the referenced parameters.

Returns:

getDecimalDebugValues

public double[] getDecimalDebugValues()
for debugging **


getBooleanDebugValues

public boolean[] getBooleanDebugValues()

getEnumeratedDebugValues

public java.lang.Object[] getEnumeratedDebugValues()

getBooleanDebugName

public java.lang.String getBooleanDebugName(int pos)
Returns the name of a parameter for debugging

Parameters:
pos - The position in the debuggin values
Returns:
The parameter's name

getDecimalDebugName

public java.lang.String getDecimalDebugName(int pos)
Returns the name of a parameter for debugging

Parameters:
pos - The position in the debuggin values
Returns:
The parameter's name

getEnumeratedDebugName

public java.lang.String getEnumeratedDebugName(int pos)
Returns the name of a parameter for debugging

Parameters:
pos - The position in the debuggin values
Returns:
The parameter's name