public class DefaultComparisonOperator extends Object implements EngineComparatorExtension, StringCoercionExtension
ComparisonOperator
. If no other EngineComparatorExtension
have been configured to handle
a type, the DefaultComparisonOperator will be used. At the moment the DefaultComparisonOperator is also the default
StringCoercionExtension
for coercing types.Constructor and Description |
---|
DefaultComparisonOperator() |
Modifier and Type | Method and Description |
---|---|
boolean |
canCoerce(String type,
String value)
Can this StringCoercionExtension coerce the given type and value into an Object?
|
boolean |
canCompare(Object lhs,
Object rhs) |
Object |
coerce(String type,
String value)
Returns an Object of the given type populated with the given value.
|
int |
compare(Object lhs,
Object rhs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public DefaultComparisonOperator()
public int compare(Object lhs, Object rhs)
compare
in interface Comparator
compare
in interface EngineComparatorExtension
public boolean canCompare(Object lhs, Object rhs)
canCompare
in interface EngineComparatorExtension
public Object coerce(String type, String value)
StringCoercionExtension
coerce
in interface StringCoercionExtension
type
- to coerce Object tovalue
- to coercepublic boolean canCoerce(String type, String value)
StringCoercionExtension
canCoerce
in interface StringCoercionExtension
type
- of Object to coerce to.value
- value to use for coerced typeCopyright © 2005–2016 The Kuali Foundation. All rights reserved.