|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.filenet.wcm.toolkit.server.util.OptimizedDateFormat
OptimizedDateFormat is intended for use as a drop-in replacement for SimpleDateFormat.
Field Summary | |
protected static int |
DATE_STYLE_MODE
|
protected static int |
DATE_TIME_STYLE_MODE
|
protected int |
dateStyle
|
protected static java.util.Hashtable |
fastDateFormats
|
protected org.apache.commons.lang.time.FastDateFormat |
fdf
|
protected java.util.Locale |
locale
|
protected int |
mode
|
protected java.lang.String |
pattern
|
protected static int |
PATTERN_MODE
|
protected java.text.SimpleDateFormat |
sdf
|
protected static int |
TIME_STYLE_MODE
|
protected int |
timeStyle
|
protected java.util.TimeZone |
timeZone
|
protected static boolean |
useFastDateFormat
|
Constructor Summary | |
protected |
OptimizedDateFormat(int dateStyle,
int timeStyle,
java.util.Locale locale)
Supports the static factory methods that follow. |
|
OptimizedDateFormat(java.lang.String pattern)
Pattern-only constructor. |
|
OptimizedDateFormat(java.lang.String pattern,
java.util.Locale locale)
Pattern and Locale constructor. |
Method Summary | |
java.lang.String |
format(java.util.Date date)
Matches the format method call from DateFormat. |
static OptimizedDateFormat |
getDateInstance(int dateStyle,
java.util.Locale locale)
Gets an instance based on the numeric dateStyle value. |
static OptimizedDateFormat |
getDateTimeInstance(int dateStyle,
int timeStyle,
java.util.Locale locale)
Gets an instance based on the numeric dateStyle and timeStyle values. |
static OptimizedDateFormat |
getTimeInstance(int timeStyle,
java.util.Locale locale)
Gets an instance based on the numeric timeStyle value. |
protected void |
initialize(int mode)
|
java.util.Date |
parse(java.lang.String dateTimeString)
Matches the parse method call from DateFormat. |
void |
setTimeZone(java.util.TimeZone timeZone)
Matches setTimeZone call on DateFormat. |
static void |
setUseFastDateFormat(boolean value)
|
java.lang.String |
toLocalizedPattern()
Matches SimpleDateFormat toLocalizedPattern() method. |
java.lang.String |
toPattern()
Matches SimpleDateFormat toPattern() method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.commons.lang.time.FastDateFormat fdf
protected java.text.SimpleDateFormat sdf
protected java.lang.String pattern
protected java.util.Locale locale
protected java.util.TimeZone timeZone
protected int dateStyle
protected int timeStyle
protected int mode
protected static final int PATTERN_MODE
protected static final int DATE_STYLE_MODE
protected static final int TIME_STYLE_MODE
protected static final int DATE_TIME_STYLE_MODE
protected static java.util.Hashtable fastDateFormats
protected static boolean useFastDateFormat
Constructor Detail |
public OptimizedDateFormat(java.lang.String pattern)
pattern
- public OptimizedDateFormat(java.lang.String pattern, java.util.Locale locale)
pattern
- locale
- protected OptimizedDateFormat(int dateStyle, int timeStyle, java.util.Locale locale)
dateStyle
- timeStyle
- locale
- Method Detail |
public static OptimizedDateFormat getDateInstance(int dateStyle, java.util.Locale locale)
dateStyle
- locale
-
public static OptimizedDateFormat getTimeInstance(int timeStyle, java.util.Locale locale)
timeStyle
- locale
-
public static OptimizedDateFormat getDateTimeInstance(int dateStyle, int timeStyle, java.util.Locale locale)
timeStyle
- locale
-
public static void setUseFastDateFormat(boolean value)
public java.lang.String toPattern()
public java.lang.String toLocalizedPattern()
public void setTimeZone(java.util.TimeZone timeZone)
timeZone
- public java.lang.String format(java.util.Date date)
date
-
public java.util.Date parse(java.lang.String dateTimeString) throws java.text.ParseException
dateTimeString
-
java.text.ParseException
protected void initialize(int mode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |