commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [02/10] [math] Remove redundant type arguments.
Date Tue, 20 Sep 2016 17:37:17 GMT
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
index d79a19f..80b6828 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
@@ -151,8 +151,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
             y0[i] = field.getOne().add(i);
         }
 
-        FieldODEStateAndDerivative<T> result = integrator.integrate(new FieldExpandableODE<T>(ode),
-                                                                    new FieldODEState<T>(t0, y0),
+        FieldODEStateAndDerivative<T> result = integrator.integrate(new FieldExpandableODE<>(ode),
+                                                                    new FieldODEState<>(t0, y0),
                                                                     tEvent);
         Assert.assertEquals(tEvent.getReal(), result.getTime().getReal(), epsilonT);
         T[] y = result.getState();
@@ -180,8 +180,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
                 return Action.CONTINUE;
             }
         }, Double.POSITIVE_INFINITY, 1.0e-20, 100);
-        result = integrator.integrate(new FieldExpandableODE<T>(ode),
-                                      new FieldODEState<T>(t0, y0),
+        result = integrator.integrate(new FieldExpandableODE<>(ode),
+                                      new FieldODEState<>(t0, y0),
                                       tEvent.add(120));
         Assert.assertEquals(tEvent.add(120).getReal(), result.getTime().getReal(), epsilonT);
         y = result.getState();
@@ -201,17 +201,17 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
                MaxCountExceededException, NoBracketingException {
         RungeKuttaFieldIntegrator<T> integrator = createIntegrator(field, field.getZero().add(0.01));
         try  {
-            TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
-            integrator.integrate(new FieldExpandableODE<T>(pb),
-                                 new FieldODEState<T>(field.getZero(), MathArrays.buildArray(field, pb.getDimension() + 10)),
+            TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
+            integrator.integrate(new FieldExpandableODE<>(pb),
+                                 new FieldODEState<>(field.getZero(), MathArrays.buildArray(field, pb.getDimension() + 10)),
                                  field.getOne());
             Assert.fail("an exception should have been thrown");
         } catch(DimensionMismatchException ie) {
         }
         try  {
-            TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
-            integrator.integrate(new FieldExpandableODE<T>(pb),
-                                 new FieldODEState<T>(field.getZero(), MathArrays.buildArray(field, pb.getDimension())),
+            TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
+            integrator.integrate(new FieldExpandableODE<>(pb),
+                                 new FieldODEState<>(field.getZero(), MathArrays.buildArray(field, pb.getDimension())),
                                  field.getZero());
             Assert.fail("an exception should have been thrown");
         } catch(NumberIsTooSmallException ie) {
@@ -231,12 +231,12 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
         @SuppressWarnings("unchecked")
         TestFieldProblemAbstract<T>[] allProblems =
                         (TestFieldProblemAbstract<T>[]) Array.newInstance(TestFieldProblemAbstract.class, 6);
-        allProblems[0] = new TestFieldProblem1<T>(field);
-        allProblems[1] = new TestFieldProblem2<T>(field);
-        allProblems[2] = new TestFieldProblem3<T>(field);
-        allProblems[3] = new TestFieldProblem4<T>(field);
-        allProblems[4] = new TestFieldProblem5<T>(field);
-        allProblems[5] = new TestFieldProblem6<T>(field);
+        allProblems[0] = new TestFieldProblem1<>(field);
+        allProblems[1] = new TestFieldProblem2<>(field);
+        allProblems[2] = new TestFieldProblem3<>(field);
+        allProblems[3] = new TestFieldProblem4<>(field);
+        allProblems[4] = new TestFieldProblem5<>(field);
+        allProblems[5] = new TestFieldProblem6<>(field);
         for (TestFieldProblemAbstract<T> pb :  allProblems) {
 
             T previousValueError = null;
@@ -246,7 +246,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
                 T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(FastMath.pow(2.0, -i));
 
                 RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-                TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+                TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
                 integ.addStepHandler(handler);
                 FieldEventHandler<T>[] functions = pb.getEventsHandlers();
                 for (int l = 0; l < functions.length; ++l) {
@@ -254,7 +254,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
                                           Double.POSITIVE_INFINITY, 1.0e-6 * step.getReal(), 1000);
                 }
                 Assert.assertEquals(functions.length, integ.getEventHandlers().size());
-                FieldODEStateAndDerivative<T> stop = integ.integrate(new FieldExpandableODE<T>(pb),
+                FieldODEStateAndDerivative<T> stop = integ.integrate(new FieldExpandableODE<>(pb),
                                                                      pb.getInitialState(),
                                                                      pb.getFinalTime());
                 if (functions.length == 0) {
@@ -292,13 +292,13 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
          throws DimensionMismatchException, NumberIsTooSmallException,
                 MaxCountExceededException, NoBracketingException {
 
-        TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.001);
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
         Assert.assertEquals(0, handler.getLastError().getReal(),         epsilonLast);
         Assert.assertEquals(0, handler.getMaximalValueError().getReal(), epsilonMaxValue);
@@ -318,13 +318,13 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
         throws DimensionMismatchException, NumberIsTooSmallException,
                MaxCountExceededException, NoBracketingException {
 
-        TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.2);
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
         Assert.assertTrue(handler.getLastError().getReal()         > belowLast);
         Assert.assertTrue(handler.getMaximalValueError().getReal() > belowMaxValue);
@@ -344,13 +344,13 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
         throws DimensionMismatchException, NumberIsTooSmallException,
                MaxCountExceededException, NoBracketingException {
 
-        TestFieldProblem5<T> pb = new TestFieldProblem5<T>(field);
+        TestFieldProblem5<T> pb = new TestFieldProblem5<>(field);
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.001).abs();
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
         Assert.assertEquals(0, handler.getLastError().getReal(),         epsilonLast);
         Assert.assertEquals(0, handler.getMaximalValueError().getReal(), epsilonMaxValue);
@@ -366,12 +366,12 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
         throws DimensionMismatchException, NumberIsTooSmallException,
                MaxCountExceededException, NoBracketingException {
 
-        final TestFieldProblem3<T> pb  = new TestFieldProblem3<T>(field, field.getZero().add(0.9));
+        final TestFieldProblem3<T> pb  = new TestFieldProblem3<>(field, field.getZero().add(0.9));
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.0003);
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-        integ.addStepHandler(new KeplerHandler<T>(pb, expectedMaxError, epsilon));
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.addStepHandler(new KeplerHandler<>(pb, expectedMaxError, epsilon));
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
     }
 
     private static class KeplerHandler<T extends RealFieldElement<T>> implements FieldStepHandler<T> {
@@ -424,7 +424,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
             public void init(FieldODEStateAndDerivative<T> s0, T t) {
             }
         });
-        integ.integrate(new FieldExpandableODE<T>(new FirstOrderFieldDifferentialEquations<T>() {
+        integ.integrate(new FieldExpandableODE<>(new FirstOrderFieldDifferentialEquations<T>() {
             public void init(T t0, T[] y0, T t) {
             }
             public T[] computeDerivatives(T t, T[] y) {
@@ -435,7 +435,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
             public int getDimension() {
                 return 1;
             }
-        }), new FieldODEState<T>(field.getZero(), MathArrays.buildArray(field, 1)), field.getZero().add(5.0));
+        }), new FieldODEState<>(field.getZero(), MathArrays.buildArray(field, 1)), field.getZero().add(5.0));
     }
 
     @Test
@@ -443,7 +443,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
 
     protected <T extends RealFieldElement<T>> void doTestSingleStep(final Field<T> field, final double epsilon) {
 
-        final TestFieldProblem3<T> pb  = new TestFieldProblem3<T>(field, field.getZero().add(0.9));
+        final TestFieldProblem3<T> pb  = new TestFieldProblem3<>(field, field.getZero().add(0.9));
         T h = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.0003);
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, field.getZero().add(Double.NaN));
@@ -489,7 +489,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
 
         };
 
-        integ.integrate(new FieldExpandableODE<T>(equations), new FieldODEState<T>(t0, y0), t);
+        integ.integrate(new FieldExpandableODE<>(equations), new FieldODEState<>(t0, y0), t);
 
     }
 
@@ -497,14 +497,14 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
     public abstract void testUnstableDerivative();
 
     protected <T extends RealFieldElement<T>> void doTestUnstableDerivative(Field<T> field, double epsilon) {
-      final StepFieldProblem<T> stepProblem = new StepFieldProblem<T>(field,
+      final StepFieldProblem<T> stepProblem = new StepFieldProblem<>(field,
                                                                       field.getZero().add(0.0),
                                                                       field.getZero().add(1.0),
                                                                       field.getZero().add(2.0));
       RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, field.getZero().add(0.3));
       integ.addEventHandler(stepProblem, 1.0, 1.0e-12, 1000);
-      FieldODEStateAndDerivative<T> result = integ.integrate(new FieldExpandableODE<T>(stepProblem),
-                                                             new FieldODEState<T>(field.getZero(), MathArrays.buildArray(field, 1)),
+      FieldODEStateAndDerivative<T> result = integ.integrate(new FieldExpandableODE<>(stepProblem),
+                                                             new FieldODEState<>(field.getZero(), MathArrays.buildArray(field, 1)),
                                                              field.getZero().add(10.0));
       Assert.assertEquals(8.0, result.getState()[0].getReal(), epsilon);
     }
@@ -513,7 +513,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
     public abstract void testDerivativesConsistency();
 
     protected <T extends RealFieldElement<T>> void doTestDerivativesConsistency(final Field<T> field, double epsilon) {
-        TestFieldProblem3<T> pb = new TestFieldProblem3<T>(field);
+        TestFieldProblem3<T> pb = new TestFieldProblem3<>(field);
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.001);
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
         StepInterpolatorTestUtils.checkDerivativesConsistency(integ, pb, 1.0e-10);
@@ -546,8 +546,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest {
         RungeKuttaFieldIntegrator<DerivativeStructure> integrator =
                         createIntegrator(omega.getField(), t.subtract(t0).multiply(0.001));
         FieldODEStateAndDerivative<DerivativeStructure> result =
-                        integrator.integrate(new FieldExpandableODE<DerivativeStructure>(sinCos),
-                                             new FieldODEState<DerivativeStructure>(t0, y0),
+                        integrator.integrate(new FieldExpandableODE<>(sinCos),
+                                             new FieldODEState<>(t0, y0),
                                              t);
 
         // check values

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsBashforthFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsBashforthFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsBashforthFieldIntegratorTest.java
index ed69ccd..15d05a8 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsBashforthFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsBashforthFieldIntegratorTest.java
@@ -31,14 +31,14 @@ public class AdamsBashforthFieldIntegratorTest extends AdamsFieldIntegratorAbstr
     protected <T extends RealFieldElement<T>> AdamsFieldIntegrator<T>
     createIntegrator(Field<T> field, final int nSteps, final double minStep, final double maxStep,
                      final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
-        return new AdamsBashforthFieldIntegrator<T>(field, nSteps, minStep, maxStep,
+        return new AdamsBashforthFieldIntegrator<>(field, nSteps, minStep, maxStep,
                         scalAbsoluteTolerance, scalRelativeTolerance);
     }
 
     protected <T extends RealFieldElement<T>> AdamsFieldIntegrator<T>
     createIntegrator(Field<T> field, final int nSteps, final double minStep, final double maxStep,
                      final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
-        return new AdamsBashforthFieldIntegrator<T>(field, nSteps, minStep, maxStep,
+        return new AdamsBashforthFieldIntegrator<>(field, nSteps, minStep, maxStep,
                         vecAbsoluteTolerance, vecRelativeTolerance);
     }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldIntegratorAbstractTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldIntegratorAbstractTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldIntegratorAbstractTest.java
index 340dd48..1f786bc 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldIntegratorAbstractTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldIntegratorAbstractTest.java
@@ -54,7 +54,7 @@ public abstract class AdamsFieldIntegratorAbstractTest {
     public abstract void testMinStep();
 
     protected <T extends RealFieldElement<T>> void doDimensionCheck(final Field<T> field) {
-        TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
 
         double minStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.1).getReal();
         double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
@@ -64,9 +64,9 @@ public abstract class AdamsFieldIntegratorAbstractTest {
         FirstOrderFieldIntegrator<T> integ = createIntegrator(field, 4, minStep, maxStep,
                                                               vecAbsoluteTolerance,
                                                               vecRelativeTolerance);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
     }
 
@@ -78,7 +78,7 @@ public abstract class AdamsFieldIntegratorAbstractTest {
 
         int previousCalls = Integer.MAX_VALUE;
         for (int i = -12; i < -2; ++i) {
-            TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+            TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
             double minStep = 0;
             double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
             double scalAbsoluteTolerance = FastMath.pow(10.0, i);
@@ -87,9 +87,9 @@ public abstract class AdamsFieldIntegratorAbstractTest {
             FirstOrderFieldIntegrator<T> integ = createIntegrator(field, 4, minStep, maxStep,
                                                                   scalAbsoluteTolerance,
                                                                   scalRelativeTolerance);
-            TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+            TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
             integ.addStepHandler(handler);
-            integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+            integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
             Assert.assertTrue(handler.getMaximalValueError().getReal() > ratioMin * scalAbsoluteTolerance);
             Assert.assertTrue(handler.getMaximalValueError().getReal() < ratioMax * scalAbsoluteTolerance);
@@ -108,14 +108,14 @@ public abstract class AdamsFieldIntegratorAbstractTest {
 
     protected <T extends RealFieldElement<T>> void doExceedMaxEvaluations(final Field<T> field, final int max) {
 
-        TestFieldProblem1<T> pb  = new TestFieldProblem1<T>(field);
+        TestFieldProblem1<T> pb  = new TestFieldProblem1<>(field);
         double range = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
 
         FirstOrderFieldIntegrator<T> integ = createIntegrator(field, 2, 0, range, 1.0e-12, 1.0e-12);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
         integ.setMaxEvaluations(max);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
     }
 
@@ -128,13 +128,13 @@ public abstract class AdamsFieldIntegratorAbstractTest {
                                                               final double epsilonMaxTime,
                                                               final String name) {
 
-        TestFieldProblem5<T> pb = new TestFieldProblem5<T>(field);
+        TestFieldProblem5<T> pb = new TestFieldProblem5<>(field);
         double range = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
 
         AdamsFieldIntegrator<T> integ = createIntegrator(field, 4, 0, range, 1.0e-12, 1.0e-12);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
         Assert.assertEquals(0.0, handler.getLastError().getReal(), epsilonLast);
         Assert.assertEquals(0.0, handler.getMaximalValueError().getReal(), epsilonMaxValue);
@@ -149,15 +149,15 @@ public abstract class AdamsFieldIntegratorAbstractTest {
                                                                 final int nLimit,
                                                                 final double epsilonBad,
                                                                 final double epsilonGood) {
-        TestFieldProblem6<T> pb = new TestFieldProblem6<T>(field);
+        TestFieldProblem6<T> pb = new TestFieldProblem6<>(field);
         double range = pb.getFinalTime().subtract(pb.getInitialState().getTime()).abs().getReal();
 
         for (int nSteps = 2; nSteps < 8; ++nSteps) {
             AdamsFieldIntegrator<T> integ = createIntegrator(field, nSteps, 1.0e-6 * range, 0.1 * range, 1.0e-4, 1.0e-4);
-            integ.setStarterIntegrator(new PerfectStarter<T>(pb, nSteps));
-            TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+            integ.setStarterIntegrator(new PerfectStarter<>(pb, nSteps));
+            TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
             integ.addStepHandler(handler);
-            integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+            integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
             if (nSteps < nLimit) {
                 Assert.assertTrue(handler.getMaximalValueError().getReal() > epsilonBad);
             } else {
@@ -171,7 +171,7 @@ public abstract class AdamsFieldIntegratorAbstractTest {
     public abstract void testStartFailure();
 
     protected <T extends RealFieldElement<T>> void doTestStartFailure(final Field<T> field) {
-        TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
         double minStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.0001).getReal();
         double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
         double scalAbsoluteTolerance = 1.0e-6;
@@ -180,10 +180,10 @@ public abstract class AdamsFieldIntegratorAbstractTest {
         MultistepFieldIntegrator<T> integ = createIntegrator(field, 6, minStep, maxStep,
                                                              scalAbsoluteTolerance,
                                                              scalRelativeTolerance);
-        integ.setStarterIntegrator(new DormandPrince853FieldIntegrator<T>(field, maxStep * 0.5, maxStep, 0.1, 0.1));
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        integ.setStarterIntegrator(new DormandPrince853FieldIntegrator<>(field, maxStep * 0.5, maxStep, 0.1, 0.1));
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
     }
 
@@ -194,7 +194,7 @@ public abstract class AdamsFieldIntegratorAbstractTest {
 
         public PerfectStarter(final TestFieldProblemAbstract<T> problem, final int nbSteps) {
             super(problem.getField(), "perfect-starter");
-            this.interpolator = new PerfectInterpolator<T>(problem);
+            this.interpolator = new PerfectInterpolator<>(problem);
             this.nbSteps      = nbSteps;
         }
 
@@ -252,7 +252,7 @@ public abstract class AdamsFieldIntegratorAbstractTest {
         public FieldODEStateAndDerivative<T> getInterpolatedState(T time) {
             T[] y    = problem.computeTheoreticalState(time);
             T[] yDot = problem.computeDerivatives(time, y);
-            return new FieldODEStateAndDerivative<T>(time, y, yDot);
+            return new FieldODEStateAndDerivative<>(time, y, yDot);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegratorTest.java
index 51eb7ef..84a0f7d 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegratorTest.java
@@ -31,14 +31,14 @@ public class AdamsMoultonFieldIntegratorTest extends AdamsFieldIntegratorAbstrac
     protected <T extends RealFieldElement<T>> AdamsFieldIntegrator<T>
     createIntegrator(Field<T> field, final int nSteps, final double minStep, final double maxStep,
                      final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
-        return new AdamsMoultonFieldIntegrator<T>(field, nSteps, minStep, maxStep,
+        return new AdamsMoultonFieldIntegrator<>(field, nSteps, minStep, maxStep,
                         scalAbsoluteTolerance, scalRelativeTolerance);
     }
 
     protected <T extends RealFieldElement<T>> AdamsFieldIntegrator<T>
     createIntegrator(Field<T> field, final int nSteps, final double minStep, final double maxStep,
                      final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
-        return new AdamsMoultonFieldIntegrator<T>(field, nSteps, minStep, maxStep,
+        return new AdamsMoultonFieldIntegrator<>(field, nSteps, minStep, maxStep,
                         vecAbsoluteTolerance, vecRelativeTolerance);
     }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
index bbe30c2..f484baa 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class ClassicalRungKuttaFieldStepInterpolatorTest extends RungeKuttaField
                        FieldODEStateAndDerivative<T> softPreviousState,
                        FieldODEStateAndDerivative<T> softCurrentState,
                        FieldEquationsMapper<T> mapper) {
-        return new ClassicalRungeKuttaFieldStepInterpolator<T>(field, forward, yDotK,
+        return new ClassicalRungeKuttaFieldStepInterpolator<>(field, forward, yDotK,
                                                                globalPreviousState, globalCurrentState,
                                                                softPreviousState, softCurrentState,
                                                                mapper);
@@ -42,7 +42,7 @@ public class ClassicalRungKuttaFieldStepInterpolatorTest extends RungeKuttaField
 
     protected <T extends RealFieldElement<T>> FieldButcherArrayProvider<T>
     createButcherArrayProvider(final Field<T> field) {
-        return new ClassicalRungeKuttaFieldIntegrator<T>(field, field.getOne());
+        return new ClassicalRungeKuttaFieldIntegrator<>(field, field.getOne());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
index 3cd0e35..ebc9962 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
@@ -26,7 +26,7 @@ public class ClassicalRungeKuttaFieldIntegratorTest extends RungeKuttaFieldInteg
 
     protected <T extends RealFieldElement<T>> RungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, T step) {
-        return new ClassicalRungeKuttaFieldIntegrator<T>(field, step);
+        return new ClassicalRungeKuttaFieldIntegrator<>(field, step);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
index da90803..28267e0 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldIntegratorTest.java
@@ -27,13 +27,13 @@ public class DormandPrince54FieldIntegratorTest extends EmbeddedRungeKuttaFieldI
     protected <T extends RealFieldElement<T>> EmbeddedRungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, final double minStep, final double maxStep,
                      final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
-        return new DormandPrince54FieldIntegrator<T>(field, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
+        return new DormandPrince54FieldIntegrator<>(field, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
     }
 
     protected <T extends RealFieldElement<T>> EmbeddedRungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, final double minStep, final double maxStep,
                      final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
-        return new DormandPrince54FieldIntegrator<T>(field, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
+        return new DormandPrince54FieldIntegrator<>(field, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
index 9b6d607..b10501f 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54FieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class DormandPrince54FieldStepInterpolatorTest extends RungeKuttaFieldSte
                        FieldODEStateAndDerivative<T> softPreviousState,
                        FieldODEStateAndDerivative<T> softCurrentState,
                        FieldEquationsMapper<T> mapper) {
-        return new DormandPrince54FieldStepInterpolator<T>(field, forward, yDotK,
+        return new DormandPrince54FieldStepInterpolator<>(field, forward, yDotK,
                                                            globalPreviousState, globalCurrentState,
                                                            softPreviousState, softCurrentState,
                                                            mapper);
@@ -42,7 +42,7 @@ public class DormandPrince54FieldStepInterpolatorTest extends RungeKuttaFieldSte
 
     protected <T extends RealFieldElement<T>> FieldButcherArrayProvider<T>
     createButcherArrayProvider(final Field<T> field) {
-        return new DormandPrince54FieldIntegrator<T>(field, 0, 1, 1, 1);
+        return new DormandPrince54FieldIntegrator<>(field, 0, 1, 1, 1);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldIntegratorTest.java
index bc73968..258ccc7 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldIntegratorTest.java
@@ -27,13 +27,13 @@ public class DormandPrince853FieldIntegratorTest extends EmbeddedRungeKuttaField
     protected <T extends RealFieldElement<T>> EmbeddedRungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, final double minStep, final double maxStep,
                      final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
-        return new DormandPrince853FieldIntegrator<T>(field, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
+        return new DormandPrince853FieldIntegrator<>(field, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
     }
 
     protected <T extends RealFieldElement<T>> EmbeddedRungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, final double minStep, final double maxStep,
                      final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
-        return new DormandPrince853FieldIntegrator<T>(field, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
+        return new DormandPrince853FieldIntegrator<>(field, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolatorTest.java
index 5591b4d..69dbec4 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853FieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class DormandPrince853FieldStepInterpolatorTest extends RungeKuttaFieldSt
                        FieldODEStateAndDerivative<T> softPreviousState,
                        FieldODEStateAndDerivative<T> softCurrentState,
                        FieldEquationsMapper<T> mapper) {
-        return new DormandPrince853FieldStepInterpolator<T>(field, forward, yDotK,
+        return new DormandPrince853FieldStepInterpolator<>(field, forward, yDotK,
                                                             globalPreviousState, globalCurrentState,
                                                             softPreviousState, softCurrentState,
                                                             mapper);
@@ -42,7 +42,7 @@ public class DormandPrince853FieldStepInterpolatorTest extends RungeKuttaFieldSt
 
     protected <T extends RealFieldElement<T>> FieldButcherArrayProvider<T>
     createButcherArrayProvider(final Field<T> field) {
-        return new DormandPrince853FieldIntegrator<T>(field, 0, 1, 1, 1);
+        return new DormandPrince853FieldIntegrator<>(field, 0, 1, 1, 1);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/EmbeddedRungeKuttaFieldIntegratorAbstractTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/EmbeddedRungeKuttaFieldIntegratorAbstractTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/EmbeddedRungeKuttaFieldIntegratorAbstractTest.java
index 045e77d..edb9501 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/EmbeddedRungeKuttaFieldIntegratorAbstractTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/EmbeddedRungeKuttaFieldIntegratorAbstractTest.java
@@ -152,8 +152,8 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
         EmbeddedRungeKuttaFieldIntegrator<T> integrator = createIntegrator(field, 0.0, 1.0, 1.0e-10, 1.0e-10);
 
         try  {
-            integrator.integrate(new FieldExpandableODE<T>(equations),
-                                 new FieldODEState<T>(field.getOne().negate(),
+            integrator.integrate(new FieldExpandableODE<>(equations),
+                                 new FieldODEState<>(field.getOne().negate(),
                                                       MathArrays.buildArray(field, 1)),
                                  field.getZero());
             Assert.fail("an exception should have been thrown");
@@ -162,8 +162,8 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
           }
 
           try  {
-              integrator.integrate(new FieldExpandableODE<T>(equations),
-                                   new FieldODEState<T>(field.getZero(),
+              integrator.integrate(new FieldExpandableODE<>(equations),
+                                   new FieldODEState<>(field.getZero(),
                                                         MathArrays.buildArray(field, 1)),
                                    field.getOne());
                Assert.fail("an exception should have been thrown");
@@ -182,7 +182,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
     protected <T extends RealFieldElement<T>> void doTestMinStep(final Field<T> field)
         throws NumberIsTooSmallException {
 
-        TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
         double minStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.1).getReal();
         double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
         double[] vecAbsoluteTolerance = { 1.0e-15, 1.0e-16 };
@@ -190,9 +190,9 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
         FirstOrderFieldIntegrator<T> integ = createIntegrator(field, minStep, maxStep,
                                                               vecAbsoluteTolerance, vecRelativeTolerance);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
         Assert.fail("an exception should have been thrown");
 
     }
@@ -206,7 +206,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
         int previousCalls = Integer.MAX_VALUE;
         for (int i = -12; i < -2; ++i) {
-            TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+            TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
             double minStep = 0;
             double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
             double scalAbsoluteTolerance = FastMath.pow(10.0, i);
@@ -214,9 +214,9 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
             FirstOrderFieldIntegrator<T> integ = createIntegrator(field, minStep, maxStep,
                                                                   scalAbsoluteTolerance, scalRelativeTolerance);
-            TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+            TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
             integ.addStepHandler(handler);
-            integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+            integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
             Assert.assertTrue(handler.getMaximalValueError().getReal() < (factor * scalAbsoluteTolerance));
             Assert.assertEquals(0, handler.getMaximalTimeError().getReal(), epsilon);
@@ -237,7 +237,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
                                                                 final double epsilonMaxValue,
                                                                 final String name) {
 
-      TestFieldProblem4<T> pb = new TestFieldProblem4<T>(field);
+      TestFieldProblem4<T> pb = new TestFieldProblem4<>(field);
       double minStep = 0;
       double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
       double scalAbsoluteTolerance = 1.0e-8;
@@ -245,7 +245,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
       FirstOrderFieldIntegrator<T> integ = createIntegrator(field, minStep, maxStep,
                                                             scalAbsoluteTolerance, scalRelativeTolerance);
-      TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+      TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
       integ.addStepHandler(handler);
       FieldEventHandler<T>[] functions = pb.getEventsHandlers();
       double convergence = 1.0e-8 * maxStep;
@@ -253,7 +253,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
           integ.addEventHandler(functions[l], Double.POSITIVE_INFINITY, convergence, 1000);
       }
       Assert.assertEquals(functions.length, integ.getEventHandlers().size());
-      integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+      integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
       Assert.assertEquals(0, handler.getMaximalValueError().getReal(), epsilonMaxValue);
       Assert.assertEquals(0, handler.getMaximalTimeError().getReal(), convergence);
@@ -269,7 +269,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
     protected <T extends RealFieldElement<T>> void doTestEventsErrors(final Field<T> field)
         throws LocalException {
-        final TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        final TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
         double minStep = 0;
         double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
         double scalAbsoluteTolerance = 1.0e-8;
@@ -277,7 +277,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
         FirstOrderFieldIntegrator<T> integ = createIntegrator(field, minStep, maxStep,
                                                               scalAbsoluteTolerance, scalRelativeTolerance);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
 
         integ.addEventHandler(new FieldEventHandler<T>() {
@@ -299,7 +299,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
           }
         }, Double.POSITIVE_INFINITY, 1.0e-8 * maxStep, 1000);
 
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
     }
 
@@ -308,7 +308,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
     protected <T extends RealFieldElement<T>> void doTestEventsNoConvergence(final Field<T> field){
 
-        final TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        final TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
         double minStep = 0;
         double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
         double scalAbsoluteTolerance = 1.0e-8;
@@ -316,7 +316,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
         FirstOrderFieldIntegrator<T> integ = createIntegrator(field, minStep, maxStep,
                                                               scalAbsoluteTolerance, scalRelativeTolerance);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
 
         integ.addEventHandler(new FieldEventHandler<T>() {
@@ -336,7 +336,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
         }, Double.POSITIVE_INFINITY, 1.0e-8 * maxStep, 3);
 
         try {
-            integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+            integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
             Assert.fail("an exception should have been thrown");
         } catch (MaxCountExceededException mcee) {
             // Expected.
@@ -348,13 +348,13 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
     public abstract void testSanityChecks();
 
     protected <T extends RealFieldElement<T>> void doTestSanityChecks(Field<T> field) {
-        TestFieldProblem3<T> pb = new TestFieldProblem3<T>(field);
+        TestFieldProblem3<T> pb = new TestFieldProblem3<>(field);
         try  {
             EmbeddedRungeKuttaFieldIntegrator<T> integrator = createIntegrator(field, 0,
                                                                                pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal(),
                                                                                new double[4], new double[4]);
-            integrator.integrate(new FieldExpandableODE<T>(pb),
-                                 new FieldODEState<T>(pb.getInitialState().getTime(),
+            integrator.integrate(new FieldExpandableODE<>(pb),
+                                 new FieldODEState<>(pb.getInitialState().getTime(),
                                                       MathArrays.buildArray(field, 6)),
                                  pb.getFinalTime());
             Assert.fail("an exception should have been thrown");
@@ -365,7 +365,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
                             createIntegrator(field, 0,
                                              pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal(),
                                              new double[2], new double[4]);
-            integrator.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+            integrator.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
             Assert.fail("an exception should have been thrown");
         } catch(DimensionMismatchException ie) {
         }
@@ -374,7 +374,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
                             createIntegrator(field, 0,
                                              pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal(),
                                              new double[4], new double[4]);
-            integrator.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getInitialState().getTime());
+            integrator.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getInitialState().getTime());
             Assert.fail("an exception should have been thrown");
         } catch(NumberIsTooSmallException ie) {
         }
@@ -391,7 +391,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
         throws DimensionMismatchException, NumberIsTooSmallException,
                MaxCountExceededException, NoBracketingException {
 
-        TestFieldProblem5<T> pb = new TestFieldProblem5<T>(field);
+        TestFieldProblem5<T> pb = new TestFieldProblem5<>(field);
         double minStep = 0;
         double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).abs().getReal();
         double scalAbsoluteTolerance = 1.0e-8;
@@ -400,9 +400,9 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
         EmbeddedRungeKuttaFieldIntegrator<T> integ = createIntegrator(field, minStep, maxStep,
                                                                       scalAbsoluteTolerance,
                                                                       scalRelativeTolerance);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
         Assert.assertEquals(0, handler.getLastError().getReal(),         epsilonLast);
         Assert.assertEquals(0, handler.getMaximalValueError().getReal(), epsilonMaxValue);
@@ -416,7 +416,7 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
     protected <T extends RealFieldElement<T>> void doTestKepler(Field<T> field, double epsilon) {
 
-        final TestFieldProblem3<T> pb  = new TestFieldProblem3<T>(field, field.getZero().add(0.9));
+        final TestFieldProblem3<T> pb  = new TestFieldProblem3<>(field, field.getZero().add(0.9));
         double minStep = 0;
         double maxStep = pb.getFinalTime().subtract(pb.getInitialState().getTime()).getReal();
         double[] vecAbsoluteTolerance = { 1.0e-8, 1.0e-8, 1.0e-10, 1.0e-10 };
@@ -424,8 +424,8 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
 
         FirstOrderFieldIntegrator<T> integ = createIntegrator(field, minStep, maxStep,
                                                               vecAbsoluteTolerance, vecRelativeTolerance);
-        integ.addStepHandler(new KeplerHandler<T>(pb, epsilon));
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.addStepHandler(new KeplerHandler<>(pb, epsilon));
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
     }
 
     private static class KeplerHandler<T extends RealFieldElement<T>> implements FieldStepHandler<T> {
@@ -486,8 +486,8 @@ public abstract class EmbeddedRungeKuttaFieldIntegratorAbstractTest {
                                          t.subtract(t0).multiply(0.001).getReal(), t.subtract(t0).getReal(),
                                          1.0e-12, 1.0e-12);
         FieldODEStateAndDerivative<DerivativeStructure> result =
-                        integrator.integrate(new FieldExpandableODE<DerivativeStructure>(sinCos),
-                                             new FieldODEState<DerivativeStructure>(t0, y0),
+                        integrator.integrate(new FieldExpandableODE<>(sinCos),
+                                             new FieldODEState<>(t0, y0),
                                              t);
 
         // check values

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldIntegratorTest.java
index 9a48986..d492cab 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldIntegratorTest.java
@@ -26,7 +26,7 @@ public class EulerFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractT
 
     protected <T extends RealFieldElement<T>> RungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, T step) {
-        return new EulerFieldIntegrator<T>(field, step);
+        return new EulerFieldIntegrator<>(field, step);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolatorTest.java
index c5d1c3b..9f7f1ff 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/EulerFieldStepInterpolatorTest.java
@@ -33,7 +33,7 @@ public class EulerFieldStepInterpolatorTest extends RungeKuttaFieldStepInterpola
                        FieldODEStateAndDerivative<T> globalCurrentState,
                        FieldODEStateAndDerivative<T> softPreviousState,
                        FieldODEStateAndDerivative<T> softCurrentState, FieldEquationsMapper<T> mapper) {
-        return new EulerFieldStepInterpolator<T>(field, forward, yDotK,
+        return new EulerFieldStepInterpolator<>(field, forward, yDotK,
                                                  globalPreviousState, globalCurrentState,
                                                  softPreviousState, softCurrentState,
                                                  mapper);
@@ -41,7 +41,7 @@ public class EulerFieldStepInterpolatorTest extends RungeKuttaFieldStepInterpola
 
     protected <T extends RealFieldElement<T>> FieldButcherArrayProvider<T>
     createButcherArrayProvider(final Field<T> field) {
-        return new EulerFieldIntegrator<T>(field, field.getOne());
+        return new EulerFieldIntegrator<>(field, field.getOne());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldIntegratorTest.java
index 877321b..7100cbf 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldIntegratorTest.java
@@ -26,7 +26,7 @@ public class GillFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstractTe
 
     protected <T extends RealFieldElement<T>> RungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, T step) {
-        return new GillFieldIntegrator<T>(field, step);
+        return new GillFieldIntegrator<>(field, step);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolatorTest.java
index 87a9b10..3c7d21c 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/GillFieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class GillFieldStepInterpolatorTest extends RungeKuttaFieldStepInterpolat
                        FieldODEStateAndDerivative<T> softPreviousState,
                        FieldODEStateAndDerivative<T> softCurrentState,
                        FieldEquationsMapper<T> mapper) {
-        return new GillFieldStepInterpolator<T>(field, forward, yDotK,
+        return new GillFieldStepInterpolator<>(field, forward, yDotK,
                                                 globalPreviousState, globalCurrentState,
                                                 softPreviousState, softCurrentState,
                                                 mapper);
@@ -42,7 +42,7 @@ public class GillFieldStepInterpolatorTest extends RungeKuttaFieldStepInterpolat
 
     protected <T extends RealFieldElement<T>> FieldButcherArrayProvider<T>
     createButcherArrayProvider(final Field<T> field) {
-        return new GillFieldIntegrator<T>(field, field.getOne());
+        return new GillFieldIntegrator<>(field, field.getOne());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldIntegratorTest.java
index 0630fcc..6263e7c 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldIntegratorTest.java
@@ -27,13 +27,13 @@ public class HighamHall54FieldIntegratorTest extends EmbeddedRungeKuttaFieldInte
     protected <T extends RealFieldElement<T>> EmbeddedRungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, final double minStep, final double maxStep,
                      final double scalAbsoluteTolerance, final double scalRelativeTolerance) {
-        return new HighamHall54FieldIntegrator<T>(field, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
+        return new HighamHall54FieldIntegrator<>(field, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);
     }
 
     protected <T extends RealFieldElement<T>> EmbeddedRungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, final double minStep, final double maxStep,
                      final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) {
-        return new HighamHall54FieldIntegrator<T>(field, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
+        return new HighamHall54FieldIntegrator<>(field, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolatorTest.java
index 12c9473..7559e98 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/HighamHall54FieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class HighamHall54FieldStepInterpolatorTest extends RungeKuttaFieldStepIn
                        FieldODEStateAndDerivative<T> softPreviousState,
                        FieldODEStateAndDerivative<T> softCurrentState,
                        FieldEquationsMapper<T> mapper) {
-        return new HighamHall54FieldStepInterpolator<T>(field, forward, yDotK,
+        return new HighamHall54FieldStepInterpolator<>(field, forward, yDotK,
                                                         globalPreviousState, globalCurrentState,
                                                         softPreviousState, softCurrentState,
                                                         mapper);
@@ -42,7 +42,7 @@ public class HighamHall54FieldStepInterpolatorTest extends RungeKuttaFieldStepIn
 
     protected <T extends RealFieldElement<T>> FieldButcherArrayProvider<T>
     createButcherArrayProvider(final Field<T> field) {
-        return new HighamHall54FieldIntegrator<T>(field, 0, 1, 1, 1);
+        return new HighamHall54FieldIntegrator<>(field, 0, 1, 1, 1);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldIntegratorTest.java
index 9f459cf..31db176 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldIntegratorTest.java
@@ -30,7 +30,7 @@ public class LutherFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstract
 
     protected <T extends RealFieldElement<T>> RungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, T step) {
-        return new LutherFieldIntegrator<T>(field, step);
+        return new LutherFieldIntegrator<>(field, step);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolatorTest.java
index e35e1ec..1a0d5e2 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/LutherFieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class LutherFieldStepInterpolatorTest extends RungeKuttaFieldStepInterpol
                        FieldODEStateAndDerivative<T> softPreviousState,
                        FieldODEStateAndDerivative<T> softCurrentState,
                        FieldEquationsMapper<T> mapper) {
-        return new LutherFieldStepInterpolator<T>(field, forward, yDotK,
+        return new LutherFieldStepInterpolator<>(field, forward, yDotK,
                                                   globalPreviousState, globalCurrentState,
                                                   softPreviousState, softCurrentState,
                                                   mapper);
@@ -42,7 +42,7 @@ public class LutherFieldStepInterpolatorTest extends RungeKuttaFieldStepInterpol
 
     protected <T extends RealFieldElement<T>> FieldButcherArrayProvider<T>
     createButcherArrayProvider(final Field<T> field) {
-        return new LutherFieldIntegrator<T>(field, field.getOne());
+        return new LutherFieldIntegrator<>(field, field.getOne());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldIntegratorTest.java
index d983146..0f64075 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldIntegratorTest.java
@@ -26,7 +26,7 @@ public class MidpointFieldIntegratorTest extends RungeKuttaFieldIntegratorAbstra
 
     protected <T extends RealFieldElement<T>> RungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, T step) {
-        return new MidpointFieldIntegrator<T>(field, step);
+        return new MidpointFieldIntegrator<>(field, step);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolatorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolatorTest.java
index b1008e5..ef0aa9c 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolatorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/MidpointFieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class MidpointFieldStepInterpolatorTest extends RungeKuttaFieldStepInterp
                        FieldODEStateAndDerivative<T> softPreviousState,
                        FieldODEStateAndDerivative<T> softCurrentState,
                        FieldEquationsMapper<T> mapper) {
-        return new MidpointFieldStepInterpolator<T>(field, forward, yDotK,
+        return new MidpointFieldStepInterpolator<>(field, forward, yDotK,
                                                     globalPreviousState, globalCurrentState,
                                                     softPreviousState, softCurrentState,
                                                     mapper);
@@ -42,7 +42,7 @@ public class MidpointFieldStepInterpolatorTest extends RungeKuttaFieldStepInterp
 
     protected <T extends RealFieldElement<T>> FieldButcherArrayProvider<T>
     createButcherArrayProvider(final Field<T> field) {
-        return new MidpointFieldIntegrator<T>(field, field.getOne());
+        return new MidpointFieldIntegrator<>(field, field.getOne());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldIntegratorAbstractTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldIntegratorAbstractTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldIntegratorAbstractTest.java
index 788f732..a6d480c 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldIntegratorAbstractTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldIntegratorAbstractTest.java
@@ -151,8 +151,8 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
             y0[i] = field.getOne().add(i);
         }
 
-        FieldODEStateAndDerivative<T> result = integrator.integrate(new FieldExpandableODE<T>(ode),
-                                                                    new FieldODEState<T>(t0, y0),
+        FieldODEStateAndDerivative<T> result = integrator.integrate(new FieldExpandableODE<>(ode),
+                                                                    new FieldODEState<>(t0, y0),
                                                                     tEvent);
         Assert.assertEquals(tEvent.getReal(), result.getTime().getReal(), epsilonT);
         T[] y = result.getState();
@@ -180,8 +180,8 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
                 return Action.CONTINUE;
             }
         }, Double.POSITIVE_INFINITY, 1.0e-20, 100);
-        result = integrator.integrate(new FieldExpandableODE<T>(ode),
-                                      new FieldODEState<T>(t0, y0),
+        result = integrator.integrate(new FieldExpandableODE<>(ode),
+                                      new FieldODEState<>(t0, y0),
                                       tEvent.add(120));
         Assert.assertEquals(tEvent.add(120).getReal(), result.getTime().getReal(), epsilonT);
         y = result.getState();
@@ -201,17 +201,17 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
                MaxCountExceededException, NoBracketingException {
         RungeKuttaFieldIntegrator<T> integrator = createIntegrator(field, field.getZero().add(0.01));
         try  {
-            TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
-            integrator.integrate(new FieldExpandableODE<T>(pb),
-                                 new FieldODEState<T>(field.getZero(), MathArrays.buildArray(field, pb.getDimension() + 10)),
+            TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
+            integrator.integrate(new FieldExpandableODE<>(pb),
+                                 new FieldODEState<>(field.getZero(), MathArrays.buildArray(field, pb.getDimension() + 10)),
                                  field.getOne());
             Assert.fail("an exception should have been thrown");
         } catch(DimensionMismatchException ie) {
         }
         try  {
-            TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
-            integrator.integrate(new FieldExpandableODE<T>(pb),
-                                 new FieldODEState<T>(field.getZero(), MathArrays.buildArray(field, pb.getDimension())),
+            TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
+            integrator.integrate(new FieldExpandableODE<>(pb),
+                                 new FieldODEState<>(field.getZero(), MathArrays.buildArray(field, pb.getDimension())),
                                  field.getZero());
             Assert.fail("an exception should have been thrown");
         } catch(NumberIsTooSmallException ie) {
@@ -231,12 +231,12 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
         @SuppressWarnings("unchecked")
         TestFieldProblemAbstract<T>[] allProblems =
                         (TestFieldProblemAbstract<T>[]) Array.newInstance(TestFieldProblemAbstract.class, 6);
-        allProblems[0] = new TestFieldProblem1<T>(field);
-        allProblems[1] = new TestFieldProblem2<T>(field);
-        allProblems[2] = new TestFieldProblem3<T>(field);
-        allProblems[3] = new TestFieldProblem4<T>(field);
-        allProblems[4] = new TestFieldProblem5<T>(field);
-        allProblems[5] = new TestFieldProblem6<T>(field);
+        allProblems[0] = new TestFieldProblem1<>(field);
+        allProblems[1] = new TestFieldProblem2<>(field);
+        allProblems[2] = new TestFieldProblem3<>(field);
+        allProblems[3] = new TestFieldProblem4<>(field);
+        allProblems[4] = new TestFieldProblem5<>(field);
+        allProblems[5] = new TestFieldProblem6<>(field);
         for (TestFieldProblemAbstract<T> pb :  allProblems) {
 
             T previousValueError = null;
@@ -246,7 +246,7 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
                 T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(FastMath.pow(2.0, -i));
 
                 RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-                TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+                TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
                 integ.addStepHandler(handler);
                 FieldEventHandler<T>[] functions = pb.getEventsHandlers();
                 for (int l = 0; l < functions.length; ++l) {
@@ -254,7 +254,7 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
                                           Double.POSITIVE_INFINITY, 1.0e-6 * step.getReal(), 1000);
                 }
                 Assert.assertEquals(functions.length, integ.getEventHandlers().size());
-                FieldODEStateAndDerivative<T> stop = integ.integrate(new FieldExpandableODE<T>(pb),
+                FieldODEStateAndDerivative<T> stop = integ.integrate(new FieldExpandableODE<>(pb),
                                                                      pb.getInitialState(),
                                                                      pb.getFinalTime());
                 if (functions.length == 0) {
@@ -292,13 +292,13 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
          throws DimensionMismatchException, NumberIsTooSmallException,
                 MaxCountExceededException, NoBracketingException {
 
-        TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.001);
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
         Assert.assertEquals(0, handler.getLastError().getReal(),         epsilonLast);
         Assert.assertEquals(0, handler.getMaximalValueError().getReal(), epsilonMaxValue);
@@ -318,13 +318,13 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
         throws DimensionMismatchException, NumberIsTooSmallException,
                MaxCountExceededException, NoBracketingException {
 
-        TestFieldProblem1<T> pb = new TestFieldProblem1<T>(field);
+        TestFieldProblem1<T> pb = new TestFieldProblem1<>(field);
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.2);
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
         Assert.assertTrue(handler.getLastError().getReal()         > belowLast);
         Assert.assertTrue(handler.getMaximalValueError().getReal() > belowMaxValue);
@@ -344,13 +344,13 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
         throws DimensionMismatchException, NumberIsTooSmallException,
                MaxCountExceededException, NoBracketingException {
 
-        TestFieldProblem5<T> pb = new TestFieldProblem5<T>(field);
+        TestFieldProblem5<T> pb = new TestFieldProblem5<>(field);
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.001).abs();
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<T>(pb, integ);
+        TestFieldProblemHandler<T> handler = new TestFieldProblemHandler<>(pb, integ);
         integ.addStepHandler(handler);
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
 
         Assert.assertEquals(0, handler.getLastError().getReal(),         epsilonLast);
         Assert.assertEquals(0, handler.getMaximalValueError().getReal(), epsilonMaxValue);
@@ -366,12 +366,12 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
         throws DimensionMismatchException, NumberIsTooSmallException,
                MaxCountExceededException, NoBracketingException {
 
-        final TestFieldProblem3<T> pb  = new TestFieldProblem3<T>(field, field.getZero().add(0.9));
+        final TestFieldProblem3<T> pb  = new TestFieldProblem3<>(field, field.getZero().add(0.9));
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.0003);
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
-        integ.addStepHandler(new KeplerHandler<T>(pb, expectedMaxError, epsilon));
-        integ.integrate(new FieldExpandableODE<T>(pb), pb.getInitialState(), pb.getFinalTime());
+        integ.addStepHandler(new KeplerHandler<>(pb, expectedMaxError, epsilon));
+        integ.integrate(new FieldExpandableODE<>(pb), pb.getInitialState(), pb.getFinalTime());
     }
 
     private static class KeplerHandler<T extends RealFieldElement<T>> implements FieldStepHandler<T> {
@@ -424,7 +424,7 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
             public void init(FieldODEStateAndDerivative<T> s0, T t) {
             }
         });
-        integ.integrate(new FieldExpandableODE<T>(new FirstOrderFieldDifferentialEquations<T>() {
+        integ.integrate(new FieldExpandableODE<>(new FirstOrderFieldDifferentialEquations<T>() {
             public void init(T t0, T[] y0, T t) {
             }
             public T[] computeDerivatives(T t, T[] y) {
@@ -435,7 +435,7 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
             public int getDimension() {
                 return 1;
             }
-        }), new FieldODEState<T>(field.getZero(), MathArrays.buildArray(field, 1)), field.getZero().add(5.0));
+        }), new FieldODEState<>(field.getZero(), MathArrays.buildArray(field, 1)), field.getZero().add(5.0));
     }
 
     @Test
@@ -443,7 +443,7 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
 
     protected <T extends RealFieldElement<T>> void doTestSingleStep(final Field<T> field, final double epsilon) {
 
-        final TestFieldProblem3<T> pb  = new TestFieldProblem3<T>(field, field.getZero().add(0.9));
+        final TestFieldProblem3<T> pb  = new TestFieldProblem3<>(field, field.getZero().add(0.9));
         T h = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.0003);
 
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, field.getZero().add(Double.NaN));
@@ -489,7 +489,7 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
 
         };
 
-        integ.integrate(new FieldExpandableODE<T>(equations), new FieldODEState<T>(t0, y0), t);
+        integ.integrate(new FieldExpandableODE<>(equations), new FieldODEState<>(t0, y0), t);
 
     }
 
@@ -497,14 +497,14 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
     public abstract void testUnstableDerivative();
 
     protected <T extends RealFieldElement<T>> void doTestUnstableDerivative(Field<T> field, double epsilon) {
-      final StepFieldProblem<T> stepProblem = new StepFieldProblem<T>(field,
+      final StepFieldProblem<T> stepProblem = new StepFieldProblem<>(field,
                                                                       field.getZero().add(0.0),
                                                                       field.getZero().add(1.0),
                                                                       field.getZero().add(2.0));
       RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, field.getZero().add(0.3));
       integ.addEventHandler(stepProblem, 1.0, 1.0e-12, 1000);
-      FieldODEStateAndDerivative<T> result = integ.integrate(new FieldExpandableODE<T>(stepProblem),
-                                                             new FieldODEState<T>(field.getZero(), MathArrays.buildArray(field, 1)),
+      FieldODEStateAndDerivative<T> result = integ.integrate(new FieldExpandableODE<>(stepProblem),
+                                                             new FieldODEState<>(field.getZero(), MathArrays.buildArray(field, 1)),
                                                              field.getZero().add(10.0));
       Assert.assertEquals(8.0, result.getState()[0].getReal(), epsilon);
     }
@@ -513,7 +513,7 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
     public abstract void testDerivativesConsistency();
 
     protected <T extends RealFieldElement<T>> void doTestDerivativesConsistency(final Field<T> field, double epsilon) {
-        TestFieldProblem3<T> pb = new TestFieldProblem3<T>(field);
+        TestFieldProblem3<T> pb = new TestFieldProblem3<>(field);
         T step = pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(0.001);
         RungeKuttaFieldIntegrator<T> integ = createIntegrator(field, step);
         StepInterpolatorTestUtils.checkDerivativesConsistency(integ, pb, 1.0e-10);
@@ -546,8 +546,8 @@ public abstract class RungeKuttaFieldIntegratorAbstractTest {
         RungeKuttaFieldIntegrator<DerivativeStructure> integrator =
                         createIntegrator(omega.getField(), t.subtract(t0).multiply(0.001));
         FieldODEStateAndDerivative<DerivativeStructure> result =
-                        integrator.integrate(new FieldExpandableODE<DerivativeStructure>(sinCos),
-                                             new FieldODEState<DerivativeStructure>(t0, y0),
+                        integrator.integrate(new FieldExpandableODE<>(sinCos),
+                                             new FieldODEState<>(t0, y0),
                                              t);
 
         // check values

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolatorAbstractTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolatorAbstractTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolatorAbstractTest.java
index 0205a8d..ca77ac3 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolatorAbstractTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/RungeKuttaFieldStepInterpolatorAbstractTest.java
@@ -52,7 +52,7 @@ public abstract class RungeKuttaFieldStepInterpolatorAbstractTest {
     protected <T extends RealFieldElement<T>> void doInterpolationAtBounds(final Field<T> field, double epsilon) {
 
         RungeKuttaFieldStepInterpolator<T> interpolator = setUpInterpolator(field,
-                                                                            new SinCos<T>(field),
+                                                                            new SinCos<>(field),
                                                                             0.0, new double[] { 0.0, 1.0 }, 0.125);
 
         Assert.assertEquals(0.0, interpolator.getPreviousState().getTime().getReal(), 1.0e-15);
@@ -77,7 +77,7 @@ public abstract class RungeKuttaFieldStepInterpolatorAbstractTest {
                                                                          double epsilonSin, double epsilonCos) {
 
         RungeKuttaFieldStepInterpolator<T> interpolator = setUpInterpolator(field,
-                                                                            new SinCos<T>(field),
+                                                                            new SinCos<>(field),
                                                                             0.0, new double[] { 0.0, 1.0 }, 0.0125);
 
         int n = 100;
@@ -103,7 +103,7 @@ public abstract class RungeKuttaFieldStepInterpolatorAbstractTest {
                                                                                      double epsilonSin, double epsilonCos,
                                                                                      double epsilonSinDot, double epsilonCosDot) {
 
-        FirstOrderFieldDifferentialEquations<T> eqn = new SinCos<T>(field);
+        FirstOrderFieldDifferentialEquations<T> eqn = new SinCos<>(field);
         RungeKuttaFieldStepInterpolator<T> fieldInterpolator =
                         setUpInterpolator(field, eqn, 0.0, new double[] { 0.0, 1.0 }, 0.125);
         RungeKuttaStepInterpolator regularInterpolator = convertInterpolator(fieldInterpolator, eqn);
@@ -160,7 +160,7 @@ public abstract class RungeKuttaFieldStepInterpolatorAbstractTest {
             fieldY[i] = field.getZero().add(y0[i]);
         }
         fieldYDotK[0] = eqn.computeDerivatives(t, fieldY);
-        FieldODEStateAndDerivative<T> s0 = new FieldODEStateAndDerivative<T>(t, fieldY, fieldYDotK[0]);
+        FieldODEStateAndDerivative<T> s0 = new FieldODEStateAndDerivative<>(t, fieldY, fieldYDotK[0]);
 
         // perform one integration step, in order to get consistent derivatives
         T h = field.getZero().add(t1 - t0);
@@ -182,11 +182,11 @@ public abstract class RungeKuttaFieldStepInterpolatorAbstractTest {
                 fieldY[i] = fieldY[i].add(h.multiply(b[s].multiply(fieldYDotK[s][i])));
             }
         }
-        FieldODEStateAndDerivative<T> s1 = new FieldODEStateAndDerivative<T>(t, fieldY,
+        FieldODEStateAndDerivative<T> s1 = new FieldODEStateAndDerivative<>(t, fieldY,
                                                                              eqn.computeDerivatives(t, fieldY));
 
         return createInterpolator(field, t1 > t0, fieldYDotK, s0, s1, s0, s1,
-                                  new FieldExpandableODE<T>(eqn).getMapper());
+                                  new FieldExpandableODE<>(eqn).getMapper());
 
     }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldIntegratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldIntegratorTest.java b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldIntegratorTest.java
index fd481ba..1739a28 100644
--- a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldIntegratorTest.java
+++ b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldIntegratorTest.java
@@ -26,7 +26,7 @@ public class ThreeEighthesFieldIntegratorTest extends RungeKuttaFieldIntegratorA
 
     protected <T extends RealFieldElement<T>> RungeKuttaFieldIntegrator<T>
     createIntegrator(Field<T> field, T step) {
-        return new ThreeEighthesFieldIntegrator<T>(field, step);
+        return new ThreeEighthesFieldIntegrator<>(field, step);
     }
 
     @Override


Mime
View raw message