Package org.apache.fop.util.text
Class EqualsFieldPart
java.lang.Object
org.apache.fop.util.text.IfFieldPart
org.apache.fop.util.text.EqualsFieldPart
- All Implemented Interfaces:
org.apache.fop.util.text.AdvancedMessageFormat.Part
Defines an "equals" field part that can compare a field's string value against another string.
It returns either of two possible values attached as additional part parameters. Example:
{field,equals,new,This is new!,This is old!}
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.fop.util.text.IfFieldPart
elseValue, fieldName, ifValue
-
Constructor Summary
ConstructorDescriptionEqualsFieldPart
(String fieldName, String values) Creates a new "equals" field part. -
Method Summary
Methods inherited from class org.apache.fop.util.text.IfFieldPart
isGenerated, write
-
Constructor Details
-
EqualsFieldPart
Creates a new "equals" field part.- Parameters:
fieldName
- the field namevalues
- the unparsed parameter values
-
-
Method Details
-
parseValues
Parses the parameter values- Overrides:
parseValues
in classIfFieldPart
- Parameters:
values
- the unparsed parameter values
-
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.- Overrides:
isTrue
in classIfFieldPart
- Parameters:
params
- the message parameters- Returns:
- true the field's value as boolean
-
toString
- Overrides:
toString
in classIfFieldPart
-