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
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
min
private double min
max
private double max
includeMin
private boolean includeMin
includeMax
private boolean includeMax
base
private double base
step
private double step
DecimalType
public DecimalType(java.lang.String name,
double min,
double ma,
boolean includeMin,
boolean includeMax,
double base,
double step)
throws java.lang.IllegalArgumentException
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