< prev index next >
src/java.base/share/classes/java/util/Calendar.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
@@ -2098,15 +2098,15 @@
* (any calendar types specified by {@code locale} are ignored)
* @return the string representation of the given
* {@code field} in the given {@code style}, or
* {@code null} if no string representation is
* applicable.
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if {@code field} or {@code style} is invalid,
* or if this {@code Calendar} is non-lenient and any
* of the calendar fields have invalid values
- * @exception NullPointerException
+ * @throws NullPointerException
* if {@code locale} is null
* @since 1.6
*/
public String getDisplayName(int field, int style, Locale locale) {
if (!checkDisplayNameParams(field, style, SHORT, NARROW_FORMAT, locale,
@@ -2189,15 +2189,15 @@
* the locale for the display names
* @return a {@code Map} containing all display names in
* {@code style} and {@code locale} and their
* field values, or {@code null} if no display names
* are defined for {@code field}
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if {@code field} or {@code style} is invalid,
* or if this {@code Calendar} is non-lenient and any
* of the calendar fields have invalid values
- * @exception NullPointerException
+ * @throws NullPointerException
* if {@code locale} is null
* @since 1.6
*/
public Map<String, Integer> getDisplayNames(int field, int style, Locale locale) {
if (!checkDisplayNameParams(field, style, ALL_STYLES, NARROW_FORMAT, locale,
@@ -2309,11 +2309,11 @@
* externally by calling one of the setter methods rather than by the
* internal time calculation.
*
* @return <code>true</code> if the field has been set externally,
* <code>false</code> otherwise.
- * @exception IndexOutOfBoundsException if the specified
+ * @throws IndexOutOfBoundsException if the specified
* <code>field</code> is out of range
* (<code>field < 0 || field >= FIELD_COUNT</code>).
* @see #selectFields()
* @see #setFieldsComputed(int)
*/
@@ -2342,11 +2342,11 @@
* <em>computed</em>. This state means that the specified calendar fields
* have valid values that have been set by internal time calculation
* rather than by calling one of the setter methods.
*
* @param fieldMask the field to be marked as computed.
- * @exception IndexOutOfBoundsException if the specified
+ * @throws IndexOutOfBoundsException if the specified
* <code>field</code> is out of range
* (<code>field < 0 || field >= FIELD_COUNT</code>).
* @see #isExternallySet(int)
* @see #selectFields()
*/
@@ -2379,11 +2379,11 @@
* <code>Calendar</code> becomes that all the calendar fields are in sync
* with the time value (millisecond offset from the Epoch).
*
* @param fieldMask the field mask indicating which calendar fields are in
* sync with the time value.
- * @exception IndexOutOfBoundsException if the specified
+ * @throws IndexOutOfBoundsException if the specified
* <code>field</code> is out of range
* (<code>field < 0 || field >= FIELD_COUNT</code>).
* @see #isExternallySet(int)
* @see #selectFields()
*/
@@ -2804,13 +2804,13 @@
* is equal to the time represented by this <code>Calendar</code>; a value
* less than <code>0</code> if the time of this <code>Calendar</code> is
* before the time represented by the argument; and a value greater than
* <code>0</code> if the time of this <code>Calendar</code> is after the
* time represented by the argument.
- * @exception NullPointerException if the specified <code>Calendar</code> is
+ * @throws NullPointerException if the specified <code>Calendar</code> is
* <code>null</code>.
- * @exception IllegalArgumentException if the time value of the
+ * @throws IllegalArgumentException if the time value of the
* specified <code>Calendar</code> object can't be obtained due to
* any invalid calendar values.
* @since 1.5
*/
@Override
@@ -3052,11 +3052,11 @@
*
* <p>The default implementation of this method throws an
* {@link UnsupportedOperationException}.
*
* @return the week year of this {@code Calendar}
- * @exception UnsupportedOperationException
+ * @throws UnsupportedOperationException
* if any week year numbering isn't supported
* in this {@code Calendar}.
* @see #isWeekDateSupported()
* @see #getFirstDayOfWeek()
* @see #getMinimalDaysInFirstWeek()
@@ -3084,15 +3084,15 @@
* @param weekYear the week year
* @param weekOfYear the week number based on {@code weekYear}
* @param dayOfWeek the day of week value: one of the constants
* for the {@link #DAY_OF_WEEK} field: {@link
* #SUNDAY}, ..., {@link #SATURDAY}.
- * @exception IllegalArgumentException
+ * @throws IllegalArgumentException
* if any of the given date specifiers is invalid
* or any of the calendar fields are inconsistent
* with the given date specifiers in non-lenient mode
- * @exception UnsupportedOperationException
+ * @throws UnsupportedOperationException
* if any week year numbering isn't supported in this
* {@code Calendar}.
* @see #isWeekDateSupported()
* @see #getFirstDayOfWeek()
* @see #getMinimalDaysInFirstWeek()
@@ -3108,11 +3108,11 @@
*
* <p>The default implementation of this method throws an
* {@code UnsupportedOperationException}.
*
* @return the number of weeks in the week year.
- * @exception UnsupportedOperationException
+ * @throws UnsupportedOperationException
* if any week year numbering isn't supported in this
* {@code Calendar}.
* @see #WEEK_OF_YEAR
* @see #isWeekDateSupported()
* @see #getWeekYear()
@@ -3349,11 +3349,11 @@
/**
* Returns the name of the specified calendar field.
*
* @param field the calendar field
* @return the calendar field name
- * @exception IndexOutOfBoundsException if <code>field</code> is negative,
+ * @throws IndexOutOfBoundsException if <code>field</code> is negative,
* equal to or greater than {@code FIELD_COUNT}.
*/
static String getFieldName(int field) {
return FIELD_NAME[field];
}
< prev index next >