SalesPoint v3.3 API

util
Class NaturalComparator<T extends Comparable<Object>>

java.lang.Object
  extended by util.NaturalComparator<T>
All Implemented Interfaces:
Serializable, Comparator<T>, SerializableComparator<T>

public final class NaturalComparator<T extends Comparable<Object>>
extends Object
implements SerializableComparator<T>

A comparator that compares Objects using their natural order.

This is a convenience facade for the Comparable interface.

Since:
v2.0
Author:
Steffen Zschaler
See Also:
Serialized Form

Constructor Summary
NaturalComparator()
           
 
Method Summary
 int compare(T o1, T o2)
          Compare the two objects assuming they are both comparable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

NaturalComparator

public NaturalComparator()
Method Detail

compare

public final int compare(T o1,
                         T o2)
Compare the two objects assuming they are both comparable.

Specified by:
compare in interface Comparator<T extends Comparable<Object>>
Override:
Never

SalesPoint v3.3 API