commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject [2/2] [math] Add missing @Override tags, use final for private fields where possible.
Date Tue, 10 Mar 2015 22:05:36 GMT
Add missing @Override tags, use final for private fields where possible.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/fbf5a51e
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/fbf5a51e
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/fbf5a51e

Branch: refs/heads/master
Commit: fbf5a51ea5f700be8d92a4485e468ebfb67cf310
Parents: 7c172a0
Author: Thomas Neidhart <thomas.neidhart@gmail.com>
Authored: Tue Mar 10 23:05:14 2015 +0100
Committer: Thomas Neidhart <thomas.neidhart@gmail.com>
Committed: Tue Mar 10 23:05:14 2015 +0100

----------------------------------------------------------------------
 .../math4/geometry/enclosing/WelzlEncloser.java |  1 +
 .../geometry/euclidean/oned/Euclidean1D.java    |  2 ++
 .../geometry/euclidean/oned/IntervalsSet.java   |  4 +++
 .../geometry/euclidean/oned/OrientedPoint.java  |  9 +++++-
 .../geometry/euclidean/threed/Euclidean3D.java  |  2 ++
 .../math4/geometry/euclidean/threed/Line.java   |  2 ++
 .../euclidean/threed/OutlineExtractor.java      |  9 ++++--
 .../math4/geometry/euclidean/threed/Plane.java  |  9 ++++++
 .../euclidean/threed/PolyhedronsSet.java        | 15 +++++++--
 .../euclidean/threed/SphereGenerator.java       |  1 +
 .../geometry/euclidean/twod/DiskGenerator.java  |  1 +
 .../geometry/euclidean/twod/Euclidean2D.java    |  2 ++
 .../math4/geometry/euclidean/twod/Line.java     | 32 ++++++++++++++------
 .../geometry/euclidean/twod/PolygonsSet.java    |  3 ++
 .../hull/AbstractConvexHullGenerator2D.java     |  1 +
 .../euclidean/twod/hull/ConvexHull2D.java       |  2 ++
 .../twod/hull/ConvexHullGenerator2D.java        |  1 +
 .../euclidean/twod/hull/MonotoneChain.java      |  1 +
 .../geometry/partitioning/AbstractRegion.java   | 19 ++++++++++++
 .../partitioning/AbstractSubHyperplane.java     |  7 +++++
 .../geometry/partitioning/BoundaryBuilder.java  |  3 ++
 .../partitioning/BoundaryProjector.java         |  3 ++
 .../partitioning/BoundarySizeVisitor.java       |  3 ++
 .../math4/geometry/partitioning/NodesSet.java   |  3 +-
 .../geometry/partitioning/RegionFactory.java    |  9 ++++++
 .../math4/geometry/spherical/oned/ArcsSet.java  |  4 +++
 .../geometry/spherical/oned/LimitAngle.java     | 11 +++++--
 .../math4/geometry/spherical/oned/S1Point.java  |  3 ++
 .../math4/geometry/spherical/oned/Sphere1D.java |  2 ++
 .../math4/geometry/spherical/twod/Circle.java   | 12 ++++++++
 .../geometry/spherical/twod/EdgesBuilder.java   |  3 ++
 .../spherical/twod/PropertiesComputer.java      |  3 ++
 .../math4/geometry/spherical/twod/S2Point.java  |  3 ++
 .../math4/geometry/spherical/twod/Sphere2D.java |  2 ++
 34 files changed, 167 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/enclosing/WelzlEncloser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/enclosing/WelzlEncloser.java b/src/main/java/org/apache/commons/math4/geometry/enclosing/WelzlEncloser.java
index 0891d99..9cd1112 100644
--- a/src/main/java/org/apache/commons/math4/geometry/enclosing/WelzlEncloser.java
+++ b/src/main/java/org/apache/commons/math4/geometry/enclosing/WelzlEncloser.java
@@ -58,6 +58,7 @@ public class WelzlEncloser<S extends Space, P extends Point<S>> implements Enclo
     }
 
     /** {@inheritDoc} */
