Lines Matching defs:fields

63  * #fields calendar fields} such as <code>YEAR</code>, <code>MONTH</code>,
65 * manipulating the calendar fields, such as getting the date of the next
70 * <p>The class also provides additional fields and methods for
72 * fields and methods are defined as <code>protected</code>.
79 * calendar fields have been initialized with the current date and time:
90 * certain calendar fields, as well as their meaning. For example,
101 * the Epoch) or values of the calendar fields. Calling the
108 * fields, <em>lenient</em> and <em>non-lenient</em>. When a
112 * the calendar fields are normalized. For example, a lenient
117 * exception if there is any inconsistency in its calendar fields. For
133 * <code>WEEK_OF_YEAR</code> fields, <code>Calendar</code> must determine the
146 * When computing a date and time from the calendar fields, there
155 * <code>Calendar</code> gives priorities to calendar fields that have been set
157 * calendar fields. The most recent combination, as determined by the
160 * <p><a name="date_resolution">For the date fields</a>:
170 * <a name="time_resolution">For the time of day fields</a>:
177 * <p>If there are any calendar fields whose values haven't been set in the selected
206 * The calendar fields can be changed using three methods:
218 * <code>set()</code>, other calendar fields may also change, depending on the
222 * after the calendar fields have been recomputed. The specifics are determined by
253 * <code>DAY_OF_MONTH</code>. No adjustment is made to smaller fields
255 * determines what fields are expected to be invariant.</p>
260 * fields.</p>
276 * fields. This is equivalent to calling <code>add(f, delta)</code> with
280 * <p><strong>Roll rule</strong>. Larger fields are unchanged after the
299 * fields should be affected, the user interface can behave as most users
317 // fields such as MONTH, HOUR, AM_PM, etc. It is possible to compute the
318 // millis from the fields, and vice versa. The data needed to do this
321 // user sets the ZONE_OFFSET and/or DST_OFFSET fields directly. The class
325 // If the user sets the fields using set(), the data flow is as follows.
327 // During this process, certain fields may be ignored. The disambiguation
328 // algorithm for resolving which fields to pay attention to is described
331 // local fields (YEAR, MONTH, DATE, HOUR, MINUTE, etc.)
353 // local fields (YEAR, MONTH, DATE, HOUR, MINUTE, etc.)
355 // In general, a round trip from fields, through local and UTC millis, and
356 // back out to fields is made when necessary. This is implemented by the
357 // complete() method. Resolving a partial set of fields into a UTC millis
358 // value allows all remaining fields to be generated from that value. If
359 // the Calendar is lenient, the fields are also renormalized to standard
567 * The number of distinct fields recognized by <code>get</code> and <code>set</code>.
738 // milliseconds, and a set of calendar "fields" representing the current time.
741 // 1. Initially, no fields are set, and the time is invalid.
742 // 2. If the time is set, all fields are computed and in sync.
744 // Recomputation of the time and fields happens when the object needs
753 protected int fields[];
757 * A new object has no fields set. After the first call to a method
758 * which generates the fields, they all remain set after that.
789 * True if <code>fields[]</code> are in sync with the currently set time.
791 * force a recomputation of all fields from the current value of
798 * True if all fields have been set.
805 * of <code>time</code> from <code>fields[]</code>.
847 * The corresponding fields[] has no value.
852 * The value of the corresponding fields[] has been calculated internally.
857 * The value of the corresponding fields[] has been set externally. Stamp
859 * corresponding fields[] value was set.
864 * The mask value that represents all of the fields.
880 // as well as compatible values for other fields. This is a
882 // - 2 (not implemented yet) a future version, in which fields[],
897 * as well as compatible values for other fields. This is a
912 // Mask values for calendar fields
951 fields = new int[FIELD_COUNT];
1060 * Converts the current calendar field values in {@link #fields fields[]}
1071 * to calendar field values in {@link #fields fields[]}.
1074 * recomputed first; to recompute the time, then the fields, call the
1146 * all calendar fields are normalized. In non-lenient mode, all
1147 * calendar fields are validated and this method throws an
1148 * exception if any calendar fields have out-of-range values. The
1176 return fields[field];
1193 fields[field] = value;
1212 // If the fields are partially normalized, calculate all the
1213 // fields before changing any fields.
1228 * Sets the values for the calendar fields <code>YEAR</code>,
1230 * Previous values of other calendar fields are retained. If this is not desired,
1249 * Sets the values for the calendar fields <code>YEAR</code>,
1252 * Previous values of other fields are retained. If this is not desired,
1275 * Sets the values for the fields <code>YEAR</code>, <code>MONTH</code>,
1278 * Previous values of other fields are retained. If this is not desired,
1308 * calendar fields, and the date and time calculations will treat
1309 * the fields as if they had never been set. A
1319 for (int i = 0; i < fields.length; ) {
1320 stamp[i] = fields[i] = 0; // UNSET == 0
1338 * fields are handled independently and the <a
1340 * day</a> is applied. Clearing one of the fields doesn't reset
1350 fields[field] = 0;
1360 * including cases that the value has been set by internal fields
1388 * <p>The default implementation supports the calendar fields for
1407 * of the calendar fields have invalid values
1438 * <p>The values of other calendar fields may be taken into
1467 * of the calendar fields have invalid values
1516 if (field < 0 || field >= fields.length ||
1549 * Fills in any unset fields in the calendar fields. First, the {@link
1560 computeFields(); // fills in unset fields
1583 * Returns a field mask (bit mask) indicating all calendar fields that
1586 * @return a bit mask indicating set state fields
1590 for (int i = 0; i < fields.length; i++) {
1599 * Sets the state of the specified calendar fields to
1600 * <em>computed</em>. This state means that the specified calendar fields
1613 for (int i = 0; i < fields.length; i++) {
1619 for (int i = 0; i < fields.length; i++) {
1634 * Sets the state of the calendar fields that are <em>not</em> specified
1636 * specifies all the calendar fields, then the state of this
1637 * <code>Calendar</code> becomes that all the calendar fields are in sync
1640 * @param fieldMask the field mask indicating which calendar fields are in
1650 for (int i = 0; i < fields.length; i++) {
1652 stamp[i] = fields[i] = 0; // UNSET == 0
1659 // Some or all of the fields are in sync with the
1666 * Returns whether the calendar fields are partially in sync with the time
1674 * Returns whether the calendar fields are fully in sync with the time
1698 * to be used to calculate the time value. The calendar fields are
1702 * <code>MONTH</code>, and <code>DAY_OF_MONTH</code> fields (i.e., 0x26 is
1706 * <p>This method supports the calendar fields resolution as described in
1713 * @return a bit mask of selected fields
1729 // Find the most recent group of fields specifying the day within
1736 // We look for the most recent of the fields in each group to determine
1773 /* Treat MONTH alone or no fields at all as DAY_OF_MONTH. This may
1774 * result in bestStamp = domStamp = UNSET if no fields are set,
1826 // Find the best set of fields specifying the time of day. There
1869 * Returns the pseudo-time-stamp for two fields, given their
1870 * individual pseudo-time-stamps. If either of the fields
2017 * field without changing larger fields. For example, to roll the current
2023 * When rolling on the month or Calendar.MONTH field, other fields like
2039 * without changing larger fields. A negative amount means to roll
2077 /* Recompute the fields from the time using the new zone. This also
2079 * the time will be computed from the fields using the new zone, then
2080 * the fields will get recomputed from that. Consider the sequence of
2254 * <p>Unlike the {@code set} method, all of the calendar fields
2272 * or any of the calendar fields are inconsistent
2502 other.fields = new int[FIELD_COUNT];
2506 other.fields[i] = fields[i];
2562 appendValue(buffer, FIELD_NAME[i], isSet(i), (long) fields[i]);
2601 * Recomputes the time and updates the status fields isTimeSet
2662 * Sets the WEEK_OF_MONTH and WEEK_OF_YEAR fields to new values with the
2672 // We have to check the new values of these fields after changing
2682 if (fields[WEEK_OF_MONTH] != weekOfMonth) {
2683 fields[WEEK_OF_MONTH] = weekOfMonth;
2689 if (fields[WEEK_OF_YEAR] != weekOfYear) {
2690 fields[WEEK_OF_YEAR] = weekOfYear;
2700 * <code>fields[]</code>, <code>isTimeSet</code>, <code>areFieldsSet</code>,
2712 // version 2) in which we don't write out fields[] or isSet[].
2769 // fields[], isSet[], isTimeSet, and areFieldsSet may not be
2774 if (fields == null) fields = new int[FIELD_COUNT];