## groovy.util
Class ClosureComparator

    java.lang.Object
      groovy.util.ClosureComparator

All Implemented Interfaces:
  Comparator

    public class ClosureComparator

extends Object
implements Comparator

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

Version:
  $Revision: 6778 $
Author:
  James Strachan

Constructor Summary
`ClosureComparator(Closure closure)`

Method Summary
`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

### ClosureComparator

    public ClosureComparator(Closure closure)

Method Detail

### compare

    public int compare(Object object1,
                       Object object2)

  Specified by:
    `compare` in interface `Comparator`

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