Class IsBlankUtilFunction

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

public class IsBlankUtilFunction extends UtilFunction implements ContextualUtilFunction
This class represents a utility function for checking a value from the Higson context is blank.

This class provides a call method that takes in a HigsonContext and an array of arguments.

  • Field Details

  • Constructor Details

    • IsBlankUtilFunction

      public IsBlankUtilFunction()
  • Method Details

    • call

      public Object call(HigsonContext ctx, Object[] args)
      This method checks if a value from the Higson context is blank.
      This method considers an object blank if it meets one of the following conditions:
      • It is null
      • It is the string "undefined" (specific to the Rhino JavaScript engine)
      • It is an instance of ParamValue and its isBlank method returns true
      • It is an instance of RhinoParamValue and its isBlank method returns true
      • It is an instance of MultiValue and its isBlank method returns true
      • It is an instance of ValueHolder and its isBlank method returns true
      • It is an instance of Collection and it is empty or all its elements are blank
      • It is an array and all its elements are blank
      • It is an instance of Map and all its values are blank
      • It is a CharSequence (like String, StringBuffer, etc.) and is blank according to the StrUtil.isBlank method
      • It is an instance of Iterable and it is empty or all its elements are blank
      Specified by:
      call in class UtilFunction
      Returns:
      true if the object is blank, false otherwise