public class NumberAwareComparator<T>
extends Object
implements Comparator, Serializable
Compares two objects using Groovy's friendly comparison algorithm, i.e. handles nulls gracefully (nul being less than everything else) and performs numeric type coercion if required.
| Constructor and description |
|---|
NumberAwareComparator() |
NumberAwareComparator(boolean ignoreZeroSign)
|
| Type Params | Return Type | Name and description |
|---|---|---|
|
public int |
compare(T o1, T o2)Compares two values using Groovy comparison semantics with numeric coercion. |
Compares two values using Groovy comparison semantics with numeric coercion.
o1 - the first value to compareo2 - the second value to compareCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.