Home | History | Annotate | Download | only in text

Lines Matching refs:Field

124  * <li>align any particular field, or find out where it is for selection
148 * and the instant of time. This field is used for both formatting and
151 * <p>Subclasses should initialize this field to a {@link Calendar}
167 * Useful constant for ERA field alignment.
172 * Useful constant for YEAR field alignment.
177 * Useful constant for MONTH field alignment.
182 * Useful constant for DATE field alignment.
187 * Useful constant for one-based HOUR_OF_DAY field alignment.
194 * Useful constant for zero-based HOUR_OF_DAY field alignment.
201 * Useful constant for MINUTE field alignment.
206 * Useful constant for SECOND field alignment.
211 * Useful constant for MILLISECOND field alignment.
216 * Useful constant for DAY_OF_WEEK field alignment.
221 * Useful constant for DAY_OF_YEAR field alignment.
226 * Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.
231 * Useful constant for WEEK_OF_YEAR field alignment.
236 * Useful constant for WEEK_OF_MONTH field alignment.
241 * Useful constant for AM_PM field alignment.
246 * Useful constant for one-based HOUR field alignment.
253 * Useful constant for zero-based HOUR field alignment.
260 * Useful constant for TIMEZONE field alignment.
275 * @param fieldPosition keeps track of the position of the field
277 * On input: an alignment field,
278 * if desired. On output: the offsets of the alignment field. For
283 * Notice that if the same time field appears
285 * occurrence of that time field. For instance, formatting a Date to
287 * "h a z (zzzz)" and the alignment field DateFormat.TIMEZONE_FIELD,
309 * @param fieldPosition keeps track of the position of the field
311 * On input: an alignment field,
312 * if desired. On output: the offsets of the alignment field. For
317 * Notice that if the same time field appears
319 * occurrence of that time field. For instance, formatting a Date to
321 * "h a z (zzzz)" and the alignment field DateFormat.TIMEZONE_FIELD,
798 * field identifiers in <code>FieldPosition</code>.
806 public static class Field extends Format.Field {
813 // Maps from Calendar constant (such as Calendar.ERA) to Field
814 // constant (such as Field.ERA).
815 private static final Field[] calendarToFieldMapping =
816 new Field[Calendar.FIELD_COUNT];
818 /** Calendar field. */
822 * Returns the <code>Field</code> constant that corresponds to
825 * constant and a <code>Field</code>, null is returned.
828 * not the value of a <code>Calendar</code> field constant.
829 * @param calendarField Calendar field constant
830 * @return Field instance representing calendarField.
833 public static Field ofCalendarField(int calendarField) {
843 * Creates a <code>Field</code>.
845 * @param name the name of the <code>Field</code>
847 * <code>Field</code> corresponds to; any value, even one
852 protected Field(String name, int calendarField) {
855 if (this.getClass() == DateFormat.Field.class) {
865 * Returns the <code>Calendar</code> field associated with this
866 * attribute. For example, if this represents the hours field of
871 * @return Calendar constant for this field
883 * @return resolved DateFormat.Field constant
886 if (this.getClass() != DateFormat.Field.class) {
903 * Constant identifying the era field.
905 public final static Field ERA = new Field("era", Calendar.ERA);
908 * Constant identifying the year field.
910 public final static Field YEAR = new Field("year", Calendar.YEAR);
913 * Constant identifying the month field.
915 public final static Field MONTH = new Field("month", Calendar.MONTH);
918 * Constant identifying the day of month field.
920 public final static Field DAY_OF_MONTH = new
921 Field("day of month", Calendar.DAY_OF_MONTH);
924 * Constant identifying the hour of day field, where the legal values
927 public final static Field HOUR_OF_DAY1 = new Field("hour of day 1",-1);
930 * Constant identifying the hour of day field, where the legal values
933 public final static Field HOUR_OF_DAY0 = new
934 Field("hour of day", Calendar.HOUR_OF_DAY);
937 * Constant identifying the minute field.
939 public final static Field MINUTE =new Field("minute", Calendar.MINUTE);
942 * Constant identifying the second field.
944 public final static Field SECOND =new Field("second", Calendar.SECOND);
947 * Constant identifying the millisecond field.
949 public final static Field MILLISECOND = new
950 Field("millisecond", Calendar.MILLISECOND);
953 * Constant identifying the day of week field.
955 public final static Field DAY_OF_WEEK = new
956 Field("day of week", Calendar.DAY_OF_WEEK);
959 * Constant identifying the day of year field.
961 public final static Field DAY_OF_YEAR = new
962 Field("day of year", Calendar.DAY_OF_YEAR);
965 * Constant identifying the day of week field.
967 public final static Field DAY_OF_WEEK_IN_MONTH =
968 new Field("day of week in month",
972 * Constant identifying the week of year field.
974 public final static Field WEEK_OF_YEAR = new
975 Field("week of year", Calendar.WEEK_OF_YEAR);
978 * Constant identifying the week of month field.
980 public final static Field WEEK_OF_MONTH = new
981 Field("week of month", Calendar.WEEK_OF_MONTH);
985 * (e.g. "a.m." or "p.m.") field.
987 public final static Field AM_PM = new
988 Field("am pm", Calendar.AM_PM);
991 * Constant identifying the hour field, where the legal values are
994 public final static Field HOUR1 = new Field("hour 1", -1);
997 * Constant identifying the hour field, where the legal values are
1000 public final static Field HOUR0 = new
1001 Field("hour", Calendar.HOUR);
1004 * Constant identifying the time zone field.
1006 public final static Field TIME_ZONE = new Field("time zone", -1);