[Java] Class OrderBy<T>
- groovy.util.OrderBy
- All Implemented Interfaces and Traits:
- Comparator, Serializable
public class OrderBy extends Object
A helper class for sorting objects via a closure to return the field or operation on which to sort.
- Authors:
- James Strachan
Constructor Summary
Constructor and description |
---|
OrderBy
() |
OrderBy
(boolean equalityCheck) |
OrderBy
(Closure closure) |
OrderBy
(Closure closure, boolean equalityCheck) |
OrderBy
(List<Closure> closures) |
OrderBy
(List<Closure> closures, boolean equalityCheck) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
void |
add(Closure closure) | |
int |
compare(T object1, T object2) | |
boolean |
isEqualityCheck() | |
void |
setEqualityCheck(boolean equalityCheck) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor Detail
public OrderBy()
public OrderBy(boolean equalityCheck)
public OrderBy(Closure closure)
public OrderBy(Closure closure, boolean equalityCheck)
public OrderBy(List<Closure> closures)
public OrderBy(List<Closure> closures, boolean equalityCheck)
Method Detail
public void add(Closure closure)
public int compare(T object1, T object2)
public boolean isEqualityCheck()
public void setEqualityCheck(boolean equalityCheck)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/groovy/util/OrderBy.html