JavaTM Platform
Standard Ed. 6

java.text
클래스 DateFormat.Field

java.lang.Object 
  상위를 확장 java.text.AttributedCharacterIterator.Attribute 
      상위를 확장 java.text.Format.Field 
          상위를 확장 java.text.DateFormat.Field
모든 구현된 인터페이스:
Serializable
포함되어 있는 클래스:
DateFormat


public static class DateFormat.Field
extends Format.Field

DateFormat.formatToCharacterIterator 로부터 반환된 AttributedCharacterIterator 내의 속성 키, 및 FieldPosition 내의 필드 식별자로서 사용하는 정수를 정의합니다.  

또, 클래스의 정수로 대응하는 Calendar 정수와의 사이에 맵 하는 2 개의 메소드를 제공합니다.

도입된 버젼:
1.4
관련 항목:
Calendar , 직렬화 된 형식

필드의 개요
static DateFormat.Field AM_PM
          1 일안의 시각의 인디케이터(indicator) ( 「a.m.」또는 「p.m.」) 필드를 식별하는 정수입니다.
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 HOUR_OF_DAY0
          1 일안의 시각의 필드를 식별하는 정수입니다.
static DateFormat.Field HOUR_OF_DAY1
          1 일안의 시각의 필드를 식별하는 정수입니다.
static DateFormat.Field HOUR0
          시각의 필드를 식별하는 정수입니다.
static DateFormat.Field HOUR1
          시각의 필드를 식별하는 정수입니다.
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
          1 월안의 주의 필드를 식별하는 정수입니다.
static DateFormat.Field WEEK_OF_YEAR
          해의 주의 필드를 식별하는 정수입니다.
static DateFormat.Field YEAR
          해의 필드를 식별하는 정수입니다.
 
클래스 java.text. AttributedCharacterIterator.Attribute 로부터 상속된 필드
INPUT_METHOD_SEGMENT , LANGUAGE , READING
 
생성자 의 개요
protected DateFormat.Field (String  name, int calendarField)
          Field 를 작성합니다.
 
메소드의 개요
 int getCalendarField ()
          이 속성에 관련한 Calendar 필드를 돌려줍니다.
static DateFormat.Field ofCalendarField (int calendarField)
          calendarFieldCalendar 정수에 대응하는 Field 를 돌려줍니다.
protected  Object readResolve ()
          직렬화 복원되는 인스턴스를 정의가 끝난 정수에 해결합니다.
 
클래스 java.text. AttributedCharacterIterator.Attribute 로부터 상속된 메소드
equals , getName , hashCode , toString
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , finalize , getClass , notify , notifyAll , wait , wait , wait
 

필드의 상세

ERA

public static final DateFormat.Field  ERA
기원의 필드를 식별하는 정수입니다.


YEAR

public static final DateFormat.Field  YEAR
해의 필드를 식별하는 정수입니다.


MONTH

public static final DateFormat.Field  MONTH
달의 필드를 식별하는 정수입니다.


DAY_OF_MONTH

public static final DateFormat.Field  DAY_OF_MONTH
달의 날의 필드를 식별하는 정수입니다.


HOUR_OF_DAY1

public static final DateFormat.Field  HOUR_OF_DAY1
1 일안의 시각의 필드를 식별하는 정수입니다. 정당한 값은 1 ~ 24 입니다.


HOUR_OF_DAY0

public static final DateFormat.Field  HOUR_OF_DAY0
1 일안의 시각의 필드를 식별하는 정수입니다. 정당한 값은 0 ~ 23 입니다.


MINUTE

public static final DateFormat.Field  MINUTE
분의 필드를 식별하는 정수입니다.


SECOND

public static final DateFormat.Field  SECOND
초의 필드를 식별하는 정수입니다.


MILLISECOND

public static final DateFormat.Field  MILLISECOND
밀리 세컨드의 필드를 식별하는 정수입니다.


DAY_OF_WEEK

public static final DateFormat.Field  DAY_OF_WEEK
요일의 필드를 식별하는 정수입니다.


DAY_OF_YEAR

public static final DateFormat.Field  DAY_OF_YEAR
해의 날의 필드를 식별하는 정수입니다.


DAY_OF_WEEK_IN_MONTH

public static final DateFormat.Field  DAY_OF_WEEK_IN_MONTH
요일의 필드를 식별하는 정수입니다.


WEEK_OF_YEAR

public static final DateFormat.Field  WEEK_OF_YEAR
해의 주의 필드를 식별하는 정수입니다.


WEEK_OF_MONTH

public static final DateFormat.Field  WEEK_OF_MONTH
1 월안의 주의 필드를 식별하는 정수입니다.


AM_PM

public static final DateFormat.Field  AM_PM
1 일안의 시각의 인디케이터(indicator) ( 「a.m.」또는 「p.m.」) 필드를 식별하는 정수입니다.


HOUR1

public static final DateFormat.Field  HOUR1
시각의 필드를 식별하는 정수입니다. 정당한 값은 1 ~ 12 입니다.


HOUR0

public static final DateFormat.Field  HOUR0
시각의 필드를 식별하는 정수입니다. 정당한 값은 0 ~ 11 입니다.


TIME_ZONE

public static final DateFormat.Field  TIME_ZONE
타임 존의 필드를 식별하는 정수입니다.

생성자 의 상세

DateFormat.Field

protected DateFormat.Field(String  name,
                           int calendarField)
Field 를 작성합니다.

파라미터:
name - Field 의 이름
calendarField - 이 Field 가 대응한다 Calendar 정수. 임의의 값을 사용할 수 있어 정당한 Calendar 치의 범위외의 값도 사용할 수 있다. 다만, 정당한 Calendar 치에 대응하지 않는 값에는, -1 (을)를 사용할 필요가 있다
메소드의 상세

ofCalendarField

public static DateFormat.Field  ofCalendarField(int calendarField)
calendarFieldCalendar 정수에 대응하는 Field 를 돌려줍니다. Calendar 정수와 Field 와의 사이에 직접적인 매핑이 없는 경우는, null 가 돌려주어집니다.

파라미터:
calendarField - Calendar 필드 정수
반환값:
calendarField 를 나타내는 필드 인스턴스
예외:
IllegalArgumentException - calendarFieldCalendar 필드 정수의 값이 아닌 경우
관련 항목:
Calendar

getCalendarField

public int getCalendarField()
이 속성에 관련한 Calendar 필드를 돌려줍니다. 예를 들어,Calendar 의 hours 필드를 나타내는 경우는,Calendar.HOUR 를 돌려줍니다. 대응하는 Calendar 정수가 없는 경우는,-1 을 돌려줍니다.

반환값:
이 필드의 Calendar 정수
관련 항목:
Calendar

readResolve

protected Object  readResolve()
                      throws InvalidObjectException 
직렬화 복원되는 인스턴스를 정의가 끝난 정수에 해결합니다.

오버라이드(override):
클래스 AttributedCharacterIterator.Attribute 내의 readResolve
반환값:
해결된 DateFormat.Field 정수
예외:
InvalidObjectException - 정수를 해결할 수 없다 경우

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.