com.ibm.icu.text
Class ChineseDateFormat.Field
java.lang.Object
java.text.AttributedCharacterIterator.Attribute
java.text.Format.Field
com.ibm.icu.text.DateFormat.Field
com.ibm.icu.text.ChineseDateFormat.Field
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- ChineseDateFormat
public static class ChineseDateFormat.Field
- extends DateFormat.Field
The instances of this inner class are used as attribute keys and values
in AttributedCharacterIterator that
ChineseDateFormat.formatToCharacterIterator() method returns.
There is no public constructor to this class, the only instances are the
constants defined here.
- See Also:
- Serialized Form
- Status:
- Stable ICU 3.8.
Fields inherited from class com.ibm.icu.text.DateFormat.Field |
AM_PM, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DOW_LOCAL, ERA, EXTENDED_YEAR, HOUR_OF_DAY0, HOUR_OF_DAY1, HOUR0, HOUR1, JULIAN_DAY, MILLISECOND, MILLISECONDS_IN_DAY, MINUTE, MONTH, QUARTER, SECOND, TIME_ZONE, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, YEAR_WOY |
Constructor Summary |
protected |
ChineseDateFormat.Field(String name,
int calendarField)
Constructs a ChineseDateFormat.Field with the given name and
the ChineseCalendar field which this attribute represents. |
Method Summary |
static DateFormat.Field |
ofCalendarField(int calendarField)
Returns the Field constant that corresponds to the
ChineseCalendar field calendarField . |
protected Object |
readResolve()
Resolves instances being deserialized to the predefined constants. |
IS_LEAP_MONTH
public static final ChineseDateFormat.Field IS_LEAP_MONTH
- Constant identifying the leap month marker.
- Status:
- Stable ICU 3.8.
ChineseDateFormat.Field
protected ChineseDateFormat.Field(String name,
int calendarField)
- Constructs a
ChineseDateFormat.Field
with the given name and
the ChineseCalendar
field which this attribute represents.
Use -1 for calendarField
if this field does not have a
corresponding ChineseCalendar
field.
- Parameters:
name
- Name of the attributecalendarField
- Calendar
field constant- Status:
- Stable ICU 3.8.
ofCalendarField
public static DateFormat.Field ofCalendarField(int calendarField)
- Returns the
Field
constant that corresponds to the
ChineseCalendar
field calendarField
. If there is no
corresponding Field
is available, null is returned.
- Parameters:
calendarField
- ChineseCalendar
field constant
- Returns:
Field
associated with the calendarField
,
or null if no associated Field
is available.
- Throws:
IllegalArgumentException
- if calendarField
is not
a valid Calendar
field constant.- Status:
- Stable ICU 3.8.
readResolve
protected Object readResolve()
throws InvalidObjectException
- Resolves instances being deserialized to the predefined constants.
- Overrides:
readResolve
in class DateFormat.Field
- Throws:
InvalidObjectException
- if the constant could not be resolved.- Status:
- Stable ICU 3.8.
Copyright (c) 2011 IBM Corporation and others.