Class SubstringExpression<T,​R>

  • Type Parameters:
    T - Input parameter type
    R - Return parameter type
    All Implemented Interfaces:
    Function<T,​String>, Expression<T,​String>, ExpressionNode<T,​String>

    public class SubstringExpression<T,​R>
    extends AbstractFunctionExpression<T,​String>
    SUBSTRING takes a source parameter, a start index parameter and optional length parameter. Returns substring of a source string from the start index to the end or using the length parameter. If source string is NULL, return NULL. If start index is negative, function extracts from the end of the string.
    • Constructor Detail

      • SubstringExpression

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

      • apply

        public String apply​(T value)
        Performs substring operation using parameters and the value supplied
        Parameters:
        value - Object to handle
        Returns:
        Resulting string