Class UnlessHelper

  • All Implemented Interfaces:
    Helper<Object>

    public class UnlessHelper
    extends Object
    implements Helper<Object>
    You can use the unless helper as the inverse of the if helper. Its block will be rendered if the expression returns a falsy value.
    Since:
    0.3.0
    • Constructor Detail

      • UnlessHelper

        public UnlessHelper()
    • Method Detail

      • apply

        public CharSequence apply​(Object context,
                                  Options options)
                           throws IOException
        Description copied from interface: Helper
        Apply the helper to the context.
        Specified by:
        apply in interface Helper<Object>
        Parameters:
        context - The context object.
        options - The options object.
        Returns:
        A string result.
        Throws:
        IOException - If a template cannot be loaded.