Package org.codehaus.groovy.runtime
Class NumberAwareComparator<T>
- java.lang.Object
- 
- org.codehaus.groovy.runtime.NumberAwareComparator<T>
 
- 
- All Implemented Interfaces:
- Serializable,- Comparator<T>
 
 public class NumberAwareComparator<T> extends Object implements Comparator<T>, 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.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description NumberAwareComparator()NumberAwareComparator(boolean ignoreZeroSign)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(T o1, T o2)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.util.Comparatorequals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
 
- 
 
- 
- 
- 
Method Detail- 
comparepublic int compare(T o1, T o2) - Specified by:
- comparein interface- Comparator<T>
 
 
- 
 
-