This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 11bade0b822800f949eb5c05058a023bbea8bb00 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Thu Feb 8 18:27:17 2024 +0100 Rename an internal method: `negativeResult` → `emptyResult`. --- .../main/org/apache/sis/filter/BinaryGeometryFilter.java | 6 +++--- .../main/org/apache/sis/filter/BinarySpatialFilter.java | 6 +++--- .../main/org/apache/sis/filter/DistanceFilter.java | 6 +++--- .../main/org/apache/sis/geometry/wrapper/GeometryWrapper.java | 4 ++-- .../org/apache/sis/geometry/wrapper/SpatialOperationContext.java | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/BinaryGeometryFilter.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/BinaryGeometryFilter.java index c7f0875914..61e27d49eb 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/BinaryGeometryFilter.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/BinaryGeometryFilter.java @@ -209,8 +209,8 @@ abstract class BinaryGeometryFilter<R> extends Node implements SpatialOperator<R literalIsNull = (literal.getValue() == null); final boolean result; if (literalIsNull) { - // If the literal has no value, then the filter will always evaluate to a negative result. - result = negativeResult(); + // If the literal has no value, then the filter will always evaluate to an empty result. + result = emptyResult(); } else { /* * If we are optimizing for a feature type, and if the other expression is a property value, @@ -252,5 +252,5 @@ abstract class BinaryGeometryFilter<R> extends Node implements SpatialOperator<R /** * Returns the value to return when a test cannot be applied. */ - protected abstract boolean negativeResult(); + protected abstract boolean emptyResult(); } diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/BinarySpatialFilter.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/BinarySpatialFilter.java index 7a3eb192d2..240cd00afc 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/BinarySpatialFilter.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/BinarySpatialFilter.java @@ -147,14 +147,14 @@ final class BinarySpatialFilter<R> extends BinaryGeometryFilter<R> implements Bi warning(e, true); } } - return negativeResult(); + return emptyResult(); } /** * Returns the value to return when a test cannot be applied. */ @Override - protected boolean negativeResult() { - return SpatialOperationContext.negativeResult(operatorType); + protected boolean emptyResult() { + return SpatialOperationContext.emptyResult(operatorType); } } diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/DistanceFilter.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/DistanceFilter.java index 4b551af15d..72d5a396fc 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/DistanceFilter.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/DistanceFilter.java @@ -164,14 +164,14 @@ final class DistanceFilter<R> extends BinaryGeometryFilter<R> implements Distanc warning(e, true); } } - return negativeResult(); + return emptyResult(); } /** * Returns the value to return when a test cannot be applied. */ @Override - protected boolean negativeResult() { - return SpatialOperationContext.negativeResult(operatorType); + protected boolean emptyResult() { + return SpatialOperationContext.emptyResult(operatorType); } } diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/GeometryWrapper.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/GeometryWrapper.java index 7771d235e7..51c7e8f5f5 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/GeometryWrapper.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/GeometryWrapper.java @@ -220,7 +220,7 @@ public abstract class GeometryWrapper extends AbstractGeometry implements Geomet * No common CRS. Consider that we have no intersection, no overlap, etc. * since the two geometries are existing in different coordinate spaces. */ - return SpatialOperationContext.negativeResult(type); + return SpatialOperationContext.emptyResult(type); } /** @@ -252,7 +252,7 @@ public abstract class GeometryWrapper extends AbstractGeometry implements Geomet * No common CRS. Consider that we have no intersection, no overlap, etc. * since the two geometries are existing in different coordinate spaces. */ - return SpatialOperationContext.negativeResult(type); + return SpatialOperationContext.emptyResult(type); } /** diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java index eb2d80eda3..f6c399813b 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java @@ -450,7 +450,7 @@ select: if (commonCRS == null) { * @param type the test that could not be applied. * @return the operation result to assume. */ - public static boolean negativeResult(final SpatialOperatorName type) { + public static boolean emptyResult(final SpatialOperatorName type) { return type == SpatialOperatorName.DISJOINT; } @@ -461,7 +461,7 @@ select: if (commonCRS == null) { * @param type the test that could not be applied. * @return the operation result to assume. */ - public static boolean negativeResult(final DistanceOperatorName type) { + public static boolean emptyResult(final DistanceOperatorName type) { return type == DistanceOperatorName.BEYOND; } }