Package com.complexible.common.util

# Class NaturalOrderComparator<T extends Comparable<T>>

java.lang.Object
com.complexible.common.util.NaturalOrderComparator<T>

All Implemented Interfaces:
  `Comparator<T>`

public final class NaturalOrderComparator<T extends Comparable<T>> extends Object implements Comparator<T>

Simple `Comparator` implementation which can be used for `Comparable` objects.

Since:
  2.3
Version:
  2.5
Author:
  Michael Grove

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compare(T o1, T o2)`
  `static <T extends Comparable<T>>
  NaturalOrderComparator<T>`
  `create()`

  ### 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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- ## Method Details

  - ### create

    public static <T extends Comparable<T>> NaturalOrderComparator<T> create()

  - ### compare

    public int compare(T o1, T o2)
    Specified by:
      `compare` in interface `Comparator<T extends Comparable<T>>`