Reintroduced @Override as master needs at least Java 7.

This commit is contained in:
Luc Maisonobe 2016-01-06 13:40:45 +01:00
parent 6e4265d61c
commit 0aa826e84b
15 changed files with 31 additions and 0 deletions

View File

@ -108,26 +108,31 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public String getName() { public String getName() {
return name; return name;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void addStepHandler(final FieldStepHandler<T> handler) { public void addStepHandler(final FieldStepHandler<T> handler) {
stepHandlers.add(handler); stepHandlers.add(handler);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Collection<FieldStepHandler<T>> getStepHandlers() { public Collection<FieldStepHandler<T>> getStepHandlers() {
return Collections.unmodifiableCollection(stepHandlers); return Collections.unmodifiableCollection(stepHandlers);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void clearStepHandlers() { public void clearStepHandlers() {
stepHandlers.clear(); stepHandlers.clear();
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void addEventHandler(final FieldEventHandler<T> handler, public void addEventHandler(final FieldEventHandler<T> handler,
final double maxCheckInterval, final double maxCheckInterval,
final double convergence, final double convergence,
@ -141,6 +146,7 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void addEventHandler(final FieldEventHandler<T> handler, public void addEventHandler(final FieldEventHandler<T> handler,
final double maxCheckInterval, final double maxCheckInterval,
final double convergence, final double convergence,
@ -151,6 +157,7 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Collection<FieldEventHandler<T>> getEventHandlers() { public Collection<FieldEventHandler<T>> getEventHandlers() {
final List<FieldEventHandler<T>> list = new ArrayList<FieldEventHandler<T>>(eventsStates.size()); final List<FieldEventHandler<T>> list = new ArrayList<FieldEventHandler<T>>(eventsStates.size());
for (FieldEventState<T> state : eventsStates) { for (FieldEventState<T> state : eventsStates) {
@ -160,31 +167,37 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void clearEventHandlers() { public void clearEventHandlers() {
eventsStates.clear(); eventsStates.clear();
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public FieldODEStateAndDerivative<T> getCurrentStepStart() { public FieldODEStateAndDerivative<T> getCurrentStepStart() {
return stepStart; return stepStart;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public T getCurrentSignedStepsize() { public T getCurrentSignedStepsize() {
return stepSize; return stepSize;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void setMaxEvaluations(int maxEvaluations) { public void setMaxEvaluations(int maxEvaluations) {
evaluations = evaluations.withMaximalCount((maxEvaluations < 0) ? Integer.MAX_VALUE : maxEvaluations); evaluations = evaluations.withMaximalCount((maxEvaluations < 0) ? Integer.MAX_VALUE : maxEvaluations);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public int getMaxEvaluations() { public int getMaxEvaluations() {
return evaluations.getMaximalCount(); return evaluations.getMaximalCount();
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public int getEvaluations() { public int getEvaluations() {
return evaluations.getCount(); return evaluations.getCount();
} }
@ -294,6 +307,7 @@ public abstract class AbstractFieldIntegrator<T extends RealFieldElement<T>> imp
SortedSet<FieldEventState<T>> occurringEvents = new TreeSet<FieldEventState<T>>(new Comparator<FieldEventState<T>>() { SortedSet<FieldEventState<T>> occurringEvents = new TreeSet<FieldEventState<T>>(new Comparator<FieldEventState<T>>() {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public int compare(FieldEventState<T> es0, FieldEventState<T> es1) { public int compare(FieldEventState<T> es0, FieldEventState<T> es1) {
return orderingSign * Double.compare(es0.getEventTime().getReal(), es1.getEventTime().getReal()); return orderingSign * Double.compare(es0.getEventTime().getReal(), es1.getEventTime().getReal());
} }

View File

@ -176,6 +176,7 @@ public class ContinuousOutputFieldModel<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void init(final FieldODEStateAndDerivative<T> initialState, final T t) { public void init(final FieldODEStateAndDerivative<T> initialState, final T t) {
initialTime = initialState.getTime(); initialTime = initialState.getTime();
finalTime = t; finalTime = t;

View File

@ -204,6 +204,7 @@ public class FieldEventState<T extends RealFieldElement<T>> {
final RealFieldUnivariateFunction<T> f = new RealFieldUnivariateFunction<T>() { final RealFieldUnivariateFunction<T> f = new RealFieldUnivariateFunction<T>() {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public T value(final T t) { public T value(final T t) {
return handler.g(interpolator.getInterpolatedState(t)); return handler.g(interpolator.getInterpolatedState(t));
} }

View File

@ -82,6 +82,7 @@ class ClassicalRungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected ClassicalRungeKuttaFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected ClassicalRungeKuttaFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -107,6 +107,7 @@ class DormandPrince54FieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected DormandPrince54FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected DormandPrince54FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -188,6 +188,7 @@ class DormandPrince853FieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected DormandPrince853FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected DormandPrince853FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -72,6 +72,7 @@ class EulerFieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected EulerFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected EulerFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -90,6 +90,7 @@ class GillFieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected GillFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected GillFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -58,6 +58,7 @@ class HighamHall54FieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected HighamHall54FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected HighamHall54FieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -118,6 +118,7 @@ class LutherFieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected LutherFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected LutherFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -74,6 +74,7 @@ class MidpointFieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected MidpointFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected MidpointFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -69,6 +69,7 @@ abstract class RungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected RungeKuttaFieldStepInterpolator<T> create(boolean newForward, protected RungeKuttaFieldStepInterpolator<T> create(boolean newForward,
FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalPreviousState,
FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -84,6 +84,7 @@ class ThreeEighthesFieldStepInterpolator<T extends RealFieldElement<T>>
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected ThreeEighthesFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, protected ThreeEighthesFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK,
final FieldODEStateAndDerivative<T> newGlobalPreviousState, final FieldODEStateAndDerivative<T> newGlobalPreviousState,
final FieldODEStateAndDerivative<T> newGlobalCurrentState, final FieldODEStateAndDerivative<T> newGlobalCurrentState,

View File

@ -128,16 +128,19 @@ public abstract class AbstractFieldStepInterpolator<T extends RealFieldElement<T
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public FieldODEStateAndDerivative<T> getPreviousState() { public FieldODEStateAndDerivative<T> getPreviousState() {
return softPreviousState; return softPreviousState;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public FieldODEStateAndDerivative<T> getCurrentState() { public FieldODEStateAndDerivative<T> getCurrentState() {
return softCurrentState; return softCurrentState;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public FieldODEStateAndDerivative<T> getInterpolatedState(final T time) { public FieldODEStateAndDerivative<T> getInterpolatedState(final T time) {
final T thetaH = time.subtract(globalPreviousState.getTime()); final T thetaH = time.subtract(globalPreviousState.getTime());
final T oneMinusThetaH = globalCurrentState.getTime().subtract(time); final T oneMinusThetaH = globalCurrentState.getTime().subtract(time);
@ -146,6 +149,7 @@ public abstract class AbstractFieldStepInterpolator<T extends RealFieldElement<T
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public boolean isForward() { public boolean isForward() {
return forward; return forward;
} }

View File

@ -168,6 +168,7 @@ public class FieldStepNormalizer<T extends RealFieldElement<T>> implements Field
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void init(final FieldODEStateAndDerivative<T> initialState, final T finalTime) { public void init(final FieldODEStateAndDerivative<T> initialState, final T finalTime) {
first = null; first = null;