Package: groovy.util

## [Java] Class OrderBy<T>

- groovy.util.OrderBy

- All Implemented Interfaces and Traits:
    Comparator, Serializable

      public class OrderBy<T>
      extends Object
      implements Comparator, Serializable

  A helper class for sorting objects via a closure to return the field or operation on which to sort.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `OrderBy()`
    `OrderBy(boolean equalityCheck)`
    `OrderBy(Closure closure)`
    `OrderBy(Closure closure, boolean equalityCheck)`
    `OrderBy(List<Closure> closures)`
    `OrderBy(List<Closure> closures, boolean equalityCheck)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `add(Closure closure)`
    `` | `public int` | `compare(T object1, T object2)`
    `` | `public boolean` | `isEqualityCheck()`
    `` | `public void` | `setEqualityCheck(boolean equalityCheck)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public OrderBy()

    - #### public OrderBy(boolean equalityCheck)

    - #### public OrderBy(Closure closure)

    - #### public OrderBy(Closure closure, boolean equalityCheck)

    - #### public OrderBy(List<Closure> closures)

    - #### public OrderBy(List<Closure> closures, boolean equalityCheck)

  - ### Method Detail

    - #### public void add(Closure closure)

    - #### @Override
      public int compare(T object1, T object2)

    - #### public boolean isEqualityCheck()

    - #### public void setEqualityCheck(boolean equalityCheck)