|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.peaseplate.internal.transformer.FormatTransformers
public class FormatTransformers
Constructor Summary | |
---|---|
FormatTransformers()
|
Method Summary | |
---|---|
java.lang.String |
currency(RenderContext context,
java.lang.Number value)
Formats the value as currency using the NumberFormat
and the locale from the context |
java.lang.String |
date(RenderContext context,
java.util.Date value,
java.lang.String pattern)
Formats the date using the SimpleDateFormat and
the locale fomr the context and the pattern |
java.lang.String |
fullDate(RenderContext context,
java.util.Date value)
Formats the date as full date using the DateFormat
and the locale from the context |
java.lang.String |
fullDateTime(RenderContext context,
java.util.Date value)
Formats the date as full date/time using the DateFormat
and the locale from the context |
java.lang.String |
fullTime(RenderContext context,
java.util.Date value)
Formats the date as full time using the DateFormat
and the locale from the context |
java.lang.String |
integer(RenderContext context,
java.lang.Number value)
Formats the value as integer using the NumberFormat
and the locale from the context |
java.lang.String |
longDate(RenderContext context,
java.util.Date value)
Formats the date as long date using the DateFormat
and the locale from the context |
java.lang.String |
longDateTime(RenderContext context,
java.util.Date value)
Formats the date as long date/time using the DateFormat
and the locale from the context |
java.lang.String |
longTime(RenderContext context,
java.util.Date value)
Formats the date as long time using the DateFormat
and the locale from the context |
java.lang.String |
mediumDate(RenderContext context,
java.util.Date value)
Formats the date as medium date using the DateFormat
and the locale from the context |
java.lang.String |
mediumDateTime(RenderContext context,
java.util.Date value)
Formats the date as medium date/time using the DateFormat
and the locale from the context |
java.lang.String |
mediumTime(RenderContext context,
java.util.Date value)
Formats the date as medium time using the DateFormat
and the locale from the context |
java.lang.String |
number(RenderContext context,
java.lang.Number value)
Formats the value using the DecimalFormat and the locale from the context |
java.lang.String |
number(RenderContext context,
java.lang.Number value,
java.lang.String pattern)
Formats the value using the DecimalFormat and the locale from the context
and the specified pattern |
java.lang.String |
percent(RenderContext context,
java.lang.Number value)
Formats the value as percentage using the NumberFormat
and the locale from the context |
java.lang.String |
shortDate(RenderContext context,
java.util.Date value)
Formats the date as short date using the DateFormat
and the locale from the context |
java.lang.String |
shortDateTime(RenderContext context,
java.util.Date value)
Formats the date as short date/time using the DateFormat
and the locale from the context |
java.lang.String |
shortTime(RenderContext context,
java.util.Date value)
Formats the date as short time using the DateFormat
and the locale from the context |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormatTransformers()
Method Detail |
---|
public java.lang.String number(RenderContext context, java.lang.Number value)
DecimalFormat
and the locale from the context
context
- the contextvalue
- the value
public java.lang.String number(RenderContext context, java.lang.Number value, java.lang.String pattern)
DecimalFormat
and the locale from the context
and the specified pattern
context
- the contextvalue
- the valuepattern
- the pattern according to the DecimalFormat
public java.lang.String currency(RenderContext context, java.lang.Number value)
NumberFormat
and the locale from the context
context
- the contextvalue
- the value
public java.lang.String integer(RenderContext context, java.lang.Number value)
NumberFormat
and the locale from the context
context
- the contextvalue
- the value
public java.lang.String percent(RenderContext context, java.lang.Number value)
NumberFormat
and the locale from the context
context
- the contextvalue
- the value
public java.lang.String date(RenderContext context, java.util.Date value, java.lang.String pattern)
SimpleDateFormat
and
the locale fomr the context and the pattern
context
- the contextvalue
- the valuepattern
- the pattern according to the SimpleDateFormat
public java.lang.String shortDate(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String mediumDate(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String longDate(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String fullDate(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String shortDateTime(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String mediumDateTime(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String longDateTime(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String fullDateTime(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String shortTime(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String mediumTime(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String longTime(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
public java.lang.String fullTime(RenderContext context, java.util.Date value)
DateFormat
and the locale from the context
context
- the contextvalue
- the date
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |