Class ConditionalFunctions.NotEmpty

java.lang.Object
org.apache.juneau.commons.svl.TypedFunction
org.apache.juneau.commons.svl.functions.ConditionalFunctions.NotEmpty
All Implemented Interfaces:
VarFunction
Enclosing class:
ConditionalFunctions

public static class ConditionalFunctions.NotEmpty extends TypedFunction
#{notEmpty(s)} — replacement for the legacy $NE{...}.

Returns "true" if s is non-null and non-empty, "false" otherwise. Whitespace-only strings count as non-empty (matches String.isEmpty()).

  • Constructor Details

  • Method Details

    • name

      public String name()
      Description copied from interface: VarFunction
      The function's invocation name as it appears between #{} and the opening parenthesis in the template. Must consist of ASCII letters, digits, and underscores; must begin with a letter.
      Returns:
      The invocation name. Never null or empty.
    • invoke

      public String invoke(String s)