Author: celestin Date: Thu Sep 13 06:10:06 2012 New Revision: 1384211 URL: http://svn.apache.org/viewvc?rev=1384211&view=rev Log: MATH-854: in interface FieldVector, some more exceptions are *documented* (as recommendations), but not *specified*.
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldVector.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldVector.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldVector.java?rev=1384211&r1=1384210&r2=1384211&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldVector.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldVector.java Thu Sep 13 06:10:06 2012 @@ -78,45 +78,63 @@ public interface FieldVector<T extends F FieldVector<T> subtract(FieldVector<T> v); /** - * Map an addition operation to each entry. + * Map an addition operation to each entry. Implementations should throw + * {@link org.apache.commons.math3.exception.NullArgumentException} if + * {@code d} is {@code null}. + * * @param d value to be added to each entry * @return {@code this + d} */ FieldVector<T> mapAdd(T d); /** - * Map an addition operation to each entry. - * <p>The instance <strong>is</strong> changed by this method.</p> + * Map an addition operation to each entry. The instance <strong>is</strong> + * changed by this method. Implementations should throw + * {@link org.apache.commons.math3.exception.NullArgumentException} if + * {@code d} is {@code null}. + * * @param d value to be added to each entry * @return for convenience, return {@code this} */ FieldVector<T> mapAddToSelf(T d); /** - * Map a subtraction operation to each entry. + * Map a subtraction operation to each entry. Implementations should throw + * {@link org.apache.commons.math3.exception.NullArgumentException} if + * {@code d} is {@code null}. + * * @param d value to be subtracted to each entry * @return {@code this - d} */ FieldVector<T> mapSubtract(T d); /** - * Map a subtraction operation to each entry. - * <p>The instance <strong>is</strong> changed by this method.</p> + * Map a subtraction operation to each entry. The instance + * <strong>is</strong> changed by this method. Implementations should throw + * {@link org.apache.commons.math3.exception.NullArgumentException} if + * {@code d} is {@code null}. + * * @param d value to be subtracted to each entry * @return for convenience, return {@code this} */ FieldVector<T> mapSubtractToSelf(T d); /** - * Map a multiplication operation to each entry. + * Map a multiplication operation to each entry. Implementations should throw + * {@link org.apache.commons.math3.exception.NullArgumentException} if + * {@code d} is {@code null}. + * * @param d value to multiply all entries by * @return {@code this * d} */ FieldVector<T> mapMultiply(T d); /** - * Map a multiplication operation to each entry. - * <p>The instance <strong>is</strong> changed by this method.</p> + * Map a multiplication operation to each entry. The instance + * <strong>is</strong> changed by this method. Implementations should throw + * {@link org.apache.commons.math3.exception.NullArgumentException} if + * {@code d} is {@code null}. + * * @param d value to multiply all entries by * @return for convenience, return {@code this} */