com.interface21.core
Class OrderComparator

java.lang.Object
  |
  +--com.interface21.core.OrderComparator
All Implemented Interfaces:
java.util.Comparator

public class OrderComparator
extends java.lang.Object
implements java.util.Comparator

Comparator implementation for Ordered objects, sorting by order value ascending (resp. by priority descending).

Non-Ordered objects are treated as greatest order values, thus ending up at the end of the list, in arbitrary order (just like same order values of Ordered objects).

Since:
07.04.2003
Author:
Juergen Hoeller
See Also:
Ordered

Constructor Summary
OrderComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 
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

OrderComparator

public OrderComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator


Rod Johnson and Spring contributors 2001-2003.