Package com.github.mustachejava.codes
Class NotIterableCode
- java.lang.Object
-
- com.github.mustachejava.codes.DefaultCode
-
- com.github.mustachejava.codes.IterableCode
-
- com.github.mustachejava.codes.NotIterableCode
-
public class NotIterableCode extends IterableCode
Runs the enclosed template once if the value is falsey.
-
-
Field Summary
-
Fields inherited from class com.github.mustachejava.codes.DefaultCode
appended, binding, df, mustache, name, oh, returnThis, tc, type
-
-
Constructor Summary
Constructors Constructor Description NotIterableCode(TemplateContext templateContext, DefaultMustacheFactory df, Mustache mustache, java.lang.String variable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.Writerexecute(java.io.Writer writer, java.lang.Object resolve, java.util.List<java.lang.Object> scopes)protected java.io.Writerhandle(java.io.Writer writer, java.lang.Object resolved, java.util.List<java.lang.Object> scopes)java.io.Writernext(java.io.Writer writer, java.lang.Object object, java.util.List<java.lang.Object> scopes)-
Methods inherited from class com.github.mustachejava.codes.IterableCode
execute, handleCallable, handleFunction, invert, writeTemplate
-
Methods inherited from class com.github.mustachejava.codes.DefaultCode
addScope, append, appendText, clone, clone, filterText, get, getCodes, getName, identity, init, matchAppended, run, runIdentity, setCodes, tag
-
-
-
-
Constructor Detail
-
NotIterableCode
public NotIterableCode(TemplateContext templateContext, DefaultMustacheFactory df, Mustache mustache, java.lang.String variable)
-
-
Method Detail
-
handle
protected java.io.Writer handle(java.io.Writer writer, java.lang.Object resolved, java.util.List<java.lang.Object> scopes)- Overrides:
handlein classIterableCode
-
execute
protected java.io.Writer execute(java.io.Writer writer, java.lang.Object resolve, java.util.List<java.lang.Object> scopes)- Overrides:
executein classIterableCode
-
next
public java.io.Writer next(java.io.Writer writer, java.lang.Object object, java.util.List<java.lang.Object> scopes)- Specified by:
nextin interfaceIteration- Overrides:
nextin classIterableCode
-
-