Class SizeUtilFunction

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

public class SizeUtilFunction extends UtilFunction implements ContextualUtilFunction
Utility function class to retrieve the size of an object in the Higson context.
  • Field Details

  • Constructor Details

    • SizeUtilFunction

      public SizeUtilFunction()
  • Method Details

    • call

      public Object call(HigsonContext ctx, Object[] args)
      Retrieves the size of an object in the Higson context.
      Specified by:
      call in class UtilFunction
      Parameters:
      ctx - The Higson context to retrieve the object from.
      args - An array of arguments.
      Returns:
      The size of the object, or 0 if the object is null or the size is not supported.
      Throws:
      HigsonRuntimeException - If the object is of unsupported type.