public enum ConditionalHelpers extends java.lang.Enum<ConditionalHelpers> implements Helper<java.lang.Object>
| Enum Constant and Description |
|---|
and
And operator.
|
eq
Test if two elements are equals.
|
gt
Greater operator (arguments must be
Comparable elements. |
gte
Greater or equal operator (arguments must be
Comparable elements. |
lt
Less than operator (arguments must be
Comparable elements. |
lte
Less or equal operator (arguments must be
Comparable elements. |
neq
Test if two elements are NOT equals.
|
not
Not operator.
|
or
Or operator.
|
| Modifier and Type | Method and Description |
|---|---|
static ConditionalHelpers |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ConditionalHelpers[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConditionalHelpers eq
{{#eq a b}}
yes
{{else}}
no
{{/eq}}
Render 'true' or 'false':
{{eq a b}}
Render 'y' or 'n':
{{eq a b yes='y' no='n'}}
public static final ConditionalHelpers neq
{{#neq a b}}
yes
{{else}}
no
{{/neq}}
Render 'true' or 'false':
{{neq a b}}
Render 'y' or 'n':
{{neq a b yes='y' no='n'}}
public static final ConditionalHelpers gt
Comparable elements. Usage:
Render 'yes' or 'no':
{{#gt a b}}
yes
{{else}}
no
{{/gt}}
Render 'true' or 'false':
{{gt a b}}
Render 'y' or 'n':
{{neq a b yes='y' no='n'}}
public static final ConditionalHelpers gte
Comparable elements. Usage:
Render 'yes' or 'no':
{{#gte a b}}
yes
{{else}}
no
{{/gte}}
Render 'true' or 'false':
{{gte a b}}
Render 'y' or 'n':
{{gte a b yes='y' no='n'}}
public static final ConditionalHelpers lt
Comparable elements. Usage:
Render 'yes' or 'no':
{{#lt a b}}
yes
{{else}}
no
{{/lt}}
Render 'true' or 'false':
{{lt a b}}
Render 'y' or 'n':
{{lt a b yes='y' no='n'}}
public static final ConditionalHelpers lte
Comparable elements. Usage:
Render 'yes' or 'no':
{{#lte a b}}
yes
{{else}}
no
{{/lte}}
Render 'true' or 'false':
{{lte a b}}
Render 'y' or 'n':
{{lte a b yes='y' no='n'}}
public static final ConditionalHelpers and
Handlebars.Utils#isEmpty(Object), so this
helper can be used with non-boolean values.
Usage:
Render 'yes' or 'no':
{{#and a b}}
yes
{{else}}
no
{{/and}}
Multiple arguments are supported too:
{{#and a b c d}}
yes
{{else}}
no
{{/and}}
Render 'true' or 'false':
{{and a b}}
Render 'y' or 'n':
{{and a b yes='y' no='n'}}
public static final ConditionalHelpers or
Handlebars.Utils#isEmpty(Object), so this
helper can be used with non-boolean values.
Usage:
Render 'yes' or 'no':
{{#or a b}}
yes
{{else}}
no
{{/or}}
Multiple arguments are supported too:
{{#or a b c d}}
yes
{{else}}
no
{{/or}}
Render 'true' or 'false':
{{or a b}}
Render 'y' or 'n':
{{or a b yes='y' no='n'}}
public static final ConditionalHelpers not
Handlebars.Utils#isEmpty(Object), so this
helper can be used with non-boolean values.
Usage:
Render 'yes' or 'no':
{{#not a}}
yes
{{else}}
no
{{/not}}
Render 'true' or 'false':
{{not a}}
Render 'y' or 'n':
{{not a yes='y' no='n'}}
public static ConditionalHelpers[] values()
for (ConditionalHelpers c : ConditionalHelpers.values()) System.out.println(c);
public static ConditionalHelpers valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullCopyright © 2010 - 2023 Adobe. All Rights Reserved