## groovy.util
Class OrderBy

    java.lang.Object
      groovy.util.OrderBy

All Implemented Interfaces:
  Comparator

    public class OrderBy

extends Object
implements Comparator

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

Version:
  $Revision: 10259 $
Author:
  James Strachan

Constructor Summary
`OrderBy()`
`OrderBy(Closure closure)`
`OrderBy(List closures)`

Method Summary
`void` `add(Closure closure)`
`int` `compare(Object object1, Object object2)`

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

### OrderBy

    public OrderBy()

### OrderBy

    public OrderBy(Closure closure)

### OrderBy

    public OrderBy(List closures)

Method Detail

### add

    public void add(Closure closure)

### compare

    public int compare(Object object1,
                       Object object2)

  Specified by:
    `compare` in interface `Comparator`

Copyright © 2003-2008 The Codehaus. All rights reserved.