Class FormatUtilFunction

java.lang.Object
io.higson.runtime.builtin.implementation.UtilFunction
io.higson.runtime.builtin.implementation.FormatUtilFunction
All Implemented Interfaces:
ContextualUtilFunction

public class FormatUtilFunction extends UtilFunction implements ContextualUtilFunction
The FormatUtilFunction class provides formatting functionality for different types of objects. It extends the UtilFunction class and implements the ContextualUtilFunction interface.
  • Field Details

  • Constructor Details

    • FormatUtilFunction

      public FormatUtilFunction()
  • Method Details

    • call

      public Object call(HigsonContext ctx, Object[] args)
      Calls the format utility function with the given arguments.
      Specified by:
      call in class UtilFunction
      Parameters:
      ctx - The HigsonContext object.
      args - An array of arguments passed to the format utility function.
      Returns:
      The formatted output based on the type of the object retrieved from the context.
      Throws:
      HigsonRuntimeException - If the format utility function is missing the format argument or if the type is unsupported.