org.omegahat.DataStructures.Data
Class AbstractVariable

java.lang.Object
  |
  +--org.omegahat.DataStructures.Data.AbstractVariable
Direct Known Subclasses:
FactorVariable, RealVariable

public abstract class AbstractVariable
extends java.lang.Object

Implementation class for the different classes of variables that provides the outer loop for reading values from a stream.


Field Summary
protected  java.util.Hashtable metaData
          Stores the name-value properties for this variable for entries such as a description string, anomalies missing value codes, etc.
protected  java.lang.String name
           
 
Constructor Summary
AbstractVariable()
           
 
Method Summary
abstract  void add(double value, int which)
           
abstract  void add(java.lang.Object value, int which)
           
 java.lang.String getName()
           
 java.util.Hashtable metaData()
          Accessor for metaData field
 java.util.Hashtable metaData(java.util.Hashtable value)
          Accessor for setting metaData field
 int read(java.io.Reader reader)
          Read tokens from the input reader, in the sense of the class java.io.StreamTokenizer.
 java.lang.String setName(java.lang.String val)
           
 java.lang.Object value(long i)
           
abstract  VariableInt values(int[] which)
           
 VariableInt values(SelectorInt selector)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaData

protected java.util.Hashtable metaData
Stores the name-value properties for this variable for entries such as a description string, anomalies missing value codes, etc. that are interpreted by different "readers"

name

protected java.lang.String name
Constructor Detail

AbstractVariable

public AbstractVariable()
Method Detail

value

public java.lang.Object value(long i)

read

public int read(java.io.Reader reader)
         throws java.io.IOException
Read tokens from the input reader, in the sense of the class java.io.StreamTokenizer.

Following the sense of that class, tokens are either numbers or words (ends of line are ignored). The corresponding add() method is called using the numeric or string value field of the tokenizer.


add

public abstract void add(double value,
                         int which)

add

public abstract void add(java.lang.Object value,
                         int which)

metaData

public java.util.Hashtable metaData()
Accessor for metaData field

metaData

public java.util.Hashtable metaData(java.util.Hashtable value)
Accessor for setting metaData field

getName

public java.lang.String getName()

setName

public java.lang.String setName(java.lang.String val)

values

public VariableInt values(SelectorInt selector)

values

public abstract VariableInt values(int[] which)