Class ComparisonOperatorServiceUtils
java.lang.Object
org.kuali.rice.krms.framework.engine.expression.ComparisonOperatorServiceUtils
Contains utility methods for working with the ComparisonOperatorService
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectcoerceIfNeeded(Object value, String expectedType, ComparisonOperatorService comparisonOperatorService) checks if the value needs to be coerced from a String to another type, and if so it looks for an applicable StringCoercionExtension.
-
Method Details
-
coerceIfNeeded
public static Object coerceIfNeeded(Object value, String expectedType, ComparisonOperatorService comparisonOperatorService) checks if the value needs to be coerced from a String to another type, and if so it looks for an applicable StringCoercionExtension.
- Parameters:
value- the value of the argument that may or may not need coercionexpectedType- the name of the type that the function is expecting for the argumentcomparisonOperatorService- the ComparisonOperatorService instance to use (if needed) for finding a StringCoercionExtension- Returns:
- the coerced value, or the unchanged value if (1) no coercion needs to be done or (2) an applicable StringCoercionExtension can't be found.
-