jasi.sim.basic.value
Class AbstractComparableObject<T>

java.lang.Object
  extended by jasi.sim.basic.value.AbstractSimValueType
      extended by jasi.sim.basic.value.AbstractComparableObject<T>
Type Parameters:
T - The type.
All Implemented Interfaces:
ExtendedComparable<T>, SimValue, java.io.Serializable, java.lang.Comparable<T>
Direct Known Subclasses:
AbstractElementBean, AbstractEventBean, ComparableGeoObject, Id, TFloat, Time, TInteger, TString

public abstract class AbstractComparableObject<T>
extends AbstractSimValueType
implements ExtendedComparable<T>

This class compares objects for order. It is an implementation of the ExtendedComparable interface. All it's compare methods are based on the compareTo()-method, which has to be implemented by extending classes.

See Also:
Serialized Form

Constructor Summary
AbstractComparableObject()
           
 
Method Summary
abstract  int compareTo(T o)
          Compares this object with the specified object for order.
 boolean isEQ(T o)
          Compares if this object is equal to the specified object.
 boolean isGE(T o)
          Compares if this object is greater or equal than the specified object.
 boolean isGT(T o)
          Compares if this object is greater than the specified object.
 boolean isLE(T o)
          Compares if this object is less or equal than the specified object.
 boolean isLT(T o)
          Compares if this object is less than the specified object.
 boolean isNE(T o)
          Compares if this object is not equal to the specified object.
 
Methods inherited from class jasi.sim.basic.value.AbstractSimValueType
getContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComparableObject

public AbstractComparableObject()
Method Detail

isLT

public final boolean isLT(T o)
Compares if this object is less than the specified object.

Specified by:
isLT in interface ExtendedComparable<T>
Parameters:
o - That object which is to compared with this object.
Returns:
True, if this object is less than the specified object.
See Also:
ExtendedComparable.isLT(Object)

isLE

public final boolean isLE(T o)
Compares if this object is less or equal than the specified object.

Specified by:
isLE in interface ExtendedComparable<T>
Parameters:
o - That object which is to compared with this object.
Returns:
True, if this object is less than the specified object.
See Also:
ExtendedComparable.isLE(Object)

isGT

public final boolean isGT(T o)
Compares if this object is greater than the specified object.

Specified by:
isGT in interface ExtendedComparable<T>
Parameters:
o - That object which is to compared with this object.
Returns:
True, if this object is less than the specified object.
See Also:
ExtendedComparable.isGT(Object)

isGE

public final boolean isGE(T o)
Compares if this object is greater or equal than the specified object.

Specified by:
isGE in interface ExtendedComparable<T>
Parameters:
o - That object which is to compared with this object.
Returns:
True, if this object is less than the specified object.
See Also:
ExtendedComparable.isGE(Object)

isEQ

public final boolean isEQ(T o)
Compares if this object is equal to the specified object.

Specified by:
isEQ in interface ExtendedComparable<T>
Parameters:
o - That object which is to compared with this object.
Returns:
True, if this object is less than the specified object.
See Also:
ExtendedComparable.isEQ(Object)

isNE

public final boolean isNE(T o)
Compares if this object is not equal to the specified object.

Specified by:
isNE in interface ExtendedComparable<T>
Parameters:
o - That object which is to compared with this object.
Returns:
True, if this object is less than the specified object.
See Also:
ExtendedComparable.isNE(Object)

compareTo

public abstract int compareTo(T o)
Compares this object with the specified object for order.

Specified by:
compareTo in interface java.lang.Comparable<T>
Parameters:
o - That object which is compared with this object.
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than that object.
See Also:
Comparable.compareTo(Object)