groovy.util
Class OrderBy
java.lang.Object
groovy.util.OrderBy
- All Implemented Interfaces:
- java.util.Comparator
public class OrderBy
- extends java.lang.Object
- implements java.util.Comparator
A helper class for sorting objects via a closure to return the field
or operation on which to sort.
- Version:
- $Revision: 9992 $
- Author:
- James Strachan
Field Summary |
private java.util.List |
closures
|
Method Summary |
void |
add(Closure closure)
|
int |
compare(java.lang.Object object1,
java.lang.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 |
closures
private java.util.List closures
OrderBy
public OrderBy()
OrderBy
public OrderBy(Closure closure)
OrderBy
public OrderBy(java.util.List closures)
add
public void add(Closure closure)
compare
public int compare(java.lang.Object object1,
java.lang.Object object2)
- Specified by:
compare
in interface java.util.Comparator
Copyright © ${year} The Codehaus. All Rights Reserved.