org.springframework.ldap.support

## Class ListComparator

- java.lang.Object
- - org.springframework.ldap.support.ListComparator

- All Implemented Interfaces:
    Serializable, Comparator

      public class ListComparator
      extends Object
      implements Comparator, Serializable

  Comparator for comparing lists of Comparable objects.
  Author:
    Mattias Hellborg Arthursson
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ListComparator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Object o1, 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

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### ListComparator

          public ListComparator()

  - ### Method Detail

    - #### compare

          public int compare(Object o1,
                             Object o2)

      Compare two lists of Comparable objects.
      Specified by:
        `compare` in interface `Comparator`
      Parameters:
        `o1` - the first object to be compared.
        `o2` - the second object to be compared.
      Throws:
        `ClassCastException` - if any of the lists contains an object that is not Comparable.