+    @Override
     public EnclosingBall<S, P> enclose(final Iterable<P> points) {
 
         if (points == null || !points.iterator().hasNext()) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/Euclidean1D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/Euclidean1D.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/Euclidean1D.java
index 91610d9..91e97f5 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/Euclidean1D.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/Euclidean1D.java
@@ -45,6 +45,7 @@ public class Euclidean1D implements Serializable, Space {
     }
 
     /** {@inheritDoc} */
+    @Override
     public int getDimension() {
         return 1;
     }
@@ -57,6 +58,7 @@ public class Euclidean1D implements Serializable, Space {
      * @return nothing
      * @throws NoSubSpaceException in all cases
      */
+    @Override
     public Space getSubSpace() throws NoSubSpaceException {
         throw new NoSubSpaceException();
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/IntervalsSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/IntervalsSet.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/IntervalsSet.java
index e75c5a0..e8bd4d4 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/IntervalsSet.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/IntervalsSet.java
@@ -511,6 +511,7 @@ public class IntervalsSet extends AbstractRegion<Euclidean1D, Euclidean1D> imple
      * </p>
      * @since 3.3
      */
+    @Override
     public Iterator<double[]> iterator() {
         return new SubIntervalsIterator();
     }
@@ -599,11 +600,13 @@ public class IntervalsSet extends AbstractRegion<Euclidean1D, Euclidean1D> imple
         }
 
         /** {@inheritDoc} */
+        @Override
         public boolean hasNext() {
             return pending != null;
         }
 
         /** {@inheritDoc} */
+        @Override
         public double[] next() {
             if (pending == null) {
                 throw new NoSuchElementException();
@@ -614,6 +617,7 @@ public class IntervalsSet extends AbstractRegion<Euclidean1D, Euclidean1D> imple
         }
 
         /** {@inheritDoc} */
+        @Override
         public void remove() {
             throw new UnsupportedOperationException();
         }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/OrientedPoint.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/OrientedPoint.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/OrientedPoint.java
index 71c3333..93af5b8 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/OrientedPoint.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/oned/OrientedPoint.java
@@ -29,7 +29,7 @@ import org.apache.commons.math4.geometry.partitioning.Hyperplane;
 public class OrientedPoint implements Hyperplane<Euclidean1D> {
 
     /** Vector location. */
-    private Vector1D location;
+    private final Vector1D location;
 
     /** Orientation. */
     private boolean direct;
@@ -55,6 +55,7 @@ public class OrientedPoint implements Hyperplane<Euclidean1D> {
      * the instance.</p>
      * @return the instance itself
      */
+    @Override
     public OrientedPoint copySelf() {
         return this;
     }
@@ -68,6 +69,7 @@ public class OrientedPoint implements Hyperplane<Euclidean1D> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getOffset(final Point<Euclidean1D> point) {
         final double delta = ((Vector1D) point).getX() - location.getX();
         return direct ? delta : -delta;
@@ -84,6 +86,7 @@ public class OrientedPoint implements Hyperplane<Euclidean1D> {
      * <em>not</em> be used otherwise.</p>
      * @return a dummy sub hyperplane
      */
+    @Override
     public SubOrientedPoint wholeHyperplane() {
         return new SubOrientedPoint(this, null);
     }
@@ -92,11 +95,13 @@ public class OrientedPoint implements Hyperplane<Euclidean1D> {
      * @return a region containing the instance (really an {@link
      * IntervalsSet IntervalsSet} instance)
      */
+    @Override
     public IntervalsSet wholeSpace() {
         return new IntervalsSet(tolerance);
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean sameOrientationAs(final Hyperplane<Euclidean1D> other) {
         return !(direct ^ ((OrientedPoint) other).direct);
     }
@@ -104,6 +109,7 @@ public class OrientedPoint implements Hyperplane<Euclidean1D> {
     /** {@inheritDoc}
      * @since 3.3
      */
+    @Override
     public Point<Euclidean1D> project(Point<Euclidean1D> point) {
         return location;
     }
@@ -111,6 +117,7 @@ public class OrientedPoint implements Hyperplane<Euclidean1D> {
     /** {@inheritDoc}
      * @since 3.3
      */
+    @Override
     public double getTolerance() {
         return tolerance;
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Euclidean3D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Euclidean3D.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Euclidean3D.java
index 20138a7..cde306f 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Euclidean3D.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Euclidean3D.java
@@ -44,11 +44,13 @@ public class Euclidean3D implements Serializable, Space {
     }
 
     /** {@inheritDoc} */
+    @Override
     public int getDimension() {
         return 3;
     }
 
     /** {@inheritDoc} */
+    @Override
     public Euclidean2D getSubSpace() {
         return Euclidean2D.getInstance();
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Line.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Line.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Line.java
index d5ba1e9..3173ac2 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Line.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Line.java
@@ -159,6 +159,7 @@ public class Line implements Embedding<Euclidean3D, Euclidean1D> {
     /** {@inheritDoc}
      * @see #getAbscissa(Vector3D)
      */
+    @Override
     public Vector1D toSubSpace(final Point<Euclidean3D> point) {
         return new Vector1D(getAbscissa((Vector3D) point));
     }
@@ -166,6 +167,7 @@ public class Line implements Embedding<Euclidean3D, Euclidean1D> {
     /** {@inheritDoc}
      * @see #pointAt(double)
      */
+    @Override
     public Vector3D toSpace(final Point<Euclidean1D> point) {
         return pointAt(((Vector1D) point).getX());
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/OutlineExtractor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/OutlineExtractor.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/OutlineExtractor.java
index cd9c8b0..2e1bfb4 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/OutlineExtractor.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/OutlineExtractor.java
@@ -38,13 +38,13 @@ import org.apache.commons.math4.util.FastMath;
 public class OutlineExtractor {
 
     /** Abscissa axis of the projection plane. */
-    private Vector3D u;
+    private final Vector3D u;
 
     /** Ordinate axis of the projection plane. */
-    private Vector3D v;
+    private final Vector3D v;
 
     /** Normal of the projection plane (viewing direction). */
-    private Vector3D w;
+    private final Vector3D w;
 
     /** Build an extractor for a specific projection plane.
      * @param u abscissa axis of the projection point
@@ -136,11 +136,13 @@ public class OutlineExtractor {
         }
 
         /** {@inheritDoc} */
+        @Override
         public Order visitOrder(final BSPTree<Euclidean3D> node) {
             return Order.MINUS_SUB_PLUS;
         }
 
         /** {@inheritDoc} */
+        @Override
         public void visitInternalNode(final BSPTree<Euclidean3D> node) {
             @SuppressWarnings("unchecked")
             final BoundaryAttribute<Euclidean3D> attribute =
@@ -154,6 +156,7 @@ public class OutlineExtractor {
         }
 
         /** {@inheritDoc} */
+        @Override
         public void visitLeafNode(final BSPTree<Euclidean3D> node) {
         }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Plane.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Plane.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Plane.java
index 96e7155..b8f2fa6 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Plane.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/Plane.java
@@ -117,6 +117,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
      * shared (except for immutable objects).</p>
      * @return a new hyperplane, copy of the instance
      */
+    @Override
     public Plane copySelf() {
         return new Plane(this);
     }
@@ -215,6 +216,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
     /** {@inheritDoc}
      * @since 3.3
      */
+    @Override
     public Point<Euclidean3D> project(Point<Euclidean3D> point) {
         return toSpace(toSubSpace(point));
     }
@@ -222,6 +224,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
     /** {@inheritDoc}
      * @since 3.3
      */
+    @Override
     public double getTolerance() {
         return tolerance;
     }
@@ -270,6 +273,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
      * org.apache.commons.math4.geometry.euclidean.twod.Vector2D Vector2D} instance)
      * @see #toSpace
      */
+    @Override
     public Vector2D toSubSpace(final Point<Euclidean3D> point) {
         final Vector3D p3D = (Vector3D) point;
         return new Vector2D(p3D.dotProduct(u), p3D.dotProduct(v));
@@ -281,6 +285,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
      * @return 3D space point (really a {@link Vector3D Vector3D} instance)
      * @see #toSubSpace
      */
+    @Override
     public Vector3D toSpace(final Point<Euclidean2D> point) {
         final Vector2D p2D = (Vector2D) point;
         return new Vector3D(p2D.getX(), u, p2D.getY(), v, -originOffset, w);
@@ -422,6 +427,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
     /** Build a region covering the whole hyperplane.
      * @return a region covering the whole hyperplane
      */
+    @Override
     public SubPlane wholeHyperplane() {
         return new SubPlane(this, new PolygonsSet(tolerance));
     }
@@ -430,6 +436,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
      * @return a region containing the instance (really a {@link
      * PolyhedronsSet PolyhedronsSet} instance)
      */
+    @Override
     public PolyhedronsSet wholeSpace() {
         return new PolyhedronsSet(tolerance);
     }
@@ -472,6 +479,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
      * @param point point to check
      * @return offset of the point
      */
+    @Override
     public double getOffset(final Point<Euclidean3D> point) {
         return ((Vector3D) point).dotProduct(w) + originOffset;
     }
@@ -481,6 +489,7 @@ public class Plane implements Hyperplane<Euclidean3D>, Embedding<Euclidean3D, Eu
      * @return true if the instance and the other hyperplane have
      * the same orientation
      */
+    @Override
     public boolean sameOrientationAs(final Hyperplane<Euclidean3D> other) {
         return (((Plane) other).w).dotProduct(w) > 0.0;
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java
index 26b05d9..9c46ae3 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java
@@ -183,11 +183,13 @@ public class PolyhedronsSet extends AbstractRegion<Euclidean3D, Euclidean2D> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public Order visitOrder(final BSPTree<Euclidean3D> node) {
             return Order.MINUS_SUB_PLUS;
         }
 
         /** {@inheritDoc} */
+        @Override
         public void visitInternalNode(final BSPTree<Euclidean3D> node) {
             @SuppressWarnings("unchecked")
             final BoundaryAttribute<Euclidean3D> attribute =
@@ -201,6 +203,7 @@ public class PolyhedronsSet extends AbstractRegion<Euclidean3D, Euclidean2D> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public void visitLeafNode(final BSPTree<Euclidean3D> node) {
         }
 
@@ -345,10 +348,10 @@ public class PolyhedronsSet extends AbstractRegion<Euclidean3D, Euclidean2D> {
     private static class RotationTransform implements Transform<Euclidean3D, Euclidean2D> {
 
         /** Center point of the rotation. */
-        private Vector3D   center;
+        private final Vector3D   center;
 
         /** Vectorial rotation. */
-        private Rotation   rotation;
+        private final Rotation   rotation;
 
         /** Cached original hyperplane. */
         private Plane cachedOriginal;
@@ -366,17 +369,20 @@ public class PolyhedronsSet extends AbstractRegion<Euclidean3D, Euclidean2D> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public Vector3D apply(final Point<Euclidean3D> point) {
             final Vector3D delta = ((Vector3D) point).subtract(center);
             return new Vector3D(1.0, center, 1.0, rotation.applyTo(delta));
         }
 
         /** {@inheritDoc} */
+        @Override
         public Plane apply(final Hyperplane<Euclidean3D> hyperplane) {
             return ((Plane) hyperplane).rotate(center, rotation);
         }
 
         /** {@inheritDoc} */
+        @Override
         public SubHyperplane<Euclidean2D> apply(final SubHyperplane<Euclidean2D> sub,
                                                 final Hyperplane<Euclidean3D> original,
                                                 final Hyperplane<Euclidean3D> transformed) {
@@ -418,7 +424,7 @@ public class PolyhedronsSet extends AbstractRegion<Euclidean3D, Euclidean2D> {
     private static class TranslationTransform implements Transform<Euclidean3D, Euclidean2D> {
 
         /** Translation vector. */
-        private Vector3D   translation;
+        private final Vector3D   translation;
 
         /** Cached original hyperplane. */
         private Plane cachedOriginal;
@@ -434,16 +440,19 @@ public class PolyhedronsSet extends AbstractRegion<Euclidean3D, Euclidean2D> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public Vector3D apply(final Point<Euclidean3D> point) {
             return new Vector3D(1.0, (Vector3D) point, 1.0, translation);
         }
 
         /** {@inheritDoc} */
+        @Override
         public Plane apply(final Hyperplane<Euclidean3D> hyperplane) {
             return ((Plane) hyperplane).translate(translation);
         }
 
         /** {@inheritDoc} */
+        @Override
         public SubHyperplane<Euclidean2D> apply(final SubHyperplane<Euclidean2D> sub,
                                                 final Hyperplane<Euclidean3D> original,
                                                 final Hyperplane<Euclidean3D> transformed) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGenerator.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGenerator.java
index 9604b0d..f28a762 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGenerator.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGenerator.java
@@ -33,6 +33,7 @@ import org.apache.commons.math4.util.FastMath;
 public class SphereGenerator implements SupportBallGenerator<Euclidean3D, Vector3D> {
 
     /** {@inheritDoc} */
+    @Override
     public EnclosingBall<Euclidean3D, Vector3D> ballOnSupport(final List<Vector3D> support) {
 
         if (support.size() < 1) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGenerator.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGenerator.java
index 6ab1cfa..4cc3546 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGenerator.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGenerator.java
@@ -29,6 +29,7 @@ import org.apache.commons.math4.util.FastMath;
 public class DiskGenerator implements SupportBallGenerator<Euclidean2D, Vector2D> {
 
     /** {@inheritDoc} */
+    @Override
     public EnclosingBall<Euclidean2D, Vector2D> ballOnSupport(final List<Vector2D> support) {
 
         if (support.size() < 1) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Euclidean2D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Euclidean2D.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Euclidean2D.java
index 3e6aa3c..dc30c98 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Euclidean2D.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Euclidean2D.java
@@ -44,11 +44,13 @@ public class Euclidean2D implements Serializable, Space {
     }
 
     /** {@inheritDoc} */
+    @Override
     public int getDimension() {
         return 2;
     }
 
     /** {@inheritDoc} */
+    @Override
     public Euclidean1D getSubSpace() {
         return Euclidean1D.getInstance();
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java
index 00763de..3bfae8d 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/Line.java
@@ -136,6 +136,7 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
     }
 
     /** {@inheritDoc} */
+    @Override
     public Line copySelf() {
         return new Line(this);
     }
@@ -241,12 +242,14 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
     }
 
     /** {@inheritDoc} */
+    @Override
     public Vector1D toSubSpace(final Point<Euclidean2D> point) {
         Vector2D p2 = (Vector2D) point;
         return new Vector1D(MathArrays.linearCombination(cos, p2.getX(), sin, p2.getY()));
     }
 
     /** {@inheritDoc} */
+    @Override
     public Vector2D toSpace(final Point<Euclidean1D> point) {
         final double abscissa = ((Vector1D) point).getX();
         return new Vector2D(MathArrays.linearCombination(abscissa, cos, -originOffset, sin),
@@ -270,6 +273,7 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
     /** {@inheritDoc}
      * @since 3.3
      */
+    @Override
     public Point<Euclidean2D> project(Point<Euclidean2D> point) {
         return toSpace(toSubSpace(point));
     }
@@ -277,11 +281,13 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
     /** {@inheritDoc}
      * @since 3.3
      */
+    @Override
     public double getTolerance() {
         return tolerance;
     }
 
     /** {@inheritDoc} */
+    @Override
     public SubLine wholeHyperplane() {
         return new SubLine(this, new IntervalsSet(tolerance));
     }
@@ -290,6 +296,7 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
      * @return a region containing the instance (really a {@link
      * PolygonsSet PolygonsSet} instance)
      */
+    @Override
     public PolygonsSet wholeSpace() {
         return new PolygonsSet(tolerance);
     }
@@ -318,12 +325,14 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getOffset(final Point<Euclidean2D> point) {
         Vector2D p2 = (Vector2D) point;
         return MathArrays.linearCombination(sin, p2.getX(), -cos, p2.getY(), 1.0, originOffset);
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean sameOrientationAs(final Hyperplane<Euclidean2D> other) {
         final Line otherL = (Line) other;
         return MathArrays.linearCombination(sin, otherL.sin, cos, otherL.cos) >= 0.0;
@@ -439,16 +448,16 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
     private static class LineTransform implements Transform<Euclidean2D, Euclidean1D> {
 
         // CHECKSTYLE: stop JavadocVariable check
-        private double cXX;
-        private double cXY;
-        private double cX1;
-        private double cYX;
-        private double cYY;
-        private double cY1;
-
-        private double c1Y;
-        private double c1X;
-        private double c11;
+        private final double cXX;
+        private final double cXY;
+        private final double cX1;
+        private final double cYX;
+        private final double cYY;
+        private final double cY1;
+
+        private final double c1Y;
+        private final double c1X;
+        private final double c11;
         // CHECKSTYLE: resume JavadocVariable check
 
         /** Build an affine line transform from a n {@code AffineTransform}.
@@ -479,6 +488,7 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
         }
 
         /** {@inheritDoc} */
+        @Override
         public Vector2D apply(final Point<Euclidean2D> point) {
             final Vector2D p2D = (Vector2D) point;
             final double  x   = p2D.getX();
@@ -488,6 +498,7 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
         }
 
         /** {@inheritDoc} */
+        @Override
         public Line apply(final Hyperplane<Euclidean2D> hyperplane) {
             final Line   line    = (Line) hyperplane;
             final double rOffset = MathArrays.linearCombination(c1X, line.cos, c1Y, line.sin, c11, line.originOffset);
@@ -500,6 +511,7 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
         }
 
         /** {@inheritDoc} */
+        @Override
         public SubHyperplane<Euclidean1D> apply(final SubHyperplane<Euclidean1D> sub,
                                                 final Hyperplane<Euclidean2D> original,
                                                 final Hyperplane<Euclidean2D> transformed) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/PolygonsSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/PolygonsSet.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/PolygonsSet.java
index e542461..6968783 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/PolygonsSet.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/PolygonsSet.java
@@ -1002,11 +1002,13 @@ public class PolygonsSet extends AbstractRegion<Euclidean2D, Euclidean1D> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public Order visitOrder(final BSPTree<Euclidean2D> node) {
             return Order.MINUS_SUB_PLUS;
         }
 
         /** {@inheritDoc} */
+        @Override
         public void visitInternalNode(final BSPTree<Euclidean2D> node) {
             @SuppressWarnings("unchecked")
             final BoundaryAttribute<Euclidean2D> attribute = (BoundaryAttribute<Euclidean2D>) node.getAttribute();
@@ -1020,6 +1022,7 @@ public class PolygonsSet extends AbstractRegion<Euclidean2D, Euclidean1D> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public void visitLeafNode(final BSPTree<Euclidean2D> node) {
         }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java
index ff2b435..9293b4e 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java
@@ -85,6 +85,7 @@ abstract class AbstractConvexHullGenerator2D implements ConvexHullGenerator2D {
     }
 
     /** {@inheritDoc} */
+    @Override
     public ConvexHull2D generate(final Collection<Vector2D> points)
             throws NullArgumentException, ConvergenceException {
         // check for null points

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHull2D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHull2D.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHull2D.java
index dadfaa8..b973e13 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHull2D.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHull2D.java
@@ -106,6 +106,7 @@ public class ConvexHull2D implements ConvexHull<Euclidean2D, Vector2D>, Serializ
     }
 
     /** {@inheritDoc} */
+    @Override
     public Vector2D[] getVertices() {
         return vertices.clone();
     }
@@ -157,6 +158,7 @@ public class ConvexHull2D implements ConvexHull<Euclidean2D, Vector2D>, Serializ
     }
 
     /** {@inheritDoc} */
+    @Override
     public Region<Euclidean2D> createRegion() throws InsufficientDataException {
         if (vertices.length < 3) {
             throw new InsufficientDataException();

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java
index a7febe3..3557147 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java
@@ -32,6 +32,7 @@ import org.apache.commons.math4.geometry.hull.ConvexHullGenerator;
 public interface ConvexHullGenerator2D extends ConvexHullGenerator<Euclidean2D, Vector2D> {
 
     /** {@inheritDoc} */
+    @Override
     ConvexHull2D generate(Collection<Vector2D> points) throws NullArgumentException, ConvergenceException;
 
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/MonotoneChain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/MonotoneChain.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/MonotoneChain.java
index bbd0532..9f9d2c4 100644
--- a/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/MonotoneChain.java
+++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/twod/hull/MonotoneChain.java
@@ -80,6 +80,7 @@ public class MonotoneChain extends AbstractConvexHullGenerator2D {
 
         // sort the points in increasing order on the x-axis
         Collections.sort(pointsSortedByXAxis, new Comparator<Vector2D>() {
+            @Override
             public int compare(final Vector2D o1, final Vector2D o2) {
                 final double tolerance = getTolerance();
                 // need to take the tolerance value into account, otherwise collinear points

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java
index 71e552f..f75c0b3 100644
--- a/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java
+++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractRegion.java
@@ -110,6 +110,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
             // (we don't want equal size elements to be removed, so
             // we use a trick to fool the TreeSet)
             final TreeSet<SubHyperplane<S>> ordered = new TreeSet<SubHyperplane<S>>(new Comparator<SubHyperplane<S>>() {
+                @Override
                 public int compare(final SubHyperplane<S> o1, final SubHyperplane<S> o2) {
                     final double size1 = o1.getSize();
                     final double size2 = o2.getSize();
@@ -126,15 +127,18 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
             tree.visit(new BSPTreeVisitor<S>() {
 
                 /** {@inheritDoc} */
+                @Override
                 public Order visitOrder(final BSPTree<S> node) {
                     return Order.PLUS_SUB_MINUS;
                 }
 
                 /** {@inheritDoc} */
+                @Override
                 public void visitInternalNode(final BSPTree<S> node) {
                 }
 
                 /** {@inheritDoc} */
+                @Override
                 public void visitLeafNode(final BSPTree<S> node) {
                     if (node.getParent() == null || node == node.getParent().getMinus()) {
                         node.setAttribute(Boolean.TRUE);
@@ -179,6 +183,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public abstract AbstractRegion<S, T> buildNew(BSPTree<S> newTree);
 
     /** Get the tolerance below which points are considered to belong to hyperplanes.
@@ -240,16 +245,19 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public AbstractRegion<S, T> copySelf() {
         return buildNew(tree.copySelf());
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean isEmpty() {
         return isEmpty(tree);
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean isEmpty(final BSPTree<S> node) {
 
         // we use a recursive function rather than the BSPTreeVisitor
@@ -267,11 +275,13 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean isFull() {
         return isFull(tree);
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean isFull(final BSPTree<S> node) {
 
         // we use a recursive function rather than the BSPTreeVisitor
@@ -289,6 +299,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean contains(final Region<S> region) {
         return new RegionFactory<S>().difference(region, this).isEmpty();
     }
@@ -296,6 +307,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     /** {@inheritDoc}
      * @since 3.3
      */
+    @Override
     public BoundaryProjection<S> projectToBoundary(final Point<S> point) {
         final BoundaryProjector<S, T> projector = new BoundaryProjector<S, T>(point);
         getTree(true).visit(projector);
@@ -313,6 +325,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public Location checkPoint(final Point<S> point) {
         return checkPoint(tree, point);
     }
@@ -350,6 +363,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public BSPTree<S> getTree(final boolean includeBoundaryAttributes) {
         if (includeBoundaryAttributes && (tree.getCut() != null) && (tree.getAttribute() == null)) {
             // compute the boundary attributes
@@ -359,6 +373,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getBoundarySize() {
         final BoundarySizeVisitor<S> visitor = new BoundarySizeVisitor<S>();
         getTree(true).visit(visitor);
@@ -366,6 +381,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getSize() {
         if (barycenter == null) {
             computeGeometricalProperties();
@@ -381,6 +397,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public Point<S> getBarycenter() {
         if (barycenter == null) {
             computeGeometricalProperties();
@@ -408,6 +425,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     protected abstract void computeGeometricalProperties();
 
     /** {@inheritDoc} */
+    @Override
     public Side side(final Hyperplane<S> hyperplane) {
         final InsideFinder<S> finder = new InsideFinder<S>(this);
         finder.recurseSides(tree, hyperplane.wholeHyperplane());
@@ -417,6 +435,7 @@ public abstract class AbstractRegion<S extends Space, T extends Space> implement
     }
 
     /** {@inheritDoc} */
+    @Override
     public SubHyperplane<S> intersection(final SubHyperplane<S> sub) {
         return recurseIntersection(tree, sub);
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractSubHyperplane.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractSubHyperplane.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractSubHyperplane.java
index 5c62ae7..f75998c 100644
--- a/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractSubHyperplane.java
+++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/AbstractSubHyperplane.java
@@ -63,6 +63,7 @@ public abstract class AbstractSubHyperplane<S extends Space, T extends Space>
                                                             final Region<T> remaining);
 
     /** {@inheritDoc} */
+    @Override
     public AbstractSubHyperplane<S, T> copySelf() {
         return buildNew(hyperplane.copySelf(), remainingRegion);
     }
@@ -70,6 +71,7 @@ public abstract class AbstractSubHyperplane<S extends Space, T extends Space>
     /** Get the underlying hyperplane.
      * @return underlying hyperplane
      */
+    @Override
     public Hyperplane<S> getHyperplane() {
         return hyperplane;
     }
@@ -86,11 +88,13 @@ public abstract class AbstractSubHyperplane<S extends Space, T extends Space>
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getSize() {
         return remainingRegion.getSize();
     }
 
     /** {@inheritDoc} */
+    @Override
     public AbstractSubHyperplane<S, T> reunite(final SubHyperplane<S> other) {
         @SuppressWarnings("unchecked")
         AbstractSubHyperplane<S, T> o = (AbstractSubHyperplane<S, T>) other;
@@ -175,12 +179,15 @@ public abstract class AbstractSubHyperplane<S extends Space, T extends Space>
     }
 
     /** {@inheritDoc} */
+    @Override
     public abstract Side side(Hyperplane<S> hyper);
 
     /** {@inheritDoc} */
+    @Override
     public abstract SplitSubHyperplane<S> split(Hyperplane<S> hyper);
 
     /** {@inheritDoc} */
+    @Override
     public boolean isEmpty() {
         return remainingRegion.isEmpty();
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryBuilder.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryBuilder.java
index 8e82e4f..2b35eb9 100644
--- a/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryBuilder.java
+++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryBuilder.java
@@ -29,11 +29,13 @@ import org.apache.commons.math4.geometry.Space;
 class BoundaryBuilder<S extends Space> implements BSPTreeVisitor<S> {
 
     /** {@inheritDoc} */
+    @Override
     public Order visitOrder(BSPTree<S> node) {
         return Order.PLUS_MINUS_SUB;
     }
 
     /** {@inheritDoc} */
+    @Override
     public void visitInternalNode(BSPTree<S> node) {
 
         SubHyperplane<S> plusOutside = null;
@@ -89,6 +91,7 @@ class BoundaryBuilder<S extends Space> implements BSPTreeVisitor<S> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public void visitLeafNode(BSPTree<S> node) {
     }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryProjector.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryProjector.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryProjector.java
index cfc4561..655aaa2 100644
--- a/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryProjector.java
+++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundaryProjector.java
@@ -54,6 +54,7 @@ class BoundaryProjector<S extends Space, T extends Space> implements BSPTreeVisi
     }
 
     /** {@inheritDoc} */
+    @Override
     public Order visitOrder(final BSPTree<S> node) {
         // we want to visit the tree so that the first encountered
         // leaf is the one closest to the test point
@@ -65,6 +66,7 @@ class BoundaryProjector<S extends Space, T extends Space> implements BSPTreeVisi
     }
 
     /** {@inheritDoc} */
+    @Override
     public void visitInternalNode(final BSPTree<S> node) {
 
         // project the point on the cut sub-hyperplane
@@ -111,6 +113,7 @@ class BoundaryProjector<S extends Space, T extends Space> implements BSPTreeVisi
     }
 
     /** {@inheritDoc} */
+    @Override
     public void visitLeafNode(final BSPTree<S> node) {
         if (leaf == null) {
             // this is the first leaf we visit,

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundarySizeVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundarySizeVisitor.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundarySizeVisitor.java
index b97f653..dae1806 100644
--- a/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundarySizeVisitor.java
+++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/BoundarySizeVisitor.java
@@ -34,11 +34,13 @@ class BoundarySizeVisitor<S extends Space> implements BSPTreeVisitor<S> {
     }
 
     /** {@inheritDoc}*/
+    @Override
     public Order visitOrder(final BSPTree<S> node) {
         return Order.MINUS_SUB_PLUS;
     }
 
     /** {@inheritDoc}*/
+    @Override
     public void visitInternalNode(final BSPTree<S> node) {
         @SuppressWarnings("unchecked")
         final BoundaryAttribute<S> attribute =
@@ -52,6 +54,7 @@ class BoundarySizeVisitor<S extends Space> implements BSPTreeVisitor<S> {
     }
 
     /** {@inheritDoc}*/
+    @Override
     public void visitLeafNode(final BSPTree<S> node) {
     }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/partitioning/NodesSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/NodesSet.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/NodesSet.java
index d3099c2..e7588e0 100644
--- a/src/main/java/org/apache/commons/math4/geometry/partitioning/NodesSet.java
+++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/NodesSet.java
@@ -30,7 +30,7 @@ import org.apache.commons.math4.geometry.Space;
 public class NodesSet<S extends Space> implements Iterable<BSPTree<S>> {
 
     /** List of sub-hyperplanes. */
-    private List<BSPTree<S>> list;
+    private final List<BSPTree<S>> list;
 
     /** Simple constructor.
      */
@@ -65,6 +65,7 @@ public class NodesSet<S extends Space> implements Iterable<BSPTree<S>> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public Iterator<BSPTree<S>> iterator() {
         return list.iterator();
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java
index d8679ec..cf96192 100644
--- a/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java
+++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java
@@ -206,6 +206,7 @@ public class RegionFactory<S extends Space> {
     /** BSP tree leaf merger computing union of two regions. */
     private class UnionMerger implements BSPTree.LeafMerger<S> {
         /** {@inheritDoc} */
+        @Override
         public BSPTree<S> merge(final BSPTree<S> leaf, final BSPTree<S> tree,
                                 final BSPTree<S> parentTree,
                                 final boolean isPlusChild, final boolean leafFromInstance) {
@@ -223,6 +224,7 @@ public class RegionFactory<S extends Space> {
     /** BSP tree leaf merger computing intersection of two regions. */
     private class IntersectionMerger implements BSPTree.LeafMerger<S> {
         /** {@inheritDoc} */
+        @Override
         public BSPTree<S> merge(final BSPTree<S> leaf, final BSPTree<S> tree,
                                 final BSPTree<S> parentTree,
                                 final boolean isPlusChild, final boolean leafFromInstance) {
@@ -240,6 +242,7 @@ public class RegionFactory<S extends Space> {
     /** BSP tree leaf merger computing symmetric difference (exclusive or) of two regions. */
     private class XorMerger implements BSPTree.LeafMerger<S> {
         /** {@inheritDoc} */
+        @Override
         public BSPTree<S> merge(final BSPTree<S> leaf, final BSPTree<S> tree,
                                 final BSPTree<S> parentTree, final boolean isPlusChild,
                                 final boolean leafFromInstance) {
@@ -272,6 +275,7 @@ public class RegionFactory<S extends Space> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public BSPTree<S> merge(final BSPTree<S> leaf, final BSPTree<S> tree,
                                 final BSPTree<S> parentTree, final boolean isPlusChild,
                                 final boolean leafFromInstance) {
@@ -290,6 +294,7 @@ public class RegionFactory<S extends Space> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public BSPTree<S> fixNode(final BSPTree<S> node) {
             // get a representative point in the degenerate cell
             final BSPTree<S> cell = node.pruneAroundConvexCell(Boolean.TRUE, Boolean.FALSE, null);
@@ -305,16 +310,19 @@ public class RegionFactory<S extends Space> {
     private class NodesCleaner implements  BSPTreeVisitor<S> {
 
         /** {@inheritDoc} */
+        @Override
         public Order visitOrder(final BSPTree<S> node) {
             return Order.PLUS_SUB_MINUS;
         }
 
         /** {@inheritDoc} */
+        @Override
         public void visitInternalNode(final BSPTree<S> node) {
             node.setAttribute(null);
         }
 
         /** {@inheritDoc} */
+        @Override
         public void visitLeafNode(final BSPTree<S> node) {
         }
 
@@ -334,6 +342,7 @@ public class RegionFactory<S extends Space> {
         }
 
         /** {@inheritDoc} */
+        @Override
         public BSPTree<S> fixNode(final BSPTree<S> node) {
             if (node.getPlus().getAttribute().equals(node.getMinus().getAttribute())) {
                 // no ambiguity

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/oned/ArcsSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/oned/ArcsSet.java b/src/main/java/org/apache/commons/math4/geometry/spherical/oned/ArcsSet.java
index 7479a22..bd195c0 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/oned/ArcsSet.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/oned/ArcsSet.java
@@ -580,6 +580,7 @@ public class ArcsSet extends AbstractRegion<Sphere1D, Sphere1D> implements Itera
      * The iterator does <em>not</em> support the optional {@code remove} operation.
      * </p>
      */
+    @Override
     public Iterator<double[]> iterator() {
         return new SubArcsIterator();
     }
@@ -676,11 +677,13 @@ public class ArcsSet extends AbstractRegion<Sphere1D, Sphere1D> implements Itera
         }
 
         /** {@inheritDoc} */
+        @Override
         public boolean hasNext() {
             return pending != null;
         }
 
         /** {@inheritDoc} */
+        @Override
         public double[] next() {
             if (pending == null) {
                 throw new NoSuchElementException();
@@ -691,6 +694,7 @@ public class ArcsSet extends AbstractRegion<Sphere1D, Sphere1D> implements Itera
         }
 
         /** {@inheritDoc} */
+        @Override
         public void remove() {
             throw new UnsupportedOperationException();
         }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/oned/LimitAngle.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/oned/LimitAngle.java b/src/main/java/org/apache/commons/math4/geometry/spherical/oned/LimitAngle.java
index bfd7894..086931c 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/oned/LimitAngle.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/oned/LimitAngle.java
@@ -27,10 +27,10 @@ import org.apache.commons.math4.geometry.partitioning.Hyperplane;
 public class LimitAngle implements Hyperplane<Sphere1D> {
 
     /** Angle location. */
-    private S1Point location;
+    private final S1Point location;
 
     /** Orientation. */
-    private boolean direct;
+    private final boolean direct;
 
     /** Tolerance below which angles are considered identical. */
     private final double tolerance;
@@ -52,11 +52,13 @@ public class LimitAngle implements Hyperplane<Sphere1D> {
      * the instance.</p>
      * @return the instance itself
      */
+    @Override
     public LimitAngle copySelf() {
         return this;
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getOffset(final Point<Sphere1D> point) {
         final double delta = ((S1Point) point).getAlpha() - location.getAlpha();
         return direct ? delta : -delta;
@@ -90,6 +92,7 @@ public class LimitAngle implements Hyperplane<Sphere1D> {
      * <em>not</em> be used otherwise.</p>
      * @return a dummy sub hyperplane
      */
+    @Override
     public SubLimitAngle wholeHyperplane() {
         return new SubLimitAngle(this, null);
     }
@@ -98,11 +101,13 @@ public class LimitAngle implements Hyperplane<Sphere1D> {
      * @return a region containing the instance (really an {@link
      * ArcsSet IntervalsSet} instance)
      */
+    @Override
     public ArcsSet wholeSpace() {
         return new ArcsSet(tolerance);
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean sameOrientationAs(final Hyperplane<Sphere1D> other) {
         return !(direct ^ ((LimitAngle) other).direct);
     }
@@ -115,11 +120,13 @@ public class LimitAngle implements Hyperplane<Sphere1D> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public Point<Sphere1D> project(Point<Sphere1D> point) {
         return location;
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getTolerance() {
         return tolerance;
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/oned/S1Point.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/oned/S1Point.java b/src/main/java/org/apache/commons/math4/geometry/spherical/oned/S1Point.java
index 66d21cc..2395fd2 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/oned/S1Point.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/oned/S1Point.java
@@ -77,16 +77,19 @@ public class S1Point implements Point<Sphere1D> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public Space getSpace() {
         return Sphere1D.getInstance();
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean isNaN() {
         return Double.isNaN(alpha);
     }
 
     /** {@inheritDoc} */
+    @Override
     public double distance(final Point<Sphere1D> point) {
         return distance(this, (S1Point) point);
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/oned/Sphere1D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/oned/Sphere1D.java b/src/main/java/org/apache/commons/math4/geometry/spherical/oned/Sphere1D.java
index cdd397f..18f1a5d 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/oned/Sphere1D.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/oned/Sphere1D.java
@@ -51,6 +51,7 @@ public class Sphere1D implements Serializable, Space {
     }
 
     /** {@inheritDoc} */
+    @Override
     public int getDimension() {
         return 1;
     }
@@ -63,6 +64,7 @@ public class Sphere1D implements Serializable, Space {
      * @return nothing
      * @throws NoSubSpaceException in all cases
      */
+    @Override
     public Space getSubSpace() throws NoSubSpaceException {
         throw new NoSubSpaceException();
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Circle.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Circle.java b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Circle.java
index f4a554d..0989bad 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Circle.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Circle.java
@@ -102,6 +102,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
     }
 
     /** {@inheritDoc} */
+    @Override
     public Circle copySelf() {
         return new Circle(this);
     }
@@ -134,11 +135,13 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
     }
 
     /** {@inheritDoc} */
+    @Override
     public Point<Sphere2D> project(Point<Sphere2D> point) {
         return toSpace(toSubSpace(point));
     }
 
     /** {@inheritDoc} */
+    @Override
     public double getTolerance() {
         return tolerance;
     }
@@ -146,6 +149,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
     /** {@inheritDoc}
      * @see #getPhase(Vector3D)
      */
+    @Override
     public S1Point toSubSpace(final Point<Sphere2D> point) {
         return new S1Point(getPhase(((S2Point) point).getVector()));
     }
@@ -167,6 +171,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
     /** {@inheritDoc}
      * @see #getPointAt(double)
      */
+    @Override
     public S2Point toSpace(final Point<Sphere1D> point) {
         return new S2Point(getPointAt(((S1Point) point).getAlpha()));
     }
@@ -236,6 +241,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
     }
 
     /** {@inheritDoc} */
+    @Override
     public SubCircle wholeHyperplane() {
         return new SubCircle(this, new ArcsSet(tolerance));
     }
@@ -244,6 +250,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
      * @return a region containing the instance (really a {@link
      * SphericalPolygonsSet SphericalPolygonsSet} instance)
      */
+    @Override
     public SphericalPolygonsSet wholeSpace() {
         return new SphericalPolygonsSet(tolerance);
     }
@@ -251,6 +258,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
     /** {@inheritDoc}
      * @see #getOffset(Vector3D)
      */
+    @Override
     public double getOffset(final Point<Sphere2D> point) {
         return getOffset(((S2Point) point).getVector());
     }
@@ -269,6 +277,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean sameOrientationAs(final Hyperplane<Sphere2D> other) {
         final Circle otherC = (Circle) other;
         return Vector3D.dotProduct(pole, otherC.pole) >= 0.0;
@@ -300,11 +309,13 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
         }
 
         /** {@inheritDoc} */
+        @Override
         public S2Point apply(final Point<Sphere2D> point) {
             return new S2Point(rotation.applyTo(((S2Point) point).getVector()));
         }
 
         /** {@inheritDoc} */
+        @Override
         public Circle apply(final Hyperplane<Sphere2D> hyperplane) {
             final Circle circle = (Circle) hyperplane;
             return new Circle(rotation.applyTo(circle.pole),
@@ -314,6 +325,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
         }
 
         /** {@inheritDoc} */
+        @Override
         public SubHyperplane<Sphere1D> apply(final SubHyperplane<Sphere1D> sub,
                                              final Hyperplane<Sphere2D> original,
                                              final Hyperplane<Sphere2D> transformed) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/twod/EdgesBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/EdgesBuilder.java b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/EdgesBuilder.java
index 64e7d37..aac7aef 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/EdgesBuilder.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/EdgesBuilder.java
@@ -60,11 +60,13 @@ class EdgesBuilder implements BSPTreeVisitor<Sphere2D> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public Order visitOrder(final BSPTree<Sphere2D> node) {
         return Order.MINUS_SUB_PLUS;
     }
 
     /** {@inheritDoc} */
+    @Override
     public void visitInternalNode(final BSPTree<Sphere2D> node) {
         nodeToEdgesList.put(node, new ArrayList<Edge>());
         @SuppressWarnings("unchecked")
@@ -78,6 +80,7 @@ class EdgesBuilder implements BSPTreeVisitor<Sphere2D> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public void visitLeafNode(final BSPTree<Sphere2D> node) {
     }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/twod/PropertiesComputer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/PropertiesComputer.java b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/PropertiesComputer.java
index 7987f31..7721320 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/PropertiesComputer.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/PropertiesComputer.java
@@ -54,16 +54,19 @@ class PropertiesComputer implements BSPTreeVisitor<Sphere2D> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public Order visitOrder(final BSPTree<Sphere2D> node) {
         return Order.MINUS_SUB_PLUS;
     }
 
     /** {@inheritDoc} */
+    @Override
     public void visitInternalNode(final BSPTree<Sphere2D> node) {
         // nothing to do here
     }
 
     /** {@inheritDoc} */
+    @Override
     public void visitLeafNode(final BSPTree<Sphere2D> node) {
         if ((Boolean) node.getAttribute()) {
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/twod/S2Point.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/S2Point.java b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/S2Point.java
index fb02807..94fc0c5 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/S2Point.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/S2Point.java
@@ -152,11 +152,13 @@ public class S2Point implements Point<Sphere2D> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public Space getSpace() {
         return Sphere2D.getInstance();
     }
 
     /** {@inheritDoc} */
+    @Override
     public boolean isNaN() {
         return Double.isNaN(theta) || Double.isNaN(phi);
     }
@@ -169,6 +171,7 @@ public class S2Point implements Point<Sphere2D> {
     }
 
     /** {@inheritDoc} */
+    @Override
     public double distance(final Point<Sphere2D> point) {
         return distance(this, (S2Point) point);
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fbf5a51e/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Sphere2D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Sphere2D.java b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Sphere2D.java
index 0f87462..8ada69f 100644
--- a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Sphere2D.java
+++ b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/Sphere2D.java
@@ -50,11 +50,13 @@ public class Sphere2D implements Serializable, Space {
     }
 
     /** {@inheritDoc} */
+    @Override
     public int getDimension() {
         return 2;
     }
 
     /** {@inheritDoc} */
+    @Override
     public Sphere1D getSubSpace() {
         return Sphere1D.getInstance();
     }


Mime
View raw message