Class AbstractFunction

    • Constructor Detail

      • AbstractFunction

        protected AbstractFunction​(CharSequence functionName)
        Construct.
        Parameters:
        functionName - The function name of this IFunction implementation
      • AbstractFunction

        protected AbstractFunction​(CharSequence functionName,
                                   List<CharSequence> parameters)
        Construct.
        Parameters:
        functionName - The function name of this IFunction implementation
    • Method Detail

      • build

        public String build()
        Specified by:
        build in interface IFunction
        Returns:
        the function as javascript string.
      • getSeparator

        protected final char getSeparator()
        Returns:
        the separator
      • buildParameters

        protected String buildParameters()
        Returns:
        a joined list of parameters as string
      • addParameter

        protected void addParameter​(CharSequence parameter)
        adds a new parameter to parameter list
        Parameters:
        parameter - The parameter to add
      • toParameterValue

        protected CharSequence toParameterValue​(Object value)
        transform given value to a javascript parameter value
        Parameters:
        value - The value to transform
        Returns:
        value as string
      • toParameterValue

        protected CharSequence toParameterValue​(JavaScriptInlineFunction value)
        transform given value to a javascript parameter value
        Parameters:
        value - The value to transform
        Returns:
        value as string
      • toParameterValue

        protected CharSequence toParameterValue​(Long value)
        transform given value to a javascript parameter value
        Parameters:
        value - The value to transform
        Returns:
        value as string
      • toParameterValue

        protected CharSequence toParameterValue​(Integer value)
        transform given value to a javascript parameter value
        Parameters:
        value - The value to transform
        Returns:
        value as string
      • toParameterValue

        protected CharSequence toParameterValue​(Float value)
        transform given value to a javascript parameter value
        Parameters:
        value - The value to transform
        Returns:
        value as string
      • toParameterValue

        protected CharSequence toParameterValue​(Boolean value)
        transform given value to a javascript parameter value
        Parameters:
        value - The value to transform
        Returns:
        value as string