Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.runtime
Class NumberAwareComparator<T>

    java.lang.Object
      org.codehaus.groovy.runtime.NumberAwareComparator<T>

All Implemented Interfaces:
  Comparator<T>

    public class NumberAwareComparator<T>
    extends Object
    implements 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.

Constructor Summary
Constructor and Description
`NumberAwareComparator()`

Method Summary
Modifier and Type | Method and Description
--- | ---
`int` | `compare(T o1, T o2)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Comparator
`equals`

Constructor Detail

### NumberAwareComparator

    public NumberAwareComparator()

Method Detail

### compare

    public int compare(T o1,
                       T o2)

  Specified by:
    `compare` in interface `Comparator<T>`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2003-2010 The Codehaus. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD