com.filenet.wcm.toolkit.server.util
Class OptimizedDateFormat
- java.lang.Object
com.filenet.wcm.toolkit.server.util.OptimizedDateFormat
- public class OptimizedDateFormat
- extends java.lang.Object
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
DATE_STYLE_MODE
|
|
DATE_TIME_STYLE_MODE
|
|
dateStyle
|
|
fastDateFormats
|
|
fdf
|
|
locale
|
|
mode
|
|
pattern
|
|
PATTERN_MODE
|
|
sdf
|
|
TIME_STYLE_MODE
|
|
timeStyle
|
|
timeZone
|
|
useFastDateFormat
|
Constructor Summary
| Modifier | Constructor and Description |
|---|---|
|
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
| Modifier and Type | Method and Description |
|---|---|
|
format(java.util.Date date)
Matches the format method call from DateFormat.
|
|
getDateInstance(int dateStyle,java.util.Locale locale)
Gets an instance based on the numeric dateStyle value.
|
|
getDateTimeInstance(int dateStyle,int timeStyle,java.util.Locale locale)
Gets an instance based on the numeric dateStyle and timeStyle values.
|
|
getTimeInstance(int timeStyle,java.util.Locale locale)
Gets an instance based on the numeric timeStyle value.
|
|
initialize(int mode)
|
|
parse(java.lang.String dateTimeString)
Matches the parse method call from DateFormat.
|
|
setTimeZone(java.util.TimeZone timeZone)
Matches setTimeZone call on DateFormat.
|
|
setUseFastDateFormat(boolean value)
|
|
toLocalizedPattern()
Matches SimpleDateFormat toLocalizedPattern() method.
|
|
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
fdf
- protected org.apache.commons.lang.time.FastDateFormat fdf
sdf
- protected java.text.SimpleDateFormat sdf
pattern
- protected java.lang.String pattern
locale
- protected java.util.Locale locale
timeZone
- protected java.util.TimeZone timeZone
dateStyle
- protected int dateStyle
timeStyle
- protected int timeStyle
mode
- protected int mode
PATTERN_MODE
- protected static final int PATTERN_MODE
See Also:
DATE_STYLE_MODE
- protected static final int DATE_STYLE_MODE
See Also:
TIME_STYLE_MODE
- protected static final int TIME_STYLE_MODE
See Also:
DATE_TIME_STYLE_MODE
- protected static final int DATE_TIME_STYLE_MODE
See Also:
fastDateFormats
- protected static java.util.Hashtable fastDateFormats
useFastDateFormat
- protected static boolean useFastDateFormat
Constructor Detail
OptimizedDateFormat
- public OptimizedDateFormat(java.lang.String pattern)
Pattern-only constructor. Matches a SimpleDateFormat constructor.
Parameters:
pattern - OptimizedDateFormat
- public OptimizedDateFormat(java.lang.String pattern,
- java.util.Locale locale)
Pattern and Locale constructor. Matches a SimpleDateFormat constructor.
Parameters:
pattern - locale - OptimizedDateFormat
- protected OptimizedDateFormat(int dateStyle,
- int timeStyle,
- java.util.Locale locale)
Supports the static factory methods that follow.
Parameters:
dateStyle - timeStyle - locale - Method Detail
getDateInstance
- public static OptimizedDateFormat getDateInstance( int dateStyle,
- java.util.Locale locale)
Gets an instance based on the numeric dateStyle value. Matches the static sig
on DateFormat.
Parameters:
dateStyle - locale - Returns:
getTimeInstance
- public static OptimizedDateFormat getTimeInstance( int timeStyle,
- java.util.Locale locale)
Gets an instance based on the numeric timeStyle value. Matches the static sig
on DateFormat.
Parameters:
timeStyle - locale - Returns:
getDateTimeInstance
- public static OptimizedDateFormat getDateTimeInstance( int dateStyle,
- int timeStyle,
- java.util.Locale locale)
Gets an instance based on the numeric dateStyle and timeStyle values. Matches the static sig
on DateFormat.
Parameters:
timeStyle - locale - Returns:
setUseFastDateFormat
- public static void setUseFastDateFormat( boolean value)
toPattern
- public java.lang.String toPattern( )
Matches SimpleDateFormat toPattern() method.
Returns:
toLocalizedPattern
- public java.lang.String toLocalizedPattern( )
Matches SimpleDateFormat toLocalizedPattern() method.
Returns:
setTimeZone
- public void setTimeZone(java.util.TimeZone timeZone)
Matches setTimeZone call on DateFormat.
Parameters:
timeZone - format
- public java.lang.String format( java.util.Date date)
Matches the format method call from DateFormat.
Parameters:
date - Returns:
parse
- public java.util.Date parse(java.lang.String dateTimeString)
- throws java.text.ParseException
Matches the parse method call from DateFormat.
Parameters:
dateTimeString - Returns:
Throws:
java.text.ParseExceptioninitialize
- protected void initialize(int mode)