edu.stanford.rt.datatype
Class IntegerType

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

public class IntegerType
extends OrderedType

Author:
Ninghui Li, Sandra Qiu
Implementation of IntegerType element

Field Summary
private  long base
           
private  boolean includeMax
           
private  boolean includeMin
           
private  long max
           
private  long min
           
private  long step
           
 
Fields inherited from class edu.stanford.rt.datatype.DataType
 
Constructor Summary
IntegerType(java.lang.String name, long min, long max, boolean includeMin, boolean includeMax, long base, long step)
          Constructor for IntegerType.
 
Method Summary
 int compares(DataValue value1, DataValue value2)
          Method compares.
 long getBase()
          Method getBase.
 long getMax()
          Method getMax.
 long getMin()
          Method getMin.
 long getStep()
          Method getStep.
 boolean isMaxIncluded()
          Method isMaxIncluded.
 boolean isMinIncluded()
          Method 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 long min

max

private long max

includeMin

private boolean includeMin

includeMax

private boolean includeMax

base

private long base

step

private long step
Constructor Detail

IntegerType

public IntegerType(java.lang.String name,
                   long min,
                   long max,
                   boolean includeMin,
                   boolean includeMax,
                   long base,
                   long step)
            throws java.lang.IllegalArgumentException
Constructor for IntegerType.

Method Detail

getMin

public long getMin()
Method getMin.

Returns:
long

getMax

public long getMax()
Method getMax.

Returns:
long

isMinIncluded

public boolean isMinIncluded()
Method isMinIncluded.

Returns:
boolean

isMaxIncluded

public boolean isMaxIncluded()
Method isMaxIncluded.

Returns:
boolean

getBase

public long getBase()
Method getBase.

Returns:
long

getStep

public long getStep()
Method getStep.

Returns:
long

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