public class NullCheckHelper extends BasicSectionHelper
{{#isNull item.price}}
It's null!
{{/isNull}}
Multiple params may be evaluated. The default evaluation logic is conjunction:
{{#isNull item.active item.valid}}
All are null.
{{/isNull}}
The evaluation logic may be specified:
{{#isNull item.active item.valid logic="or"}}
At least one is null.
{{/isNull}}
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MatchingSectionHelper.EvaluationLogic |
SECTION_TYPESHELPER_TAG_TYPESconfiguration| Constructor and Description |
|---|
NullCheckHelper()
Test null.
|
NullCheckHelper(boolean testNotNull) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Options options)
Execute the helper.
|
protected MatchingSectionHelper.EvaluationLogic |
getDefaultLogic() |
protected Set<String> |
getSupportedHashKeys() |
protected boolean |
hasEmptyParamsSupport() |
protected boolean |
isMatching(Object value) |
protected boolean |
isMatching(Object value,
Options options) |
protected int |
numberOfRequiredParameters() |
allowedTagTypesgetRequiredHashKeys, numberOfRequiredHashEntries, validateappend, convertAndAppend, convertValue, init, isSection, isUnescapeVariable, isVariablecheckNotInitialized, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigurationKeys, initpublic NullCheckHelper()
public NullCheckHelper(boolean testNotNull)
testNotNull - protected boolean isMatching(Object value)
public void execute(Options options)
Helperprotected Set<String> getSupportedHashKeys()
getSupportedHashKeys in class BasicHelper* to
allow any hash keysprotected MatchingSectionHelper.EvaluationLogic getDefaultLogic()
protected boolean hasEmptyParamsSupport()
protected int numberOfRequiredParameters()
numberOfRequiredParameters in class BasicHelperCopyright © 2017. All rights reserved.