|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJava.problem.Variable
public class Variable
Description of a variable
Constructor Summary | |
---|---|
Variable()
|
Method Summary | |
---|---|
void |
addPossibleReaction(PossibleReaction r)
Add possible reaction r to the model space of this variable |
void |
addReaction(Reaction r)
Add reaction r to this variable |
void |
emptyReactions()
Set list of reactions to the empty list |
int |
getId()
Get id of variable, numbered 0...N-1 |
java.lang.String |
getName()
Get name of variable |
int |
getNumberOfPossibleReactions()
Get number of possible reactions assigned to the model space of this variable |
int |
getNumberOfReactions()
Get number of reactions assigned to this variable |
PossibleReaction |
getPossibleReaction(int i)
Get possible reaction i assigned to the model space of this variable |
Reaction |
getReaction(int i)
Get reaction i assigned to this variable |
java.lang.String |
getType()
Get type of variable; dependent or inputVariable |
boolean |
isDependent()
Check if type of variable is dependent |
boolean |
isInputVariable()
Check if type of variable is inputVariable |
int |
read(java.lang.String[] commands,
java.io.BufferedReader in,
int line_no,
int debug)
Read variable from input file in form of a buffered reader |
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 |
---|
public Variable()
Method Detail |
---|
public int read(java.lang.String[] commands, java.io.BufferedReader in, int line_no, int debug)
commands
- vector of strings on first line to readin
- buffered readerline_no
- current line in the buffered reader (i.e., problem file)debug
- debug levelpublic boolean isInputVariable()
public boolean isDependent()
public java.lang.String getType()
public int getId()
public java.lang.String getName()
public PossibleReaction getPossibleReaction(int i)
i
- the index
public int getNumberOfPossibleReactions()
public void addPossibleReaction(PossibleReaction r)
r
- the reaction to addpublic Reaction getReaction(int i)
i
- the index
public int getNumberOfReactions()
public void addReaction(Reaction r)
r
- the reaction to addpublic void emptyReactions()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |