Package org.apache.fop.util.text
Class IfFieldPart
java.lang.Object
org.apache.fop.util.text.IfFieldPart
- Direct Known Subclasses:
EqualsFieldPart
Defines an "if" field part that checks if field's value is true or false.
It returns either of two possible values attached as additional part parameters. Example:
{field,if,Yes,No}-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisGenerated(Map params) protected booleanIndicates whether the field's value is true.protected voidparseValues(String values) Parses the parameter valuestoString()voidwrite(StringBuffer sb, Map params)
-
Field Details
-
fieldName
the field name for the part -
ifValue
the value being returned if the field is true -
elseValue
the value being returned if the field is false
-
-
Constructor Details
-
IfFieldPart
Creates a new "if" field part.- Parameters:
fieldName- the field namevalues- the unparsed parameter values
-
-
Method Details
-
parseValues
Parses the parameter values- Parameters:
values- the unparsed parameter values
-
write
-
isTrue
Indicates whether the field's value is true. If the field is not a boolen, it is true if the field is not null.- Parameters:
params- the message parameters- Returns:
- true the field's value as boolean
-
isGenerated
-
toString
-