SalesPoint Framework v3.1

util
Class NaturalComparator

java.lang.Object
  extended byutil.NaturalComparator
All Implemented Interfaces:
Comparator, Serializable, SerializableComparator

public final class NaturalComparator
extends Object
implements SerializableComparator

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(Object o1, Object 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(Object o1,
                         Object o2)
Compare the two objects assuming they are both comparable.

Specified by:
compare in interface Comparator
Override:
Never

SalesPoint Framework v3.1