edu.stanford.rt.datatype
Class DecimalType

java.lang.Object
  |
  +--edu.stanford.rt.datatype.DataType
        |
        +--edu.stanford.rt.datatype.SimpleType
              |
              +--edu.stanford.rt.datatype.OrderedType
                    |
                    +--edu.stanford.rt.datatype.DecimalType

public class DecimalType
extends OrderedType

DecimalType defines the decimal type. The name for this type is "DecimalType". It has the following attributes: min, max, base, and step. TODO


Field Summary
private  double base
           
private  boolean includeMax
           
private  boolean includeMin
           
private  double max
           
private  double min
           
private  double step
           
 
Fields inherited from class edu.stanford.rt.datatype.DataType
 
Constructor Summary
DecimalType(java.lang.String name, double min, double ma, boolean includeMin, boolean includeMax, double base, double step)
           
 
Method Summary
 int compares(DataValue value1, DataValue value2)
          Method compares.
 double getBase()
           
 double getMax()
           
 double getMin()
           
 double getStep()
           
 boolean isMaxIncluded()
           
 boolean isMinIncluded()
           
 boolean isValidValue(DataValue v)
          Check if the DataValue o is a legal value for its type.
 java.lang.String toString(java.lang.String indent)
          Method toString.
 
Methods inherited from class edu.stanford.rt.datatype.DataType
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

min

private double min

max

private double max

includeMin

private boolean includeMin

includeMax

private boolean includeMax

base

private double base

step

private double step
Constructor Detail

DecimalType

public DecimalType(java.lang.String name,
                   double min,
                   double ma,
                   boolean includeMin,
                   boolean includeMax,
                   double base,
                   double step)
            throws java.lang.IllegalArgumentException
Method Detail

getMin

public double getMin()

getMax

public double getMax()

isMinIncluded

public boolean isMinIncluded()

isMaxIncluded

public boolean isMaxIncluded()

getBase

public double getBase()

getStep

public double getStep()

isValidValue

public boolean isValidValue(DataValue v)
Description copied from class: SimpleType
Check if the DataValue o is a legal value for its type.

Specified by:
isValidValue in class SimpleType

compares

public int compares(DataValue value1,
                    DataValue value2)
Description copied from class: OrderedType
Method compares. Compares two DataValue objects.

Specified by:
compares in class OrderedType
Parameters:
value1 -
value2 -
Returns:
int

toString

public java.lang.String toString(java.lang.String indent)
Description copied from class: DataType
Method toString.

Overrides:
toString in class DataType
Parameters:
indent -
Returns:
String