|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.spi.LocaleServiceProvider
java.text.spi.DateFormatProvider
public abstract class DateFormatProvider
A DateFormatProvider
provides localized
instances of DateFormat
.
Constructor Summary | |
---|---|
protected |
DateFormatProvider()
Constructs a new DateFormatProvider . |
Method Summary | |
---|---|
abstract DateFormat |
getDateInstance(int style,
Locale locale)
Returns a DateFormat instance
for formatting dates with the given style in the specified
Locale . |
abstract DateFormat |
getDateTimeInstance(int dateStyle,
int timeStyle,
Locale locale)
Returns a DateFormat instance
for formatting dates and times with the given style in the
specified Locale . |
abstract DateFormat |
getTimeInstance(int style,
Locale locale)
Returns a DateFormat instance
for formatting times with the given style in the specified
Locale . |
Methods inherited from class java.util.spi.LocaleServiceProvider |
---|
getAvailableLocales |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DateFormatProvider()
DateFormatProvider
.
Provided for implicit invocation by subclasses.
Method Detail |
---|
public abstract DateFormat getDateInstance(int style, Locale locale)
DateFormat
instance
for formatting dates with the given style in the specified
Locale
.
style
- the formatting style; one of DateFormat.SHORT
,
DateFormat.MEDIUM
, DateFormat.LONG
or DateFormat.FULL
.locale
- the desired locale.
NullPointerException
- if the locale is null.
IllegalArgumentException
- if the style is invalid or
the locale is not one
returned by
LocaleServiceProvider.getAvailableLocales()
DateFormat.getDateInstance(int,java.util.Locale)
public abstract DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale locale)
DateFormat
instance
for formatting dates and times with the given style in the
specified Locale
.
dateStyle
- the date formatting style; one of
DateFormat.SHORT
, DateFormat.MEDIUM
,
DateFormat.LONG
or DateFormat.FULL
.timeStyle
- the time formatting style; one of
DateFormat.SHORT
, DateFormat.MEDIUM
,
DateFormat.LONG
or DateFormat.FULL
.locale
- the desired locale.
NullPointerException
- if the locale is null.
IllegalArgumentException
- if either style is invalid or
the locale is not one
returned by
LocaleServiceProvider.getAvailableLocales()
java.text.DateFormat#getDateInstance(java.util.Locale)
public abstract DateFormat getTimeInstance(int style, Locale locale)
DateFormat
instance
for formatting times with the given style in the specified
Locale
.
style
- the formatting style; one of DateFormat.SHORT
,
DateFormat.MEDIUM
, DateFormat.LONG
or DateFormat.FULL
.locale
- the desired locale.
NullPointerException
- if the locale is null.
IllegalArgumentException
- if the style is invalid or
the locale is not one
returned by
LocaleServiceProvider.getAvailableLocales()
DateFormat.getTimeInstance(int,java.util.Locale)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |