Class ComparisonOperatorServiceUtils

java.lang.Object
org.kuali.rice.krms.framework.engine.expression.ComparisonOperatorServiceUtils

public final class ComparisonOperatorServiceUtils extends Object
Contains utility methods for working with the ComparisonOperatorService
  • 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 coercion
      expectedType - the name of the type that the function is expecting for the argument
      comparisonOperatorService - 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.