public class TemplateFormatter
extends java.lang.Object
implements java.io.Serializable
The methods in this class are accessible from within a template via the
$fmt
variable.
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
Constructor and Description |
---|
TemplateFormatter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
currencyInput(java.math.BigDecimal value)
Returns a formatted currency input string.
|
static java.lang.String |
currencyInput(double value)
Returns a formatted currency input string.
|
static java.lang.String |
currencyInput0(java.math.BigDecimal value)
Returns a formatted currency input string.
|
static java.lang.String |
currencyInput0(double value)
Returns a formatted currency input string.
|
static java.lang.String |
currencyOutput(java.math.BigDecimal value)
Returns a formatted currency output string.
|
static java.lang.String |
currencyOutput(double value)
Returns a formatted currency output string.
|
static java.lang.String |
currencyOutput0(java.math.BigDecimal value)
Returns a formatted currency output string.
|
static java.lang.String |
currencyOutput0(double value)
Returns a formatted currency output string.
|
static java.lang.String |
dateInput(java.util.Date value)
Returns a formatted date input string.
|
static java.lang.String |
dateInput(long value)
Returns a formatted date input string.
|
static java.lang.String |
dateInput(TemplateDate value)
Returns a formatted date input string.
|
static java.lang.String |
dateOutput(java.util.Date value)
Returns a formatted date output string.
|
static java.lang.String |
dateOutput(long value)
Returns a formatted date output string.
|
static java.lang.String |
dateOutput(TemplateDate value)
Returns a formatted date output string.
|
static java.lang.String |
datetimeOutput(java.util.Date value)
Returns a formatted date and time output string.
|
static java.lang.String |
datetimeOutput(long value)
Returns a formatted date and time output string.
|
static java.lang.String |
datetimeOutput(TemplateDate value)
Returns a formatted date and time output string.
|
static java.lang.String |
numberInput(java.math.BigDecimal value)
Returns a formatted number input string.
|
static java.lang.String |
numberInput(double value)
Returns a formatted number input string.
|
static java.lang.String |
numberInput(long value)
Returns a formatted number input string.
|
static java.lang.String |
numberInput0(java.math.BigDecimal value)
Returns a formatted number input string.
|
static java.lang.String |
numberInput0(double value)
Returns a formatted number input string.
|
static java.lang.String |
numberInput0(long value)
Returns a formatted number input string.
|
static java.lang.String |
numberOutput(java.math.BigDecimal value)
Returns a formatted number output string.
|
static java.lang.String |
numberOutput(double value)
Returns a formatted number output string.
|
static java.lang.String |
numberOutput(long value)
Returns a formatted number output string.
|
static java.lang.String |
numberOutput0(java.math.BigDecimal value)
Returns a formatted number output string.
|
static java.lang.String |
numberOutput0(double value)
Returns a formatted number output string.
|
static java.lang.String |
numberOutput0(long value)
Returns a formatted number output string.
|
static java.lang.String |
timeInput(java.util.Date value)
Returns a formatted time input string.
|
static java.lang.String |
timeInput(long value)
Returns a formatted time input string.
|
static java.lang.String |
timeInput(TemplateDate value)
Returns a formatted time input string.
|
static java.lang.String |
timeOutput(java.util.Date value)
Returns a formatted time output string.
|
static java.lang.String |
timeOutput(long value)
Returns a formatted time output string.
|
static java.lang.String |
timeOutput(TemplateDate value)
Returns a formatted time output string.
|
static java.lang.String |
toYesNo(boolean value)
Returns a string of "Yes" or "No" corresponding to the true (yes)
or false (no) value of the given boolean parameter.
|
private static final long serialVersionUID
public static java.lang.String currencyInput(java.math.BigDecimal value)
value
- (BigDecimal) The value to format.public static java.lang.String currencyInput0(java.math.BigDecimal value)
value
- (BigDecimal) The value to format.public static java.lang.String currencyInput(double value)
value
- (double) The value to format.public static java.lang.String currencyInput0(double value)
value
- (double) The value to format.public static java.lang.String currencyOutput(java.math.BigDecimal value)
value
- (BigDecimal) The value to format.public static java.lang.String currencyOutput0(java.math.BigDecimal value)
value
- (BigDecimal) The value to format.public static java.lang.String currencyOutput(double value)
value
- (double) The value to format.public static java.lang.String currencyOutput0(double value)
value
- (double) The value to format.public static java.lang.String dateInput(java.util.Date value)
value
- (Date) The value to format.public static java.lang.String dateInput(long value)
value
- (long) The value to format (milliseconds).public static java.lang.String dateInput(TemplateDate value)
value
- (TemplateDate) The value to format.public static java.lang.String dateOutput(java.util.Date value)
value
- (Date) The value to format.public static java.lang.String dateOutput(long value)
value
- (long) The value to format (milliseconds).public static java.lang.String dateOutput(TemplateDate value)
value
- (TemplateDate) The value to format.public static java.lang.String datetimeOutput(java.util.Date value)
value
- (Date) The value to format.public static java.lang.String datetimeOutput(long value)
value
- (long) The value to format (milliseconds).public static java.lang.String datetimeOutput(TemplateDate value)
value
- (TemplateDate) The value to format.public static java.lang.String numberInput(java.math.BigDecimal value)
value
- (BigDecimal) The value to format.public static java.lang.String numberInput0(java.math.BigDecimal value)
value
- (BigDecimal) The value to format.public static java.lang.String numberInput(double value)
value
- (double) The value to format.public static java.lang.String numberInput0(double value)
value
- (double) The value to format.public static java.lang.String numberInput(long value)
value
- (long) The value to format.public static java.lang.String numberInput0(long value)
value
- (long) The value to format.public static java.lang.String numberOutput(java.math.BigDecimal value)
value
- (BigDecimal) The value to format.public static java.lang.String numberOutput0(java.math.BigDecimal value)
value
- (BigDecimal) The value to format.public static java.lang.String numberOutput(double value)
value
- (double) The value to format.public static java.lang.String numberOutput0(double value)
value
- (double) The value to format.public static java.lang.String numberOutput(long value)
value
- (long) The value to format.public static java.lang.String numberOutput0(long value)
value
- (long) The value to format.public static java.lang.String timeInput(java.util.Date value)
value
- (Date) The value to format.public static java.lang.String timeInput(long value)
value
- (long) The value to format (milliseconds).public static java.lang.String timeInput(TemplateDate value)
value
- (TemplateDate) The value to format.public static java.lang.String timeOutput(java.util.Date value)
value
- (Date) The value to format.public static java.lang.String timeOutput(long value)
value
- (long) The value to format (milliseconds).public static java.lang.String timeOutput(TemplateDate value)
value
- (TemplateDate) The value to format.public static java.lang.String toYesNo(boolean value)
value
- (boolean) The boolean value.