From 477a21f7f9b31c687d45f1001dd93c90df52cf29 Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Sun, 29 Aug 2004 17:28:09 +0000 Subject: AbstractCollection.java, [...]: Added additional exceptions to documentation... 2004-08-29 Andrew John Hughes * java/util/AbstractCollection.java, java/util/AbstractList.java, java/util/AbstractMap.java, java/util/AbstractSequentialList.java, java/util/ArrayList.java, java/util/Arrays.java, java/util/BitSet.java, java/util/Calendar.java, java/util/Collection.java, java/util/ListIterator.java, java/util/Map.java, java/util/SortedSet.java: Added additional exceptions to documentation, along with some additions and corrections. From-SVN: r86730 --- libjava/java/util/Calendar.java | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'libjava/java/util/Calendar.java') diff --git a/libjava/java/util/Calendar.java b/libjava/java/util/Calendar.java index b7ffb338106..05d48c2753c 100644 --- a/libjava/java/util/Calendar.java +++ b/libjava/java/util/Calendar.java @@ -585,7 +585,9 @@ public abstract class Calendar implements Serializable, Cloneable * if they are invalid. * @param field the time field. One of the time field constants. * @return the value of the specified field - * + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. * @specnote Not final since JDK 1.4 */ public int get(int field) @@ -603,6 +605,9 @@ public abstract class Calendar implements Serializable, Cloneable * @param field the time field. One of the time field constants. * @return the value of the specified field, undefined if * areFieldsSet or isSet[field] is false. + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. */ protected final int internalGet(int field) { @@ -614,7 +619,9 @@ public abstract class Calendar implements Serializable, Cloneable * the time in milliseconds. * @param field the time field. One of the time field constants * @param value the value to be set. - * + * @throws ArrayIndexOutOfBoundsException if field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. * @specnote Not final since JDK 1.4 */ public void set(int field, int value) @@ -718,6 +725,9 @@ public abstract class Calendar implements Serializable, Cloneable /** * Clears the values of the specified time field. * @param field the time field. One of the time field constants. + * @throws ArrayIndexOutOfBoundsException if field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. */ public final void clear(int field) { @@ -730,6 +740,9 @@ public abstract class Calendar implements Serializable, Cloneable /** * Determines if the specified field has a valid value. * @return true if the specified field has a value. + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. */ public final boolean isSet(int field) { @@ -803,6 +816,9 @@ public abstract class Calendar implements Serializable, Cloneable * it does what you expect: Jan, 25 + 10 Days is Feb, 4. * @param field the time field. One of the time field constants. * @param amount the amount of time. + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. */ public abstract void add(int field, int amount); @@ -817,6 +833,9 @@ public abstract class Calendar implements Serializable, Cloneable * The date June, 31 is automatically converted to July, 1. * @param field the time field. One of the time field constants. * @param up the direction, true for up, false for down. + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. */ public abstract void roll(int field, boolean up); @@ -830,6 +849,9 @@ public abstract class Calendar implements Serializable, Cloneable * @param field the time field. One of the time field constants. * @param amount the amount to roll by, positive for rolling up, * negative for rolling down. + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. * @since JDK1.2 */ public void roll(int field, int amount) @@ -965,6 +987,9 @@ public abstract class Calendar implements Serializable, Cloneable * This value is dependent on the values of the other fields. * @param field the time field. One of the time field constants. * @return the actual minimum value. + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. * @since jdk1.2 */ public int getActualMinimum(int field) @@ -988,6 +1013,9 @@ public abstract class Calendar implements Serializable, Cloneable * This value is dependent on the values of the other fields. * @param field the time field. One of the time field constants. * @return the actual maximum value. + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= FIELD_COUNT. * @since jdk1.2 */ public int getActualMaximum(int field) -- cgit v1.2.3