Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.util
[Java] Class ClosureComparator

    java.lang.Object
      groovy.util.ClosureComparator

All Implemented Interfaces:
  java.util.Comparator

    public class ClosureComparator
    extends java.lang.Object

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

Authors:
  James Strachan

Version:
  \$Revision\$

Constructor Summary
`ClosureComparator(Closure closure)`

Method Summary
`int` | `compare(java.lang.Object object1, java.lang.Object object2)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### ClosureComparator

    public ClosureComparator(Closure closure)

Method Detail

### compare

    public int compare(java.lang.Object object1, java.lang.Object object2)

Groovy Documentation