javax.rad.type
Class AbstractComparableType<T extends java.lang.Comparable<T>>

java.lang.Object
  extended by javax.rad.type.AbstractType<T>
      extended by javax.rad.type.AbstractComparableType<T>
Type Parameters:
T - type instanceof Comparable.
All Implemented Interfaces:
IType<T>
Direct Known Subclasses:
AbstractNumberType, BooleanType, StringType

public abstract class AbstractComparableType<T extends java.lang.Comparable<T>>
extends AbstractType<T>

The AbstractComparableType is the base implementation for all comparable types.


Field Summary
 
Fields inherited from interface javax.rad.type.IType
UNKNOWN_TYPE
 
Constructor Summary
AbstractComparableType()
           
 
Method Summary
 int compareTo(T pObject1, java.lang.Object pObject2)
          Compares two objects.
 
Methods inherited from class javax.rad.type.AbstractType
equals, getTypeFromClass, getTypeFromObject, hashCode, registerType, toString, validatedValueOf, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.rad.type.IType
getTypeClass
 

Constructor Detail

AbstractComparableType

public AbstractComparableType()
Method Detail

compareTo

public int compareTo(T pObject1,
                     java.lang.Object pObject2)
Compares two objects. If the first object is smaller than the second object a value < 0 is returned. If the two objects are equal than 0 is returned. If the first object is greater than the second object a value > 0 is returned.

Parameters:
pObject1 - the first object.
pObject2 - the second object.
Returns:
< 0 if pObject1 is smaller, 0 if equal and > 0 if it is greater then pObject2


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.