Author: erans
Date: Wed Jan 12 12:35:38 2011
New Revision: 1058110
URL: http://svn.apache.org/viewvc?rev=1058110&view=rev
Log:
MATH-470
"Un-deprecate" unit test.
Javadoc clean up.
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=1058110&r1=1058109&r2=1058110&view=diff
==============================================================================
---
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
(original)
+++
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
Wed Jan 12 12:35:38 2011
@@ -519,14 +519,14 @@ public final class MathUtils {
}
/**
- * Returns true iff both arguments are null or have same dimensions and all
- * their elements are equal as defined by
+ * Returns {...@code true} iff both arguments are {...@code null} or have
same
+ * dimensions and all their elements are equal as defined by
* {...@link #equals(double,double) this method}.
*
- * @param x first array
- * @param y second array
- * @return true if the values are both null or have same dimension
- * and equal elements.
+ * @param x First array.
+ * @param y Second array.
+ * @return {...@code true} if the values are both {...@code null} or have
same
+ * dimension and equal elements.
*/
public static boolean equals(double[] x, double[] y) {
if ((x == null) || (y == null)) {
@@ -544,14 +544,14 @@ public final class MathUtils {
}
/**
- * Returns true iff both arguments are null or have same dimensions and all
- * their elements are equal as defined by
+ * Returns {...@code true} iff both arguments are {...@code null} or have
same
+ * dimensions and all their elements are equal as defined by
* {...@link #equalsIncludingNaN(double,double) this method}.
*
- * @param x first array
- * @param y second array
- * @return true if the values are both null or have same dimension and
- * equal elements
+ * @param x First array.
+ * @param y Second array.
+ * @return {...@code true} if the values are both {...@code null} or have
same
+ * dimension and equal elements.
*/
public static boolean equalsIncludingNaN(double[] x, double[] y) {
if ((x == null) || (y == null)) {
Modified:
commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java?rev=1058110&r1=1058109&r2=1058110&view=diff
==============================================================================
---
commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
(original)
+++
commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
Wed Jan 12 12:35:38 2011
@@ -439,11 +439,6 @@ public final class MathUtilsTest extends
assertFalse(MathUtils.equalsIncludingNaN(Double.NEGATIVE_INFINITY,
Double.POSITIVE_INFINITY, 100000));
}
- /**
- * @deprecated To be removed in release 3.0 (replaced by {...@link
- * #testArrayEqualsIncludingNaN()}.
- */
- @Deprecated
public void testArrayEquals() {
assertFalse(MathUtils.equals(new double[] { 1d }, null));
assertFalse(MathUtils.equals(null, new double[] { 1d }));