de.esprit.common.util

## Class GenericComparator<E>

- java.lang.Object
- - de.esprit.common.util.GenericComparator<E>

- All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<E>

      public class GenericComparator<E>
      extends java.lang.Object
      implements java.util.Comparator<E>, java.io.Serializable

  This comparator just compares any `Comparable` objects using their `Comparable.compareTo(Object)` method.
  Author:
    Rainer Buesch
  See Also:
    `Comparable`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GenericComparator()`
    `GenericComparator(boolean isAscending)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(E o1, E o2)`
    `boolean` | `isAscending()`
    `void` | `setAscending(boolean isAscending)`

    - ### 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

    - #### GenericComparator

          public GenericComparator()

    - #### GenericComparator

          public GenericComparator(boolean isAscending)

  - ### Method Detail

    - #### compare

          public int compare(E o1,
                    E o2)

      Specified by:
        `compare` in interface `java.util.Comparator<E>`

    - #### isAscending

          public boolean isAscending()

    - #### setAscending

          public void setAscending(boolean isAscending)

Copyright © 2014 EsprIT-Systems. All Rights Reserved.