groovy.util
Class ClosureComparator<T>

java.lang.Object
  extended by groovy.util.ClosureComparator<T>
All Implemented Interfaces:
Comparator<T>

public class ClosureComparator<T>
extends Object
implements Comparator<T>

A Comparator which uses a closure to compare 2 values being equal

Version:
$Revision: 16878 $
Author:
James Strachan

Constructor Summary
ClosureComparator(Closure closure)
           
 
Method Summary
 int compare(T object1, T 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

ClosureComparator

public ClosureComparator(Closure closure)
Method Detail

compare

public int compare(T object1,
                   T object2)
Specified by:
compare in interface Comparator<T>

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