Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » core » [javadoc | source]
org.springframework.core
public class: OrderComparator [javadoc | source]
java.lang.Object
   org.springframework.core.OrderComparator

All Implemented Interfaces:
    Comparator

Direct Known Subclasses:
    AnnotationAwareOrderComparator

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).

Method from org.springframework.core.OrderComparator Summary:
compare,   getOrder
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.core.OrderComparator Detail:
 public int compare(Object o1,
    Object o2) 
 protected int getOrder(Object obj) 
    Determine the order value for the given object.

    The default implementation checks against the Ordered interface. Can be overridden in subclasses.