public class DataTypesFormatter extends Object
Modifier and Type | Class and Description |
---|---|
class |
DataTypesFormatter.DateFormatter |
Modifier and Type | Method and Description |
---|---|
String |
format(Object value) |
Date |
formatDate(Date date) |
String |
formatDateFull(Date date)
Output example for FULL date format
For the United States: Thursday, September 23, 2010
For France: jeudi 23 septembre 2010
For Spain: jueves 23 de septiembre de 2010
|
String |
formatDateLong(Date date)
Output example for LONG date format
For the United Kingdom: 23 September 2010
For France: 23 septembre 2010
For Spain: 23 de septiembre de 2010
|
String |
formatDateMedium(Date date)
Output example for MEDIUM date format
For Korea: 2010. 9. 23
For Spain: 23-sep-2010
|
String |
formatDateShort(Date date)
Output example for SHORT date format
For Japan: 10/09/23 (YY/MM/DD)
For Spain: 23/09/10 (DD/MM/YY)
|
Calendar |
getCalendar() |
Calendar |
getCalendar(Date date) |
int |
getCalendarField() |
DataTypesFormatter.DateFormatter |
getDateFormatter() |
static DataTypesFormatter |
getInstance(int dataType,
String subType,
Locale loc) |
Locale |
getLocale() |
Object |
getNextValue(Object value) |
NumberFormat |
getNumberFormatter() |
Object |
getPreviousValue(Object value) |
boolean |
isDate() |
boolean |
isNumber() |
boolean |
isValidType(Object value) |
Object |
parse(Object value) |
Object |
parse(String value) |
Date |
parseDate(String date) |
void |
setCalendarField(int calendarField) |
void |
setLocale(Locale loc) |
Format |
toFormat() |
String |
toLocalizedPattern() |
public static DataTypesFormatter getInstance(int dataType, String subType, Locale loc)
public String formatDateFull(Date date)
public String formatDateLong(Date date)
public String formatDateMedium(Date date)
public String formatDateShort(Date date)
public Calendar getCalendar()
public int getCalendarField()
public DataTypesFormatter.DateFormatter getDateFormatter()
public Locale getLocale()
public NumberFormat getNumberFormatter()
public boolean isDate()
public boolean isNumber()
public boolean isValidType(Object value)
value
- public Object parse(String value) throws ParseException
obj
- ParseException
public Date parseDate(String date) throws ParseException
ParseException
public void setCalendarField(int calendarField)
public void setLocale(Locale loc)
public Format toFormat()
public String toLocalizedPattern()