edu.stanford.rt.datatype
Class StringType

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

public class StringType
extends OrderedType

Author:
Ninghui Li, Sandra Qiu
Implementation of StringType element

Field Summary
private  boolean ignoreCase
           
private  boolean ordered
           
 
Fields inherited from class edu.stanford.rt.datatype.DataType
 
Constructor Summary
StringType(java.lang.String name, boolean ignoreCase, boolean ordered)
          Constructor for StringType.
 
Method Summary
 int compares(DataValue value1, DataValue value2)
          Method compares.
 boolean isIgnoreCase()
          Method isIgnoreCase.
 boolean isOrdered()
          Method isOrdered.
 boolean isValidValue(DataValue value)
          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

ignoreCase

private boolean ignoreCase

ordered

private boolean ordered
Constructor Detail

StringType

public StringType(java.lang.String name,
                  boolean ignoreCase,
                  boolean ordered)
Constructor for StringType.

Method Detail

isValidValue

public boolean isValidValue(DataValue value)
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

isIgnoreCase

public boolean isIgnoreCase()
Method isIgnoreCase.

Returns:
boolean

isOrdered

public boolean isOrdered()
Method isOrdered.

Returns:
boolean

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