public class ComparisonOperatorServiceImpl extends Object implements ComparisonOperatorService
ComparisonOperatorService
Implementation.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)
Does the service have an Extension that can compare the given objects?
|
Object |
coerce(String type,
String value)
Returns an Object of the given type populated with the given value.
|
int |
compare(Object lhs,
Object rhs)
Returns the int result of a compare between the lhs and rhs objects.
|
EngineComparatorExtension |
findComparatorExtension(Object lhs,
Object rhs)
Returns the
EngineComparatorExtension that can compare the lhs and rhs objects. |
StringCoercionExtension |
findStringCoercionExtension(String type,
String value)
Returns the
EngineComparatorExtension that can coerce the lhs and rhs objects. |
static ComparisonOperatorService |
getInstance()
Factory method for getting a
ComparisonOperatorService |
List<EngineComparatorExtension> |
getOperators()
The
List of EngineComparatorExtension s. |
List<StringCoercionExtension> |
getStringCoercionExtensions() |
void |
setOperators(List<EngineComparatorExtension> operators)
List
|
void |
setStringCoercionExtensions(List<StringCoercionExtension> stringCoercionExtensions)
The
List of StringCoercionExtension s. |
public static ComparisonOperatorService getInstance()
ComparisonOperatorService
ComparisonOperatorService
public List<StringCoercionExtension> getStringCoercionExtensions()
getStringCoercionExtensions
in interface ComparisonOperatorService
public void setStringCoercionExtensions(List<StringCoercionExtension> stringCoercionExtensions)
ComparisonOperatorService
List
of StringCoercionExtension
s.setStringCoercionExtensions
in interface ComparisonOperatorService
public List<EngineComparatorExtension> getOperators()
ComparisonOperatorService
List
of EngineComparatorExtension
s.getOperators
in interface ComparisonOperatorService
EngineComparatorExtension
s.public void setOperators(List<EngineComparatorExtension> operators)
ComparisonOperatorService
setOperators
in interface ComparisonOperatorService
public EngineComparatorExtension findComparatorExtension(Object lhs, Object rhs)
EngineComparatorExtension
that can compare the lhs and rhs objects. If none, then returns the
DefaultComparisonOperator
findComparatorExtension
in interface ComparisonOperatorService
lhs
- left hand side objectrhs
- right hand side objectpublic int compare(Object lhs, Object rhs)
ComparisonOperatorService
compare
in interface ComparisonOperatorService
lhs
- left hand side objectrhs
- right hand side objectpublic boolean canCompare(Object lhs, Object rhs)
ComparisonOperatorService
canCompare
in interface ComparisonOperatorService
lhs
- left hand side Objectrhs
- right hand side ObjectEngineComparatorExtension
can compare the lhs and rhs Objects.public StringCoercionExtension findStringCoercionExtension(String type, String value)
EngineComparatorExtension
that can coerce the lhs and rhs objects. If none, then returns the
DefaultComparisonOperator
, which also handles default coercionfindStringCoercionExtension
in interface ComparisonOperatorService
type
- class type to attempt to coerce tovalue
- value to attempt to coerce the given type withpublic boolean canCoerce(String type, String value)
StringCoercionExtension
canCoerce
in interface ComparisonOperatorService
canCoerce
in interface StringCoercionExtension
type
- of Object to coerce to.value
- value to use for coerced typepublic Object coerce(String type, String value)
StringCoercionExtension
coerce
in interface ComparisonOperatorService
coerce
in interface StringCoercionExtension
type
- to coerce Object tovalue
- to coerceCopyright © 2005–2016 The Kuali Foundation. All rights reserved.