java.text

Class DateFormat.Field

Enclosing Class:
DateFormat
Implemented Interfaces:
Serializable

public static class DateFormat.Field
extends Format.Field

See Also:
Serialized Form

Field Summary

static DateFormat.Field
AM_PM
static DateFormat.Field
DAY_OF_MONTH
static DateFormat.Field
DAY_OF_WEEK
static DateFormat.Field
DAY_OF_WEEK_IN_MONTH
static DateFormat.Field
DAY_OF_YEAR
static DateFormat.Field
ERA
static DateFormat.Field
HOUR0
static DateFormat.Field
HOUR1
static DateFormat.Field
HOUR_OF_DAY0
static DateFormat.Field
HOUR_OF_DAY1
static DateFormat.Field
MILLISECOND
static DateFormat.Field
MINUTE
static DateFormat.Field
MONTH
static DateFormat.Field
SECOND
static DateFormat.Field
TIME_ZONE
static DateFormat.Field
WEEK_OF_MONTH
static DateFormat.Field
WEEK_OF_YEAR
static DateFormat.Field
YEAR

Fields inherited from class java.text.AttributedCharacterIterator.Attribute

INPUT_METHOD_SEGMENT, LANGUAGE, READING

Constructor Summary

Field(String name, int calendarField)

Method Summary

int
getCalendarField()
static DateFormat.Field
ofCalendarField(int calendarField)
protected Object
readResolve()
Resolves an instance of AttributedCharacterIterator.Attribute that is being deserialized to one of the three pre-defined attribute constants.

Methods inherited from class java.text.AttributedCharacterIterator.Attribute

equals, getName, hashCode, readResolve, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

AM_PM

public static final DateFormat.Field AM_PM

DAY_OF_MONTH

public static final DateFormat.Field DAY_OF_MONTH

DAY_OF_WEEK

public static final DateFormat.Field DAY_OF_WEEK

DAY_OF_WEEK_IN_MONTH

public static final DateFormat.Field DAY_OF_WEEK_IN_MONTH

DAY_OF_YEAR

public static final DateFormat.Field DAY_OF_YEAR

ERA

public static final DateFormat.Field ERA

HOUR0

public static final DateFormat.Field HOUR0

HOUR1

public static final DateFormat.Field HOUR1

HOUR_OF_DAY0

public static final DateFormat.Field HOUR_OF_DAY0

HOUR_OF_DAY1

public static final DateFormat.Field HOUR_OF_DAY1

MILLISECOND

public static final DateFormat.Field MILLISECOND

MINUTE

public static final DateFormat.Field MINUTE

MONTH

public static final DateFormat.Field MONTH

SECOND

public static final DateFormat.Field SECOND

TIME_ZONE

public static final DateFormat.Field TIME_ZONE

WEEK_OF_MONTH

public static final DateFormat.Field WEEK_OF_MONTH

WEEK_OF_YEAR

public static final DateFormat.Field WEEK_OF_YEAR

YEAR

public static final DateFormat.Field YEAR

Constructor Details

Field

protected Field(String name,
                int calendarField)

Method Details

getCalendarField

public int getCalendarField()

ofCalendarField

public static DateFormat.Field ofCalendarField(int calendarField)

readResolve

protected Object readResolve()
            throws InvalidObjectException
Resolves an instance of AttributedCharacterIterator.Attribute that is being deserialized to one of the three pre-defined attribute constants. It does this by comparing the names of the attributes. The constant that the deserialized object resolves to is returned.
Overrides:
readResolve in interface AttributedCharacterIterator.Attribute
Returns:
The resolved contant value
Throws:
InvalidObjectException - If the object being deserialized cannot be resolved.

DateFormat.java -- Class for formatting/parsing date/times Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.