public class IfFieldPart extends Object implements AdvancedMessageFormat.Part
{field,if,Yes,No}| Modifier and Type | Class and Description |
|---|---|
static class |
IfFieldPart.Factory
Part factory for "if".
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
elseValue
the value being returned if the field is false
|
protected String |
fieldName
the field name for the part
|
protected String |
ifValue
the value being returned if the field is true
|
| Constructor and Description |
|---|
IfFieldPart(String fieldName,
String values)
Creates a new "if" field part.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isGenerated(Map params) |
protected boolean |
isTrue(Map params)
Indicates whether the field's value is true.
|
protected void |
parseValues(String values)
Parses the parameter values
|
String |
toString() |
void |
write(StringBuffer sb,
Map params) |
protected String fieldName
protected String ifValue
protected String elseValue
protected void parseValues(String values)
values - the unparsed parameter valuespublic void write(StringBuffer sb, Map params)
write in interface AdvancedMessageFormat.Partprotected boolean isTrue(Map params)
params - the message parameterspublic boolean isGenerated(Map params)
isGenerated in interface AdvancedMessageFormat.PartCopyright © 2025 Apache Software Foundation. All rights reserved.