This is an automated email from the ASF dual-hosted git repository. erans pushed a commit to branch GEOMETRY-3__TBR in repository https://gitbox.apache.org/repos/asf/commons-geometry.git
commit 519a17ab35760edc45acd24798d0a5270598c04d Author: Matt Juntunen <[email protected]> AuthorDate: Sat Jun 2 23:16:46 2018 -0400 GEOMETRY-2: removing Serializable from top-level interface and placing at concrete class level, per issue comments --- .../src/main/java/org/apache/commons/geometry/core/Spatial.java | 4 +--- .../java/org/apache/commons/geometry/euclidean/oned/Cartesian1D.java | 4 +++- .../org/apache/commons/geometry/euclidean/threed/Cartesian3D.java | 4 +++- .../java/org/apache/commons/geometry/euclidean/twod/Cartesian2D.java | 4 +++- .../main/java/org/apache/commons/geometry/spherical/oned/S1Point.java | 4 +++- .../main/java/org/apache/commons/geometry/spherical/twod/S2Point.java | 4 +++- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Spatial.java b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Spatial.java index ad72eb7..c6f76c1 100644 --- a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Spatial.java +++ b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Spatial.java @@ -16,11 +16,9 @@ */ package org.apache.commons.geometry.core; -import java.io.Serializable; - /** Interface representing a generic element in a mathematical space. */ -public interface Spatial extends Serializable { +public interface Spatial { /** Returns the number of dimensions in the space that this element * belongs to. diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/Cartesian1D.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/Cartesian1D.java index 53e2879..8d9b800 100644 --- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/Cartesian1D.java +++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/Cartesian1D.java @@ -16,12 +16,14 @@ */ package org.apache.commons.geometry.euclidean.oned; +import java.io.Serializable; + import org.apache.commons.geometry.core.Spatial; /** This class represents a Cartesian coordinate value in * one-dimensional Euclidean space. */ -public abstract class Cartesian1D implements Spatial { +public abstract class Cartesian1D implements Spatial, Serializable { /** Serializable UID. */ private static final long serialVersionUID = -1178039568877797126L; diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Cartesian3D.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Cartesian3D.java index 4640b23..6b619ac 100644 --- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Cartesian3D.java +++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Cartesian3D.java @@ -17,12 +17,14 @@ package org.apache.commons.geometry.euclidean.threed; +import java.io.Serializable; + import org.apache.commons.geometry.core.Spatial; /** This class represents a Cartesian coordinate value in * three-dimensional Euclidean space. */ -public abstract class Cartesian3D implements Spatial { +public abstract class Cartesian3D implements Spatial, Serializable { /** Serializable UID. */ private static final long serialVersionUID = 6249091865814886817L; diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/Cartesian2D.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/Cartesian2D.java index ba3b462..d4c69b6 100644 --- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/Cartesian2D.java +++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/Cartesian2D.java @@ -17,12 +17,14 @@ package org.apache.commons.geometry.euclidean.twod; +import java.io.Serializable; + import org.apache.commons.geometry.core.Spatial; /** This class represents a set of Cartesian coordinates in * two-dimensional Euclidean space. */ -public abstract class Cartesian2D implements Spatial { +public abstract class Cartesian2D implements Spatial, Serializable { /** Serializable UID */ private static final long serialVersionUID = 2918583078965478552L; diff --git a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/oned/S1Point.java b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/oned/S1Point.java index c2f6d86..7cced20 100644 --- a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/oned/S1Point.java +++ b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/oned/S1Point.java @@ -16,6 +16,8 @@ */ package org.apache.commons.geometry.spherical.oned; +import java.io.Serializable; + import org.apache.commons.geometry.core.Point; import org.apache.commons.geometry.core.util.Coordinates; import org.apache.commons.geometry.core.util.SimpleCoordinateFormat; @@ -25,7 +27,7 @@ import org.apache.commons.numbers.angle.PlaneAngleRadians; /** This class represents a point on the 1-sphere. * <p>Instances of this class are guaranteed to be immutable.</p> */ -public final class S1Point implements Point<S1Point> { +public final class S1Point implements Point<S1Point>, Serializable { // CHECKSTYLE: stop ConstantName /** A vector with all coordinates set to NaN. */ diff --git a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/S2Point.java b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/S2Point.java index a0c7499..f8d3f4e 100644 --- a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/S2Point.java +++ b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/S2Point.java @@ -16,6 +16,8 @@ */ package org.apache.commons.geometry.spherical.twod; +import java.io.Serializable; + import org.apache.commons.geometry.core.Point; import org.apache.commons.geometry.core.util.Coordinates; import org.apache.commons.geometry.core.util.SimpleCoordinateFormat; @@ -31,7 +33,7 @@ import org.apache.commons.geometry.euclidean.threed.Vector3D; * </p> * <p>Instances of this class are guaranteed to be immutable.</p> */ -public final class S2Point implements Point<S2Point> { +public final class S2Point implements Point<S2Point>, Serializable { /** +I (coordinates: \( \theta = 0, \varphi = \pi/2 \)). */ public static final S2Point PLUS_I = new S2Point(0, 0.5 * Math.PI, Vector3D.PLUS_X);
