Class LengthExpression<T,​R>

  • Type Parameters:
    T - Input parameter type
    R - Return parameter type
    All Implemented Interfaces:
    java.util.function.Function<T,​java.lang.Integer>, Expression<T,​java.lang.Integer>, ExpressionNode<T,​java.lang.Integer>

    public class LengthExpression<T,​R>
    extends AbstractFunctionExpression<T,​java.lang.Integer>
    LENGTH takes a string parameter and returns its length. The implicit conversion to strings follows the existing rules for data type conversions. If any argument is NULL, LENGTH returns 0.
    • Constructor Detail

      • LengthExpression

        public LengthExpression​(java.lang.String alias,
                                java.util.List<ExpressionNode<T,​?>> args)
        Constructor initializes children expression list
        Parameters:
        alias - Expression alias
        args - List of children expressions
    • Method Detail

      • apply

        public java.lang.Integer apply​(T value)
        Performs length operation using parameters and the value supplied
        Parameters:
        value - Object to handle
        Returns:
        Resulting string