io.honeybadger.com.github.mustachejava.codes.NotIterableCode Maven / Gradle / Ivy
package com.github.mustachejava.codes;
import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.Mustache;
import com.github.mustachejava.TemplateContext;
import java.io.Writer;
import java.util.List;
import java.util.concurrent.Callable;
/**
* Runs the enclosed template once if the value is falsey.
*/
public class NotIterableCode extends IterableCode {
public NotIterableCode(TemplateContext templateContext, DefaultMustacheFactory df, Mustache mustache, String variable) {
super(templateContext, df, mustache, variable, "^");
}
@Override
public Writer execute(Writer writer, final List