org.springframework.ldap.util
Class ListComparator

java.lang.Object
  extended by org.springframework.ldap.util.ListComparator
All Implemented Interfaces:
java.util.Comparator

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

Comparator for comparing lists of Comparable objects.

Author:
Mattias Arthursson

Constructor Summary
ListComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compare two lists of Comparable objects.
 
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

ListComparator

public ListComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compare two lists of Comparable objects.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - the first object to be compared.
o2 - the second object to be compared.
Throws:
java.lang.ClassCastException - if either of the lists contains an object that is not Comparable.


Copyright 2002-2006. All Rights Reserved.