public class

StandardTypeComparator

extends Object
implements TypeComparator
java.lang.Object
   ↳ org.springframework.expression.spel.support.StandardTypeComparator

Class Overview

A simple basic TypeComparator implementation. It supports comparison of numbers and types implementing Comparable.

Summary

Public Constructors
StandardTypeComparator()
Public Methods
boolean canCompare(Object left, Object right)
Return true if the comparator can compare these two objects
int compare(Object left, Object right)
Compare two objects.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.expression.TypeComparator

Public Constructors

public StandardTypeComparator ()

Public Methods

public boolean canCompare (Object left, Object right)

Return true if the comparator can compare these two objects

Parameters
left the first object
right the second object
Returns
  • true if the comparator can compare these objects

public int compare (Object left, Object right)

Compare two objects.

Parameters
left the first object
right 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