ve
Class Variable

java.lang.Object
  |
  +--ve.Variable

public class Variable
extends java.lang.Object

This class is the class of variables.


Field Summary
protected  java.lang.String[] domain
          domain is the array of values this variable can take.
protected  java.lang.String name
          the external name of the variable
private static int nextId
          the identifier of the next variable; also the number of variables assigned.
private  int uniqueId
          the unique identifier of the variable.
 
Constructor Summary
Variable(java.lang.String varName, java.lang.String[] domainArray)
          Variable constructor creates a variable.
 
Method Summary
 int compareTo(java.lang.Object var)
          compares two Variables.
 java.lang.String[] getDomain()
          returns the domain, the array of values this variable can take.
 int getId()
          get the unique identifier of the variable
 java.lang.String getName()
          returns the external name of the variable
 int hashCode()
          returns a code useful for hashing
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
the external name of the variable

domain

protected java.lang.String[] domain
domain is the array of values this variable can take.

nextId

private static int nextId
the identifier of the next variable; also the number of variables assigned.

uniqueId

private int uniqueId
the unique identifier of the variable.
Constructor Detail

Variable

public Variable(java.lang.String varName,
                java.lang.String[] domainArray)
Variable constructor creates a variable.
Parameters:
varName - string representation of the name
domainString - a string consisting of the domain elements separated by commas.
Method Detail

getName

public java.lang.String getName()
returns the external name of the variable

getDomain

public java.lang.String[] getDomain()
returns the domain, the array of values this variable can take.

getId

public int getId()
get the unique identifier of the variable

compareTo

public int compareTo(java.lang.Object var)
compares two Variables.

hashCode

public int hashCode()
returns a code useful for hashing
Overrides:
hashCode in class java.lang.Object