Class UniqueLambda

  • All Implemented Interfaces:
    com.samskivert.mustache.Mustache.Lambda

    public class UniqueLambda
    extends Object
    implements com.samskivert.mustache.Mustache.Lambda
    Split text by the delimiter and then write only the unique entries

    Register:

     additionalProperties.put("unique", new UniqueLambda());
     

    Use:

     {{#unique}}{{name}}{{/unique}}
     
    • Constructor Detail

      • UniqueLambda

        public UniqueLambda​(String delimiter,
                            boolean withNewLine)
    • Method Detail

      • execute

        public void execute​(com.samskivert.mustache.Template.Fragment fragment,
                            Writer writer)
                     throws IOException
        Specified by:
        execute in interface com.samskivert.mustache.Mustache.Lambda
        Throws:
        IOException