Package org.codehaus.groovy.runtime
Class NumberAwareComparator<T>
java.lang.Object
org.codehaus.groovy.runtime.NumberAwareComparator<T>
- All Implemented Interfaces:
- Serializable,- Comparator<T>
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.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparatorequals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
- 
Constructor Details- 
NumberAwareComparatorpublic NumberAwareComparator()
- 
NumberAwareComparatorpublic NumberAwareComparator(boolean ignoreZeroSign) - Since:
- 3.0.8
 
 
- 
- 
Method Details- 
compare- Specified by:
- comparein interface- Comparator<T>
 
 
-