Class DefaultFunctionFactory.NumberFormatFunction

All Implemented Interfaces:
Function
Enclosing class:
DefaultFunctionFactory

public static class DefaultFunctionFactory.NumberFormatFunction extends AbstractFunction
  • Constructor Details

    • NumberFormatFunction

      public NumberFormatFunction()
  • Method Details

    • connect

      public void connect(CommonContext context, InteractionListener updateListener)
      This is to help the function listen for Locale changes broadcast by the EventBus.
      Specified by:
      connect in interface Function
      Overrides:
      connect in class BaseFunction
      Parameters:
      context - the CommonContext used to look up external resources
      updateListener - the InteractionListener to notify when the function value changes
    • startup

      public void startup()
      Description copied from class: BaseFunction
      Empty implementation from BaseFunction. Override if necessary.
      Specified by:
      startup in interface Function
      Overrides:
      startup in class BaseFunction
    • shutdown

      public void shutdown()
      Description copied from class: BaseFunction
      Empty implementation from BaseFunction. Override if necessary.
      Specified by:
      shutdown in interface Function
      Overrides:
      shutdown in class BaseFunction
    • disconnect

      public void disconnect()
      This is to help the function listen for Locale changes broadcast by the EventBus.
      Specified by:
      disconnect in interface Function
      Overrides:
      disconnect in class BaseFunction
    • onLocaleChange

      public void onLocaleChange(LocaleChangeEvent ignored)
    • getFunctionDisplayName

      protected String getFunctionDisplayName()
      Specified by:
      getFunctionDisplayName in class AbstractFunction
    • copy

      public Function copy()
      Description copied from class: BaseFunction
      Returns this. Override to create a clone if you need a unique function object per Expression.
      Specified by:
      copy in interface Function
      Overrides:
      copy in class BaseFunction
      Returns:
      a copy of this function
    • execute

      public QualifiedValue execute(Expression[] args) throws ExpressionException
      Description copied from interface: Function
      Execute this function, and return the function's qualified value.
      Parameters:
      args - the arguments for the function
      Returns:
      the result of the function evaluation as a QualifiedValue
      Throws:
      ExpressionException - if an error occurs during execution
    • getArgDocString

      public String getArgDocString()
      Description copied from interface: Function
      Returns a string to be used in the auto-generated function documentation. The string should represent the arguments for the function, such as "string, count" for the "repeat" function.
      Returns:
      the argument documentation string
    • getType

      public Class<?> getType()
      Description copied from interface: Function
      Returns the type that this function will return upon execution
    • validateNumArgs

      protected boolean validateNumArgs(int num)
      Overrides:
      validateNumArgs in class AbstractFunction