public class TextFormatExpression extends AbstractExpression
pattern
property is explained in the class MessageFormat
.
Example:
TheInvoice for your order from {0, date, EEE, MMM d, yyyy} printdate
MessageFormatExpression
allows to specify
named field-references in the pattern, which greatly simplifies the pattern-definition.Constructor and Description |
---|
TextFormatExpression()
Deprecated.
Default constructor, creates a new unnamed TextFormatExpression.
|
Modifier and Type | Method and Description |
---|---|
String |
getEncoding()
Deprecated.
Returns the defined character encoding that is used to transform the Java-Unicode strings into bytes.
|
String[] |
getField()
Deprecated.
Returns all defined fields as array of strings.
|
String |
getField(int index)
Deprecated.
Returns the defined field at the given index-position.
|
int |
getFieldCount()
Deprecated.
Returns the number of fields defined in this expression.
|
Expression |
getInstance()
Deprecated.
Return a completly separated copy of this function.
|
String |
getPattern()
Deprecated.
Returns the pattern defined for this expression.
|
Object |
getValue()
Deprecated.
Evaluates the expression by collecting all values defined in the fieldlist from the datarow.
|
boolean |
isUrlEncodeResult()
Deprecated.
Queries, whether the formatted result-string will be URL encoded.
|
boolean |
isUrlEncodeValues()
Deprecated.
Queries, whether the values read from the data-row should be URL encoded.
|
void |
setEncoding(String encoding)
Deprecated.
Defines the character encoding that is used to transform the Java-Unicode strings into bytes.
|
void |
setField(int index,
String field)
Deprecated.
Defines the field in the field-list at the given index.
|
void |
setField(String[] fields)
Deprecated.
Defines all fields as array.
|
void |
setPattern(String pattern)
Deprecated.
Defines the pattern for this expression.
|
void |
setUrlEncodeResult(boolean urlEncodeResult)
Deprecated.
Defines, whether the formatted result-string will be URL encoded.
|
void |
setUrlEncodeValues(boolean urlEncode)
Deprecated.
Defines, whether the values read from the data-row should be URL encoded.
|
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
public TextFormatExpression()
public String getEncoding()
public void setEncoding(String encoding)
encoding
- the encoding.public void setUrlEncodeValues(boolean urlEncode)
urlEncode
- true, if the values from the data-row should be URL encoded before they are passed to the MessageFormat,
false otherwise.public boolean isUrlEncodeValues()
public boolean isUrlEncodeResult()
public void setUrlEncodeResult(boolean urlEncodeResult)
urlEncodeResult
- true, if the formatted result will be encoded, false otherwise.public Object getValue()
public String getPattern()
public void setPattern(String pattern)
pattern
- the pattern stringpublic Expression getInstance()
getInstance
in interface Expression
getInstance
in class AbstractExpression
public void setField(int index, String field)
index
- the position in the list, where the field should be defined.field
- the name of the field.public String getField(int index)
index
- the position of the field name that should be queried.public int getFieldCount()
public String[] getField()
public void setField(String[] fields)
fields
- the new list of fields.