Package org.apache.fop.util.text
Class ChoiceFieldPart
java.lang.Object
org.apache.fop.util.text.ChoiceFieldPart
- All Implemented Interfaces:
AdvancedMessageFormat.Part
Defines a "choice" field part that works like
ChoiceFormat.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFactory for ChoiceFieldPart. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChoiceFormatprivate Stringprivate static final Pattern -
Constructor Summary
ConstructorsConstructorDescriptionChoiceFieldPart(String fieldName, String choicesPattern) Creates a new choice part. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisGenerated(Map params) Indicates whether there is any content that is generated by this message part.toString()voidwrite(StringBuffer sb, Map params) Writes the formatted part to a string buffer.
-
Field Details
-
VARIABLE_REGEX
-
fieldName
-
choiceFormat
-
-
Constructor Details
-
ChoiceFieldPart
Creates a new choice part.- Parameters:
fieldName- the field name to work onchoicesPattern- the choices pattern (as used byChoiceFormat)
-
-
Method Details
-
isGenerated
Indicates whether there is any content that is generated by this message part.- Specified by:
isGeneratedin interfaceAdvancedMessageFormat.Part- Parameters:
params- the parameters to work with- Returns:
- true if the part has content
-
write
Writes the formatted part to a string buffer.- Specified by:
writein interfaceAdvancedMessageFormat.Part- Parameters:
sb- the target string bufferparams- the parameters to work with
-
toString
-