public final class TemplateModelUtils
extends java.lang.Object
TemplateModel-s that didn't fit elsewhere.| Modifier and Type | Method and Description |
|---|---|
static TemplateHashModelEx2.KeyValuePairIterator |
getKeyValuePairIterator(TemplateHashModelEx hash)
TemplateHashModelExKeyValuePairIterator that even works for a non-TemplateHashModelEx2
TemplateHashModelEx. |
public static final TemplateHashModelEx2.KeyValuePairIterator getKeyValuePairIterator(TemplateHashModelEx hash) throws TemplateModelException
TemplateHashModelExKeyValuePairIterator that even works for a non-TemplateHashModelEx2
TemplateHashModelEx. This is used to simplify code that needs to iterate through the key-value pairs of
TemplateHashModelEx-s, as with this you don't have to handle non-TemplateHashModelEx2-s
separately. For non-TemplateHashModelEx2 values the iteration will throw TemplateModelException
if it reaches a key that's not a string (TemplateScalarModel).TemplateModelException