com.ibm.icu.text
Class ChineseDateFormat.Field

java.lang.Object
  extended by java.text.AttributedCharacterIterator.Attribute
      extended by java.text.Format.Field
          extended by com.ibm.icu.text.DateFormat.Field
              extended by 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.

Field Summary
static ChineseDateFormat.Field IS_LEAP_MONTH
          Constant identifying the leap month marker.
 
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
 
Fields inherited from class java.text.AttributedCharacterIterator.Attribute
INPUT_METHOD_SEGMENT, LANGUAGE, READING
 
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.
 
Methods inherited from class com.ibm.icu.text.DateFormat.Field
getCalendarField
 
Methods inherited from class java.text.AttributedCharacterIterator.Attribute
equals, getName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IS_LEAP_MONTH

public static final ChineseDateFormat.Field IS_LEAP_MONTH
Constant identifying the leap month marker.

Status:
Stable ICU 3.8.
Constructor Detail

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 attribute
calendarField - Calendar field constant
Status:
Stable ICU 3.8.
Method Detail

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.