Java.problem
Class VariableSet

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

public class VariableSet
extends java.lang.Object

Description of a variable set

Since:
1.0

Constructor Summary
VariableSet()
           
VariableSet(Variable v)
          Create variable set containing one variable
VariableSet(java.util.Vector<Variable> members)
          Create variable set containing a vector of variables
 
Method Summary
 Variable getMember(int i)
          Get member variable i from the set of variables
 int getNumberOfMembers()
          Get the number of member variables
 int read(java.lang.String[] commands, java.io.BufferedReader in, int line_no, int debug, java.util.Vector<Variable> variables)
          Read variable set form 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

VariableSet

public VariableSet()

VariableSet

public VariableSet(Variable v)
Create variable set containing one variable

Parameters:
v - add one single member

VariableSet

public VariableSet(java.util.Vector<Variable> members)
Create variable set containing a vector of variables

Parameters:
members - vector of variables
Method Detail

read

public int read(java.lang.String[] commands,
                java.io.BufferedReader in,
                int line_no,
                int debug,
                java.util.Vector<Variable> variables)
Read variable set form 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

getNumberOfMembers

public int getNumberOfMembers()
Get the number of member variables

Returns:
the number of member variables

getMember

public Variable getMember(int i)
Get member variable i from the set of variables

Returns:
variable i

toString

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

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