Class Options.Builder

  • Enclosing class:
    Options

    public static class Options.Builder
    extends java.lang.Object
    An Options builder.
    Since:
    0.9.0
    • Constructor Detail

      • Builder

        public Builder​(Handlebars handlebars,
                       java.lang.String helperName,
                       TagType tagType,
                       Context context,
                       Template fn)
        Creates a new Options.Builder.
        Parameters:
        handlebars - A handlebars object. Required.
        helperName - The name of the helper. Required.
        tagType - The TagType from where the helper was called.
        context - A context object. Required.
        fn - A template object. Required.
    • Method Detail

      • setHash

        public Options.Builder setHash​(java.util.Map<java.lang.String,​java.lang.Object> hash)
        Set the options hash.
        Parameters:
        hash - A hash table. Required.
        Returns:
        This builder.
      • setBlockParams

        public Options.Builder setBlockParams​(java.util.List<java.lang.String> blockParams)
        Set the options block params.
        Parameters:
        blockParams - A block params. Required.
        Returns:
        This builder.
      • setInverse

        public Options.Builder setInverse​(Template inverse)
        Set the inverse template.
        Parameters:
        inverse - Inverse template. Required.
        Returns:
        This builder.
      • setParams

        public Options.Builder setParams​(java.lang.Object[] params)
        Set the options parameters.
        Parameters:
        params - A parameters list. Required.
        Returns:
        This builder.
      • setWriter

        public Options.Builder setWriter​(java.io.Writer writer)
        Set a writer, useful to improve performance.
        Parameters:
        writer - A writer. Required.
        Returns:
        This builder.