sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1543219 - in /sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing: ./ datum/
Date Mon, 18 Nov 2013 23:01:45 GMT
Author: desruisseaux
Date: Mon Nov 18 23:01:45 2013
New Revision: 1543219

URL: http://svn.apache.org/r1543219
Log:
Minor change in implementation of 'equals': check for (x instance Foo) before the call to
super.equals.
Not sure what would be the impact on performance, however this reduce the risk of errors.

Modified:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
[UTF-8] Mon Nov 18 23:01:45 2013
@@ -186,26 +186,25 @@ public class AbstractReferenceSystem ext
      */
     @Override
     public boolean equals(final Object object, final ComparisonMode mode) {
-        if (super.equals(object, mode)) {
-            switch (mode) {
-                case STRICT: {
-                    final AbstractReferenceSystem that = (AbstractReferenceSystem) object;
-                    return Objects.equals(domainOfValidity, that.domainOfValidity) &&
-                           Objects.equals(scope,            that.scope);
-                }
-                case BY_CONTRACT: {
-                    if (!(object instanceof ReferenceSystem)) break;
-                    final ReferenceSystem that = (ReferenceSystem) object;
-                    return deepEquals(getDomainOfValidity(), that.getDomainOfValidity(),
mode) &&
-                           deepEquals(getScope(),            that.getScope(), mode);
-                }
-                default: {
-                    // Domain of validity and scope are metadata, so they can be ignored.
-                    return (object instanceof ReferenceSystem);
-                }
+        if (!(object instanceof ReferenceSystem && super.equals(object, mode))) {
+            return false;
+        }
+        switch (mode) {
+            case STRICT: {
+                final AbstractReferenceSystem that = (AbstractReferenceSystem) object;
+                return Objects.equals(domainOfValidity, that.domainOfValidity) &&
+                       Objects.equals(scope,            that.scope);
+            }
+            case BY_CONTRACT: {
+                final ReferenceSystem that = (ReferenceSystem) object;
+                return deepEquals(getDomainOfValidity(), that.getDomainOfValidity(), mode)
&&
+                       deepEquals(getScope(),            that.getScope(), mode);
+            }
+            default: {
+                // Domain of validity and scope are metadata, so they can be ignored.
+                return true;
             }
         }
-        return false;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
[UTF-8] Mon Nov 18 23:01:45 2013
@@ -301,38 +301,36 @@ public class AbstractDatum extends Abstr
      */
     @Override
     public boolean equals(final Object object, final ComparisonMode mode) {
-        if (super.equals(object, mode)) {
-            switch (mode) {
-                case STRICT: {
-                    final AbstractDatum that = (AbstractDatum) object;
-                    return this.realizationEpoch == that.realizationEpoch &&
-                           Objects.equals(this.domainOfValidity, that.domainOfValidity) &&
-                           Objects.equals(this.anchorPoint,      that.anchorPoint) &&
-                           Objects.equals(this.scope,            that.scope);
-                }
-                case BY_CONTRACT: {
-                    if (!(object instanceof Datum)) break;
-                    final Datum that = (Datum) object;
-                    return deepEquals(getRealizationEpoch(), that.getRealizationEpoch(),
mode) &&
-                           deepEquals(getDomainOfValidity(), that.getDomainOfValidity(),
mode) &&
-                           deepEquals(getAnchorPoint(),      that.getAnchorPoint(),     
mode) &&
-                           deepEquals(getScope(),            that.getScope(),           
mode);
-                }
-                default: {
-                    /*
-                     * Tests for name, since datum with different name have completely
-                     * different meaning. We don't perform this comparison if the user
-                     * asked for metadata comparison, because in such case the names
-                     * have already been compared by the subclass.
-                     */
-                    if (!(object instanceof Datum)) break;
-                    final Datum that = (Datum) object;
-                    return nameMatches(that. getName().getCode()) ||
-                           IdentifiedObjects.nameMatches(that, getName().getCode());
-                }
+        if (!(object instanceof Datum && super.equals(object, mode))) {
+            return false;
+        }
+        switch (mode) {
+            case STRICT: {
+                final AbstractDatum that = (AbstractDatum) object;
+                return this.realizationEpoch == that.realizationEpoch &&
+                       Objects.equals(this.domainOfValidity, that.domainOfValidity) &&
+                       Objects.equals(this.anchorPoint,      that.anchorPoint) &&
+                       Objects.equals(this.scope,            that.scope);
+            }
+            case BY_CONTRACT: {
+                final Datum that = (Datum) object;
+                return deepEquals(getRealizationEpoch(), that.getRealizationEpoch(), mode)
&&
+                       deepEquals(getDomainOfValidity(), that.getDomainOfValidity(), mode)
&&
+                       deepEquals(getAnchorPoint(),      that.getAnchorPoint(),      mode)
&&
+                       deepEquals(getScope(),            that.getScope(),            mode);
+            }
+            default: {
+                /*
+                 * Tests for name, since datum with different name have completely
+                 * different meaning. We don't perform this comparison if the user
+                 * asked for metadata comparison, because in such case the names
+                 * have already been compared by the subclass.
+                 */
+                final Datum that = (Datum) object;
+                return nameMatches(that. getName().getCode()) ||
+                       IdentifiedObjects.nameMatches(that, getName().getCode());
             }
         }
-        return false;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
[UTF-8] Mon Nov 18 23:01:45 2013
@@ -649,38 +649,41 @@ public class DefaultEllipsoid extends Ab
      * @return {@code true} if both objects are equal.
      */
     @Override
+    @SuppressWarnings("fallthrough")
     public boolean equals(final Object object, final ComparisonMode mode) {
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (super.equals(object, mode)) {
-            if (mode == ComparisonMode.STRICT) {
+        if (!(object instanceof Ellipsoid && super.equals(object, mode))) {
+            return false;
+        }
+        switch (mode) {
+            case STRICT: {
                 final DefaultEllipsoid that = (DefaultEllipsoid) object;
                 return ivfDefinitive == that.ivfDefinitive &&
                        Numerics.equals(this.semiMajorAxis,     that.semiMajorAxis)     &&
                        Numerics.equals(this.semiMinorAxis,     that.semiMinorAxis)     &&
                        Numerics.equals(this.inverseFlattening, that.inverseFlattening) &&
                         Objects.equals(this.unit,              that.unit);
-            } else {
-                if (object instanceof Ellipsoid) {
-                    final Ellipsoid that = (Ellipsoid) object;
-                    if (mode == ComparisonMode.BY_CONTRACT) {
-                        /*
-                         * isIvfDefinitive has no incidence on calculation using ellipsoid
parameters,
-                         * so we consider it as metadata that can be ignored in IGNORE_METADATA
mode.
-                         */
-                        if (isIvfDefinitive() != that.isIvfDefinitive()) {
-                            return false;
-                        }
-                    }
-                    return epsilonEqual(getSemiMajorAxis(),     that.getSemiMajorAxis(),
    mode) &&
-                           epsilonEqual(getSemiMinorAxis(),     that.getSemiMinorAxis(),
    mode) &&
-                           epsilonEqual(getInverseFlattening(), that.getInverseFlattening(),
mode) &&
-                           Objects.equals(getAxisUnit(),        that.getAxisUnit());
+            }
+            case BY_CONTRACT: {
+                /*
+                 * isIvfDefinitive has no incidence on calculation using ellipsoid parameters,
+                 * so we consider it as metadata that can be ignored in IGNORE_METADATA mode.
+                 */
+                if (isIvfDefinitive() != ((Ellipsoid) object).isIvfDefinitive()) {
+                    return false;
                 }
+                // Fall through
+            }
+            default: {
+                final Ellipsoid that = (Ellipsoid) object;
+                return epsilonEqual(getSemiMajorAxis(),     that.getSemiMajorAxis(),    
mode) &&
+                       epsilonEqual(getSemiMinorAxis(),     that.getSemiMinorAxis(),    
mode) &&
+                       epsilonEqual(getInverseFlattening(), that.getInverseFlattening(),
mode) &&
+                       Objects.equals(getAxisUnit(),        that.getAxisUnit());
             }
         }
-        return false;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
[UTF-8] Mon Nov 18 23:01:45 2013
@@ -151,7 +151,7 @@ public class DefaultEngineeringDatum ext
         if (object == this) {
             return true; // Slight optimization.
         }
-        return  (object instanceof EngineeringDatum) && super.equals(object, mode);
+        return (object instanceof EngineeringDatum) && super.equals(object, mode);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
[UTF-8] Mon Nov 18 23:01:45 2013
@@ -426,33 +426,32 @@ public class DefaultGeodeticDatum extend
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (super.equals(object, mode)) {
-            switch (mode) {
-                case STRICT: {
-                    final DefaultGeodeticDatum that = (DefaultGeodeticDatum) object;
-                    return Objects.equals(this.ellipsoid,     that.ellipsoid)     &&
-                           Objects.equals(this.primeMeridian, that.primeMeridian) &&
-                            Arrays.equals(this.bursaWolf,     that.bursaWolf);
-                }
-                default: {
-                    if (!(object instanceof GeodeticDatum)) break;
-                    final GeodeticDatum that = (GeodeticDatum) object;
-                    return deepEquals(getEllipsoid(),     that.getEllipsoid(),     mode)
&&
-                           deepEquals(getPrimeMeridian(), that.getPrimeMeridian(), mode);
-                    /*
-                     * HACK: We do not consider Bursa-Wolf parameters as a non-metadata field.
-                     *       This is needed in order to get equalsIgnoreMetadata(...) to
returns
-                     *       'true' when comparing the WGS84 constant in this class with
a WKT
-                     *       DATUM element with a TOWGS84[0,0,0,0,0,0,0] element. Furthermore,
-                     *       the Bursa-Wolf parameters are not part of ISO 19111 specification.
-                     *       We don't want two CRS to be considered as different because
one has
-                     *       more of those transformation informations (which is nice, but
doesn't
-                     *       change the CRS itself).
-                     */
-                }
+        if (!(object instanceof GeodeticDatum && super.equals(object, mode))) {
+            return false;
+        }
+        switch (mode) {
+            case STRICT: {
+                final DefaultGeodeticDatum that = (DefaultGeodeticDatum) object;
+                return Objects.equals(this.ellipsoid,     that.ellipsoid)     &&
+                       Objects.equals(this.primeMeridian, that.primeMeridian) &&
+                        Arrays.equals(this.bursaWolf,     that.bursaWolf);
+            }
+            default: {
+                final GeodeticDatum that = (GeodeticDatum) object;
+                return deepEquals(getEllipsoid(),     that.getEllipsoid(),     mode) &&
+                       deepEquals(getPrimeMeridian(), that.getPrimeMeridian(), mode);
+                /*
+                 * HACK: We do not consider Bursa-Wolf parameters as a non-metadata field.
+                 *       This is needed in order to get equalsIgnoreMetadata(...) to returns
+                 *       'true' when comparing the WGS84 constant in this class with a WKT
+                 *       DATUM element with a TOWGS84[0,0,0,0,0,0,0] element. Furthermore,
+                 *       the Bursa-Wolf parameters are not part of ISO 19111 specification.
+                 *       We don't want two CRS to be considered as different because one
has
+                 *       more of those transformation informations (which is nice, but doesn't
+                 *       change the CRS itself).
+                 */
             }
         }
-        return false;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
[UTF-8] Mon Nov 18 23:01:45 2013
@@ -175,20 +175,17 @@ public class DefaultImageDatum extends A
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (super.equals(object, mode)) {
-            switch (mode) {
-                case STRICT: {
-                    final DefaultImageDatum that = (DefaultImageDatum) object;
-                    return Objects.equals(this.pixelInCell, that.pixelInCell);
-                }
-                default: {
-                    if (!(object instanceof ImageDatum)) break;
-                    final ImageDatum that = (ImageDatum) object;
-                    return Objects.equals(getPixelInCell(), that.getPixelInCell());
-                }
+        if (!(object instanceof ImageDatum && super.equals(object, mode))) {
+            return false;
+        }
+        switch (mode) {
+            case STRICT: {
+                return Objects.equals(pixelInCell, ((DefaultImageDatum) object).pixelInCell);
+            }
+            default: {
+                return Objects.equals(getPixelInCell(), ((ImageDatum) object).getPixelInCell());
             }
         }
-        return false;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
[UTF-8] Mon Nov 18 23:01:45 2013
@@ -227,33 +227,31 @@ public class DefaultPrimeMeridian extend
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (super.equals(object, mode)) {
-            switch (mode) {
-                case STRICT: {
-                    final DefaultPrimeMeridian that = (DefaultPrimeMeridian) object;
-                    return Numerics.equals(this.greenwichLongitude, that.greenwichLongitude)
&&
-                            Objects.equals(this.angularUnit,        that.angularUnit);
-                }
-                case BY_CONTRACT: {
-                    if (!(object instanceof PrimeMeridian)) break;
-                    final PrimeMeridian that = (PrimeMeridian) object;
-                    return Numerics.equals(getGreenwichLongitude(), that.getGreenwichLongitude())
&&
-                            Objects.equals(getAngularUnit(),        that.getAngularUnit());
-                }
-                default: {
-                    if (!(object instanceof PrimeMeridian)) break;
-                    final DefaultPrimeMeridian that = castOrCopy((PrimeMeridian) object);
-                    return Numerics.epsilonEqual(this.getGreenwichLongitude(NonSI.DEGREE_ANGLE),
-                                                 that.getGreenwichLongitude(NonSI.DEGREE_ANGLE),
mode);
-                    /*
-                     * Note: if mode==IGNORE_METADATA, we relax the unit check because EPSG
uses
-                     *       sexagesimal degrees for the Greenwich meridian. Requirying the
same
-                     *       unit prevent Geodetic.isWGS84(...) method to recognize EPSG's
WGS84.
-                     */
-                }
+        if (!(object instanceof PrimeMeridian && super.equals(object, mode))) {
+            return false;
+        }
+        switch (mode) {
+            case STRICT: {
+                final DefaultPrimeMeridian that = (DefaultPrimeMeridian) object;
+                return Numerics.equals(this.greenwichLongitude, that.greenwichLongitude)
&&
+                        Objects.equals(this.angularUnit,        that.angularUnit);
+            }
+            case BY_CONTRACT: {
+                final PrimeMeridian that = (PrimeMeridian) object;
+                return Numerics.equals(getGreenwichLongitude(), that.getGreenwichLongitude())
&&
+                        Objects.equals(getAngularUnit(),        that.getAngularUnit());
+            }
+            default: {
+                final DefaultPrimeMeridian that = castOrCopy((PrimeMeridian) object);
+                return Numerics.epsilonEqual(this.getGreenwichLongitude(NonSI.DEGREE_ANGLE),
+                                             that.getGreenwichLongitude(NonSI.DEGREE_ANGLE),
mode);
+                /*
+                 * Note: if mode==IGNORE_METADATA, we relax the unit check because EPSG uses
+                 *       sexagesimal degrees for the Greenwich meridian. Requirying the same
+                 *       unit prevent Geodetic.isWGS84(...) method to recognize EPSG's WGS84.
+                 */
             }
         }
-        return false;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
(original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
Mon Nov 18 23:01:45 2013
@@ -198,20 +198,17 @@ public class DefaultTemporalDatum extend
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (super.equals(object, mode)) {
-            switch (mode) {
-                case STRICT: {
-                    final DefaultTemporalDatum that = (DefaultTemporalDatum) object;
-                    return this.origin == that.origin;
-                }
-                default: {
-                    if (!(object instanceof TemporalDatum)) break;
-                    final TemporalDatum that = (TemporalDatum) object;
-                    return Objects.equals(getOrigin(), that.getOrigin());
-                }
+        if (!(object instanceof TemporalDatum && super.equals(object, mode))) {
+            return false;
+        }
+        switch (mode) {
+            case STRICT: {
+                return origin == ((DefaultTemporalDatum) object).origin;
+            }
+            default: {
+                return Objects.equals(getOrigin(), ((TemporalDatum) object).getOrigin());
             }
         }
-        return false;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java?rev=1543219&r1=1543218&r2=1543219&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
[UTF-8] Mon Nov 18 23:01:45 2013
@@ -254,20 +254,17 @@ public class DefaultVerticalDatum extend
         if (object == this) {
             return true; // Slight optimization.
         }
-        if (super.equals(object, mode)) {
-            switch (mode) {
-                case STRICT: {
-                    final DefaultVerticalDatum that = (DefaultVerticalDatum) object;
-                    return Objects.equals(this.type(), that.type());
-                }
-                default: {
-                    if (!(object instanceof VerticalDatum)) break;
-                    final VerticalDatum that = (VerticalDatum) object;
-                    return Objects.equals(getVerticalDatumType(), that.getVerticalDatumType());
-                }
+        if (!(object instanceof VerticalDatum && super.equals(object, mode))) {
+            return false;
+        }
+        switch (mode) {
+            case STRICT: {
+                return Objects.equals(type(), ((DefaultVerticalDatum) object).type());
+            }
+            default: {
+                return Objects.equals(getVerticalDatumType(), ((VerticalDatum) object).getVerticalDatumType());
             }
         }
-        return false;
     }
 
     /**



Mime
View raw message