From b4681e50fff0e6628a3a816de8029a57759a3e71 Mon Sep 17 00:00:00 2001
From: Luc Maisonobe
Date: Sat, 2 Oct 2010 21:28:56 +0000
Subject: [PATCH] backported part of r1003351 from trunk to branch 2.X Add
missing @Override marker
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003892 13f79535-47bb-0310-9956-ffa450edef68
---
.../SmoothingPolynomialBicubicSplineInterpolator.java | 1 +
src/main/java/org/apache/commons/math/dfp/DfpDec.java | 10 ++++++++++
.../commons/math/exception/util/DummyLocalizable.java | 1 +
.../general/AbstractScalarDifferentiableOptimizer.java | 1 +
.../org/apache/commons/math/random/AbstractWell.java | 4 ++++
.../java/org/apache/commons/math/random/Well1024a.java | 1 +
.../org/apache/commons/math/random/Well19937a.java | 1 +
.../org/apache/commons/math/random/Well19937c.java | 1 +
.../org/apache/commons/math/random/Well44497a.java | 1 +
.../org/apache/commons/math/random/Well44497b.java | 1 +
.../java/org/apache/commons/math/random/Well512a.java | 1 +
.../commons/math/util/MultidimensionalCounter.java | 1 +
.../java/org/apache/commons/math/dfp/Decimal10.java | 9 +++++++++
13 files changed, 33 insertions(+)
diff --git a/src/main/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolator.java b/src/main/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolator.java
index 5a33920ee..b85a53b06 100644
--- a/src/main/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolator.java
+++ b/src/main/java/org/apache/commons/math/analysis/interpolation/SmoothingPolynomialBicubicSplineInterpolator.java
@@ -70,6 +70,7 @@ public class SmoothingPolynomialBicubicSplineInterpolator
/**
* {@inheritDoc}
*/
+ @Override
public BicubicSplineInterpolatingFunction interpolate(final double[] xval,
final double[] yval,
final double[][] fval)
diff --git a/src/main/java/org/apache/commons/math/dfp/DfpDec.java b/src/main/java/org/apache/commons/math/dfp/DfpDec.java
index 1639dcb15..78be1a9fd 100644
--- a/src/main/java/org/apache/commons/math/dfp/DfpDec.java
+++ b/src/main/java/org/apache/commons/math/dfp/DfpDec.java
@@ -94,31 +94,37 @@ public class DfpDec extends Dfp {
}
/** {@inheritDoc} */
+ @Override
public Dfp newInstance() {
return new DfpDec(getField());
}
/** {@inheritDoc} */
+ @Override
public Dfp newInstance(final byte x) {
return new DfpDec(getField(), x);
}
/** {@inheritDoc} */
+ @Override
public Dfp newInstance(final int x) {
return new DfpDec(getField(), x);
}
/** {@inheritDoc} */
+ @Override
public Dfp newInstance(final long x) {
return new DfpDec(getField(), x);
}
/** {@inheritDoc} */
+ @Override
public Dfp newInstance(final double x) {
return new DfpDec(getField(), x);
}
/** {@inheritDoc} */
+ @Override
public Dfp newInstance(final Dfp d) {
// make sure we don't mix number with different precision
@@ -134,11 +140,13 @@ public class DfpDec extends Dfp {
}
/** {@inheritDoc} */
+ @Override
public Dfp newInstance(final String s) {
return new DfpDec(getField(), s);
}
/** {@inheritDoc} */
+ @Override
public Dfp newInstance(final byte sign, final byte nans) {
return new DfpDec(getField(), sign, nans);
}
@@ -153,6 +161,7 @@ public class DfpDec extends Dfp {
}
/** {@inheritDoc} */
+ @Override
protected int round(int in) {
int msb = mant[mant.length-1];
@@ -280,6 +289,7 @@ public class DfpDec extends Dfp {
}
/** {@inheritDoc} */
+ @Override
public Dfp nextAfter(Dfp x) {
final String trapName = "nextAfter";
diff --git a/src/main/java/org/apache/commons/math/exception/util/DummyLocalizable.java b/src/main/java/org/apache/commons/math/exception/util/DummyLocalizable.java
index 3e8a06d37..d7860e011 100644
--- a/src/main/java/org/apache/commons/math/exception/util/DummyLocalizable.java
+++ b/src/main/java/org/apache/commons/math/exception/util/DummyLocalizable.java
@@ -50,6 +50,7 @@ public class DummyLocalizable implements Localizable {
}
/** {@inheritDoc} */
+ @Override
public String toString() {
return source;
}
diff --git a/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java b/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
index 6685589e4..093a545c1 100644
--- a/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
+++ b/src/main/java/org/apache/commons/math/optimization/general/AbstractScalarDifferentiableOptimizer.java
@@ -98,6 +98,7 @@ public abstract class AbstractScalarDifferentiableOptimizer
}
/** {@inheritDoc} */
+ @Override
public RealPointValuePair optimize(final DifferentiableMultivariateRealFunction f,
final GoalType goalType,
final double[] startPoint)
diff --git a/src/main/java/org/apache/commons/math/random/AbstractWell.java b/src/main/java/org/apache/commons/math/random/AbstractWell.java
index 65e5a0acd..4a90d37b6 100644
--- a/src/main/java/org/apache/commons/math/random/AbstractWell.java
+++ b/src/main/java/org/apache/commons/math/random/AbstractWell.java
@@ -137,6 +137,7 @@ public abstract class AbstractWell extends BitsStreamGenerator implements Serial
* generator built with the same seed.
* @param seed the initial seed (32 bits integer)
*/
+ @Override
public void setSeed(final int seed) {
setSeed(new int[] { seed });
}
@@ -147,6 +148,7 @@ public abstract class AbstractWell extends BitsStreamGenerator implements Serial
* @param seed the initial seed (32 bits integers array), if null
* the seed of the generator will be related to the current time
*/
+ @Override
public void setSeed(final int[] seed) {
if (seed == null) {
@@ -172,11 +174,13 @@ public abstract class AbstractWell extends BitsStreamGenerator implements Serial
* generator built with the same seed.
* @param seed the initial seed (64 bits integer)
*/
+ @Override
public void setSeed(final long seed) {
setSeed(new int[] { (int) (seed >>> 32), (int) (seed & 0xffffffffl) });
}
/** {@inheritDoc} */
+ @Override
protected abstract int next(final int bits);
}
diff --git a/src/main/java/org/apache/commons/math/random/Well1024a.java b/src/main/java/org/apache/commons/math/random/Well1024a.java
index 250e79e03..ccf92dafa 100644
--- a/src/main/java/org/apache/commons/math/random/Well1024a.java
+++ b/src/main/java/org/apache/commons/math/random/Well1024a.java
@@ -80,6 +80,7 @@ public class Well1024a extends AbstractWell {
}
/** {@inheritDoc} */
+ @Override
protected int next(final int bits) {
final int indexRm1 = iRm1[index];
diff --git a/src/main/java/org/apache/commons/math/random/Well19937a.java b/src/main/java/org/apache/commons/math/random/Well19937a.java
index c5c32f606..6622f1c3a 100644
--- a/src/main/java/org/apache/commons/math/random/Well19937a.java
+++ b/src/main/java/org/apache/commons/math/random/Well19937a.java
@@ -80,6 +80,7 @@ public class Well19937a extends AbstractWell {
}
/** {@inheritDoc} */
+ @Override
protected int next(final int bits) {
final int indexRm1 = iRm1[index];
diff --git a/src/main/java/org/apache/commons/math/random/Well19937c.java b/src/main/java/org/apache/commons/math/random/Well19937c.java
index 7731c1f13..f1d828967 100644
--- a/src/main/java/org/apache/commons/math/random/Well19937c.java
+++ b/src/main/java/org/apache/commons/math/random/Well19937c.java
@@ -80,6 +80,7 @@ public class Well19937c extends AbstractWell {
}
/** {@inheritDoc} */
+ @Override
protected int next(final int bits) {
final int indexRm1 = iRm1[index];
diff --git a/src/main/java/org/apache/commons/math/random/Well44497a.java b/src/main/java/org/apache/commons/math/random/Well44497a.java
index dfe75de4f..1247aad94 100644
--- a/src/main/java/org/apache/commons/math/random/Well44497a.java
+++ b/src/main/java/org/apache/commons/math/random/Well44497a.java
@@ -80,6 +80,7 @@ public class Well44497a extends AbstractWell {
}
/** {@inheritDoc} */
+ @Override
protected int next(final int bits) {
final int indexRm1 = iRm1[index];
diff --git a/src/main/java/org/apache/commons/math/random/Well44497b.java b/src/main/java/org/apache/commons/math/random/Well44497b.java
index a1456dbd1..69024344d 100644
--- a/src/main/java/org/apache/commons/math/random/Well44497b.java
+++ b/src/main/java/org/apache/commons/math/random/Well44497b.java
@@ -80,6 +80,7 @@ public class Well44497b extends AbstractWell {
}
/** {@inheritDoc} */
+ @Override
protected int next(final int bits) {
// compute raw value given by WELL44497a generator
diff --git a/src/main/java/org/apache/commons/math/random/Well512a.java b/src/main/java/org/apache/commons/math/random/Well512a.java
index 651b9158d..b6c23a7f8 100644
--- a/src/main/java/org/apache/commons/math/random/Well512a.java
+++ b/src/main/java/org/apache/commons/math/random/Well512a.java
@@ -80,6 +80,7 @@ public class Well512a extends AbstractWell {
}
/** {@inheritDoc} */
+ @Override
protected int next(final int bits) {
final int indexRm1 = iRm1[index];
diff --git a/src/main/java/org/apache/commons/math/util/MultidimensionalCounter.java b/src/main/java/org/apache/commons/math/util/MultidimensionalCounter.java
index df5a7ddfd..28f673b27 100644
--- a/src/main/java/org/apache/commons/math/util/MultidimensionalCounter.java
+++ b/src/main/java/org/apache/commons/math/util/MultidimensionalCounter.java
@@ -292,6 +292,7 @@ public class MultidimensionalCounter implements Iterable {
/**
* {@inheritDoc}
*/
+ @Override
public String toString() {
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < dimension; i++) {
diff --git a/src/test/java/org/apache/commons/math/dfp/Decimal10.java b/src/test/java/org/apache/commons/math/dfp/Decimal10.java
index 68cb19e4e..f86c05985 100644
--- a/src/test/java/org/apache/commons/math/dfp/Decimal10.java
+++ b/src/test/java/org/apache/commons/math/dfp/Decimal10.java
@@ -51,38 +51,47 @@ public class Decimal10 extends DfpDec {
super(factory, sign, nans);
}
+ @Override
public Dfp newInstance() {
return new Decimal10(getField());
}
+ @Override
public Dfp newInstance(final byte x) {
return new Decimal10(getField(), x);
}
+ @Override
public Dfp newInstance(final int x) {
return new Decimal10(getField(), x);
}
+ @Override
public Dfp newInstance(final long x) {
return new Decimal10(getField(), x);
}
+ @Override
public Dfp newInstance(final double x) {
return new Decimal10(getField(), x);
}
+ @Override
public Dfp newInstance(final Dfp d) {
return new Decimal10(d);
}
+ @Override
public Dfp newInstance(final String s) {
return new Decimal10(getField(), s);
}
+ @Override
public Dfp newInstance(final byte sign, final byte nans) {
return new Decimal10(getField(), sign, nans);
}
+ @Override
protected int getDecimalDigits() {
return 10;
}