Groovy Documentation

## org.codehaus.groovy.runtime
[Java] Class NumberAwareComparator

    java.lang.Object
      org.codehaus.groovy.runtime.NumberAwareComparator

All Implemented Interfaces:
  java.util.Comparator

    public class NumberAwareComparator
    extends java.lang.Object

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.

Method Summary
`int` | `compare(java.lang.Object o1, java.lang.Object o2)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Method Detail

### compare

    public int compare(java.lang.Object o1, java.lang.Object o2)

Groovy Documentation