diff options
Diffstat (limited to 'libjava/java/util/Calendar.java')
-rw-r--r-- | libjava/java/util/Calendar.java | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/libjava/java/util/Calendar.java b/libjava/java/util/Calendar.java index b7ffb33..05d48c2 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 + * <= <code>FIELD_COUNT</code>. * @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 * <code>areFieldsSet</code> or <code>isSet[field]</code> is false. + * @throws ArrayIndexOutOfBoundsException if the field is outside + * the valid range. The value of field must be >= 0 and + * <= <code>FIELD_COUNT</code>. */ 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 + * <= <code>FIELD_COUNT</code>. * @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 + * <= <code>FIELD_COUNT</code>. */ 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 + * <= <code>FIELD_COUNT</code>. */ 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 + * <= <code>FIELD_COUNT</code>. */ 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 + * <= <code>FIELD_COUNT</code>. */ 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 + * <= <code>FIELD_COUNT</code>. * @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 + * <= <code>FIELD_COUNT</code>. * @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 + * <= <code>FIELD_COUNT</code>. * @since jdk1.2 */ public int getActualMaximum(int field) |