Lines Matching defs:roll

184  * <code>set()</code>, <code>add()</code>, and <code>roll()</code>.</p>
249 * <p><strong><code>roll(f, delta)</code></strong> adds
262 * originally set to August 31, 1999. Calling <code>roll(Calendar.MONTH,
267 * value, 30. Finally, the <strong>roll rule</strong> maintains the
272 * <code>roll(Calendar.WEEK_OF_MONTH, -1)</code> sets the calendar to
275 * Sunday May 30, 1999. This is because the roll rule imposes an
285 * <code>add()</code> and <code>roll()</code>, consider a user interface
294 * <code>add()</code> or <code>roll()</code>, depending on whether larger
298 * <p><b>Note:</b> You should always use {@link #roll roll} and {@link #add add} rather
302 * or days during non-leap years. The subclasses' <tt>add</tt> and <tt>roll</tt>
347 * ({@link #add(int, int) add} and {@link #roll(int, int) roll}) behavior of many
530 * <li>Optionally, subclasses may override {@link #roll roll} and
536 * HebrewCalendar#roll HebrewCalendar.roll} methods take this into
2702 * example, to roll the current date up by one day, you can call:
2704 * <code>roll({@link #DATE}, true)</code>
2706 * When rolling on the {@link #YEAR} field, it will roll the year
2722 * then attempting to roll the year past that limit will result in pinning the year
2724 * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to
2728 * <b>Note:</b> Calling <tt>roll(field, true)</tt> N times is <em>not</em>
2729 * necessarily equivalent to calling <tt>roll(field, N)</tt>. For example,
2731 * <tt>roll(Calendar.MONTH, 2)</tt>, the result will be March 31, 1995.
2732 * But if you call <tt>roll(Calendar.MONTH, true)</tt>, the result will be
2736 * <b>Note:</b> You should always use <tt>roll</tt> and <tt>add</tt> rather
2740 * or days during non-leap years. The subclasses' <tt>add</tt> and <tt>roll</tt>
2744 * @param field the calendar field to roll.
2752 * @see #roll(int, int)
2756 public final void roll(int field, boolean up)
2758 roll(field, up ? +1 : -1);
2763 * example, to roll the current date up by three days, you can call
2764 * <code>roll(Calendar.DATE, 3)</code>. If the
2767 * For example, calling <code>roll(Calendar.DATE, 10)</code>
2782 * then attempting to roll the year past that limit will result in pinning the year
2784 * time (such as Buddhist, Hebrew, or Islamic), it is possible for add or roll to
2788 * {@icunote} the ICU implementation of this method is able to roll
2791 * additional fields in their overrides of <code>roll</code>.
2793 * <b>Note:</b> You should always use <tt>roll</tt> and <tt>add</tt> rather
2797 * or days during non-leap years. The subclasses' <tt>add</tt> and <tt>roll</tt>
2802 * This implementation of <code>roll</code> assumes that the behavior of the
2806 * are sufficient to perform the roll. For week-related fields,
2812 * down must overide <code>roll</code> to handle those fields specially.
2816 * {@link HebrewCalendar#roll HebrewCalendar.roll} method takes this into account,
2820 * @param field the calendar field to roll.
2825 * @see #roll(int, boolean)
2829 public void roll(int field, int amount) {
2845 // These are the standard roll instructions. These work for all
2890 // E.g., <jan31>.roll(MONTH, 1) -> <feb28> or <feb29>.
2926 // this era has real bounds, roll should wrap years
2956 // This is tricky, because during the roll we may have to shift
3015 // Now roll between start and (limit - 1).
3073 // Now roll between start and (limit - 1).
3126 // and then roll within that range.
3149 throw new IllegalArgumentException("Calendar.roll(" + fieldName(field) +
3174 * <b>Note:</b> You should always use <tt>roll</tt> and <tt>add</tt> rather
3178 * or days during non-leap years. The subclasses' <tt>add</tt> and <tt>roll</tt>
3204 * @see #roll(int, int)
3345 // to roll over/back the date. For now, this only happens
3846 // for implementing add, roll, and computeFields.
3859 * their own overrides of {@link #roll roll} and {@link #add add}.