com.sun.msv.datatype.xsd

Interface Comparator

Known Implementing Classes:
ByteType, DateTimeType, DateType, DoubleType, DurationType, FloatType, GDayType, GMonthDayType, GMonthType, GYearMonthType, GYearType, IntegerType, IntType, LongType, NegativeIntegerType, NonNegativeIntegerType, NonPositiveIntegerType, NumberType, PositiveIntegerType, ShortType, TimeType, UnsignedByteType, UnsignedIntType, UnsignedLongType, UnsignedShortType

public interface Comparator

Comparable datatype. Those datatypes which has order relation must implement this interface. RangeFacet uses this interface to do its job. It differs from Comparator in return value.
Author:
Kohsuke KAWAGUCHI

Field Summary

static int
EQUAL
static int
GREATER
static int
LESS
static int
UNDECIDABLE

Method Summary

int
compare(Object o1, Object o2)
compare to value types and decides its order relation

Field Details

EQUAL

public static final int EQUAL
Field Value:
0

GREATER

public static final int GREATER
Field Value:
1

LESS

public static final int LESS
Field Value:
-1

UNDECIDABLE

public static final int UNDECIDABLE
Field Value:
999

Method Details

compare

public int compare(Object o1,
                   Object o2)
compare to value types and decides its order relation