|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.datamodel.record.LiteralFormatHelper
public class LiteralFormatHelper
helper class for formatting and parsing literal values. all methods synchronize on the used local formatter object, so you can use the shared instance. Using multiple instances may improve performance, though, because of less synchronization.
| Field Summary | |
|---|---|
static LiteralFormatHelper |
INSTANCE
shared global helper instance. |
| Constructor Summary | |
|---|---|
LiteralFormatHelper()
create local instance. |
|
| Method Summary | |
|---|---|
java.lang.String |
formatDate(java.util.Date value)
format value as Date string. |
java.lang.String |
formatDateTime(java.util.Date value)
format value as DateTime string. |
java.lang.String |
formatTime(java.util.Date value)
format value as Time string. |
java.util.Date |
parseDate(java.lang.String dateString)
parse a date string. |
java.util.Date |
parseDateTime(java.lang.String dateTimeString)
parse datetime string. |
java.util.Date |
parseTime(java.lang.String timeString)
parse a time string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final LiteralFormatHelper INSTANCE
| Constructor Detail |
|---|
public LiteralFormatHelper()
| Method Detail |
|---|
public java.lang.String formatDate(java.util.Date value)
value - a date value
public java.lang.String formatTime(java.util.Date value)
value - a time value
public java.lang.String formatDateTime(java.util.Date value)
value - a datetime value
public java.util.Date parseDate(java.lang.String dateString)
throws java.text.ParseException
dateString - a date string
java.text.ParseException - string has wrong format
public java.util.Date parseTime(java.lang.String timeString)
throws java.text.ParseException
timeString - a time value
java.text.ParseException - string has wrong format
public java.util.Date parseDateTime(java.lang.String dateTimeString)
throws java.text.ParseException
dateTimeString - a datetime string
java.text.ParseException - string has wrong format
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||