groovy.util
Class OrderBy

java.lang.Object
  extended by 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: 10259 $
Author:
James Strachan

Field Summary
private  java.util.List closures
           
 
Constructor Summary
OrderBy()
           
OrderBy(Closure closure)
           
OrderBy(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
 

Field Detail

closures

private java.util.List closures
Constructor Detail

OrderBy

public OrderBy()

OrderBy

public OrderBy(Closure closure)

OrderBy

public OrderBy(java.util.List closures)
Method Detail

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.