[Java] Class ClosureComparator<T>
- groovy.util.ClosureComparator
- All Implemented Interfaces and Traits:
- Comparator, Serializable
public class ClosureComparator<T> extends Object implements Comparator, Serializable
A Comparator which uses a closure to compare 2 values being equal
Constructor Summary
Constructor and description |
---|
ClosureComparator
(Closure closure) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public int |
compare(T object1, T object2) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor Detail
public ClosureComparator(Closure closure)
Method Detail
public int compare(T object1, T object2)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/groovy/util/ClosureComparator.html