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

## org.springframework.expression
Interface TypeComparator

All Known Implementing Classes:
  StandardTypeComparator

    public interface TypeComparator

Instances of a type comparator should be able to compare pairs of objects for equality, the specification of the return value is the same as for `Comparable`.

Since:
  3.0
Author:
  Andy Clement

Method Summary
`boolean` | `canCompare(Object firstObject, Object secondObject)` Return true if the comparator can compare these two objects
`int` | `compare(Object firstObject, Object secondObject)` Compare two objects.

Method Detail

### compare

    int compare(Object firstObject,
                Object secondObject)
                throws EvaluationException

  Compare two objects.

  Parameters:
    `firstObject` - the first object
    `secondObject` - the second object
  Returns:
    0 if they are equal, <0 if the first is smaller than the second, or >0 if the first is larger than the second
  Throws:
    `EvaluationException` - if a problem occurs during comparison (or they are not comparable)

### canCompare

    boolean canCompare(Object firstObject,
                       Object secondObject)

  Return true if the comparator can compare these two objects

  Parameters:
    `firstObject` - the first object
    `secondObject` - the second object
  Returns:
    true if the comparator can compare these objects

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