public class StandardTypeComparator extends Object implements TypeComparator
TypeComparator
implementation: supports comparison of
Number
types as well as types implementing Comparable
.Constructor and Description |
---|
StandardTypeComparator() |
Modifier and Type | Method and Description |
---|---|
boolean |
canCompare(Object left,
Object right)
Return
true if the comparator can compare these two objects. |
int |
compare(Object left,
Object right)
Compare two given objects.
|
public boolean canCompare(@Nullable Object left, @Nullable Object right)
TypeComparator
true
if the comparator can compare these two objects.canCompare
in interface TypeComparator
left
- the first objectright
- the second objecttrue
if the comparator can compare these objectspublic int compare(@Nullable Object left, @Nullable Object right) throws SpelEvaluationException
TypeComparator
compare
in interface TypeComparator
left
- the first objectright
- the second objectSpelEvaluationException
Comparable.compareTo(T)