Java.problem
Class Reaction

java.lang.Object
  extended by Java.problem.Reaction

public class Reaction
extends java.lang.Object

Description of a reaction given in the model
If an initial model in a problem, then one range for each parameter stored in a Vector called localRanges
If a solution model, then one value for each parameter stored in a Vector called localParameters

Since:
1.0

Constructor Summary
Reaction()
           
 
Method Summary
 double getLocalParameter(int i)
          Get local parameter i
 Range getLocalRange(int i)
          Get local range i
 Variable getLocalVariable(int i)
          Get local variable i
 int getNumberOfLocalParameters()
          Get number of local parameters
 int getNumberOfLocalRanges()
          Get number of local ranges
 int getNumberOfLocalVariables()
          Get number of local variables
 ReactionType getReactionType()
           
 int read(java.lang.String[] commands, java.io.BufferedReader in, int line_no, int debug, java.util.Vector<Variable> variables, java.util.Vector<ReactionType> reactionTypes, java.util.Vector<Range> ranges)
          Read reaction from input file in form of a buffered reader
 void setLocalRange(int i, Range r)
          Set the local range for parameter i of this reaction
 void setLocalVariable(int i, Variable v)
          Set the local variable i of this reaction
 void setReactionType(ReactionType r)
          Set the reaction type
 java.lang.String toString()
          Get string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Reaction

public Reaction()
Method Detail

read

public int read(java.lang.String[] commands,
                java.io.BufferedReader in,
                int line_no,
                int debug,
                java.util.Vector<Variable> variables,
                java.util.Vector<ReactionType> reactionTypes,
                java.util.Vector<Range> ranges)
Read reaction from input file in form of a buffered reader

Parameters:
commands - vector of strings on first line to read
in - buffered reader
line_no - current line in the buffered reader (i.e., problem file)
debug - debug level
variables - vector of variables
reactionTypes - vector of possible reaction types
ranges - vector of possible ranges

getReactionType

public ReactionType getReactionType()

getLocalVariable

public Variable getLocalVariable(int i)
Get local variable i

Parameters:
i - the index
Returns:
the variable

getNumberOfLocalVariables

public int getNumberOfLocalVariables()
Get number of local variables

Returns:
the number

getLocalRange

public Range getLocalRange(int i)
Get local range i

Parameters:
i - the index
Returns:
the range

getNumberOfLocalRanges

public int getNumberOfLocalRanges()
Get number of local ranges

Returns:
the number

getLocalParameter

public double getLocalParameter(int i)
Get local parameter i

Parameters:
i - the index
Returns:
the parameter value

getNumberOfLocalParameters

public int getNumberOfLocalParameters()
Get number of local parameters

Returns:
the number

setReactionType

public void setReactionType(ReactionType r)
Set the reaction type

Parameters:
r - the type

setLocalVariable

public void setLocalVariable(int i,
                             Variable v)
Set the local variable i of this reaction

Parameters:
i - the index
v - the variable

setLocalRange

public void setLocalRange(int i,
                          Range r)
Set the local range for parameter i of this reaction

Parameters:
i - the index
r - the range

toString

public java.lang.String toString()
Get string representation

Overrides:
toString in class java.lang.Object
Returns:
the string