You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2022/07/16 21:11:05 UTC
[sis] branch geoapi-4.0 updated (edabd5aee9 -> 51cfa9cbab)
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a change to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
from edabd5aee9 Avoid a rounding error which caused the creation of unnecessary concatenated transforms.
new 29ab2c8a44 Remove the `if (quantity instanceof Scalar)` special case in `Quantities` because it add conversions on top of conversions already done. Documentation updates related to units of measurement.
new 758949b24d Fix typo: "is equals" → "is equal"
new 51cfa9cbab Better error message for invalid sexagesimal angles.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../sis/internal/gui/control/ValueColorMapper.java | 2 +-
.../org/apache/sis/openoffice/TransformerTest.java | 2 +-
.../util/resources/IndexedResourceCompiler.java | 2 +-
.../java/org/apache/sis/coverage/Category.java | 2 +-
.../org/apache/sis/coverage/SampleDimension.java | 2 +-
.../org/apache/sis/coverage/grid/GridExtent.java | 8 ++---
.../org/apache/sis/coverage/grid/GridGeometry.java | 6 ++--
.../apache/sis/coverage/grid/ImageRenderer.java | 2 +-
.../apache/sis/feature/AbstractIdentifiedType.java | 2 +-
.../org/apache/sis/filter/BinarySpatialFilter.java | 2 +-
.../apache/sis/filter/DefaultFilterFactory.java | 2 +-
.../sis/coverage/grid/GridDerivationTest.java | 2 +-
.../org/apache/sis/feature/FeatureTestCase.java | 2 +-
.../org/apache/sis/image/InterpolationTest.java | 2 +-
.../org/apache/sis/image/PixelIteratorTest.java | 2 +-
.../java/org/apache/sis/internal/jaxb/Context.java | 4 +--
.../java/org/apache/sis/metadata/TreeNode.java | 2 +-
.../DefaultRepresentativeFraction.java | 4 +--
.../apache/sis/metadata/sql/MetadataWriter.java | 2 +-
.../org/apache/sis/util/iso/DefaultRecordType.java | 2 +-
.../internal/jaxb/ModifiableIdentifierMapTest.java | 2 +-
.../org/apache/sis/metadata/SpecialCasesTest.java | 8 ++---
.../extent/DefaultGeographicBoundingBoxTest.java | 2 +-
.../sis/metadata/iso/extent/ExtentsTest.java | 2 +-
.../java/org/apache/sis/test/MetadataAssert.java | 4 +--
.../sis/test/xml/AnnotationConsistencyCheck.java | 2 +-
.../apache/sis/test/xml/DocumentComparator.java | 2 +-
.../java/org/apache/sis/test/xml/TestCase.java | 6 ++--
.../sis/geometry/AbstractDirectPosition.java | 2 +-
.../org/apache/sis/geometry/AbstractEnvelope.java | 18 +++++-----
.../org/apache/sis/geometry/CoordinateFormat.java | 2 +-
.../java/org/apache/sis/geometry/Envelopes.java | 2 +-
.../sis/parameter/AbstractParameterDescriptor.java | 4 +--
.../org/apache/sis/parameter/TensorParameters.java | 2 +-
.../main/java/org/apache/sis/referencing/CRS.java | 4 +--
.../sis/referencing/datum/BursaWolfParameters.java | 2 +-
.../factory/IdentifiedObjectFinder.java | 2 +-
.../referencing/factory/IdentifiedObjectSet.java | 2 +-
.../sis/referencing/factory/sql/SQLTranslator.java | 2 +-
.../referencing/operation/DefaultConversion.java | 2 +-
.../DefaultCoordinateOperationFactory.java | 2 +-
.../operation/projection/ObliqueStereographic.java | 4 +--
.../operation/transform/AbstractMathTransform.java | 2 +-
.../operation/transform/MathTransforms.java | 4 +--
.../org/apache/sis/geometry/EnvelopesTest.java | 2 +-
.../apache/sis/geometry/GeneralEnvelopeTest.java | 6 ++--
.../java/org/apache/sis/geometry/Shapes2DTest.java | 2 +-
.../org/apache/sis/geometry/TransformTestCase.java | 2 +-
.../referencing/j2d/ShapeUtilitiesTest.java | 4 +--
.../org/apache/sis/io/wkt/TransliteratorTest.java | 4 +--
.../org/apache/sis/parameter/TensorValuesTest.java | 2 +-
.../sis/referencing/GeodeticCalculatorTest.java | 2 +-
.../sis/referencing/cs/CoordinateSystemsTest.java | 4 +--
.../factory/IdentifiedObjectFinderTest.java | 2 +-
.../operation/matrix/MatrixTestCase.java | 6 ++--
.../operation/transform/MathTransformTestCase.java | 2 +-
.../transform/TransformResultComparator.java | 10 +++---
.../sis/referencing/report/HTMLGenerator.java | 2 +-
.../org/apache/sis/test/ReferencingAssert.java | 2 +-
.../apache/sis/test/widget/SwingAssertions.java | 2 +-
.../sis/internal/converter/ConverterRegistry.java | 2 +-
.../org/apache/sis/internal/util/DoubleDouble.java | 6 ++--
.../apache/sis/internal/util/SetOfUnknownSize.java | 6 ++--
.../main/java/org/apache/sis/math/ArrayVector.java | 12 +++----
.../main/java/org/apache/sis/math/Fraction.java | 4 +--
.../java/org/apache/sis/math/MathFunctions.java | 6 ++--
.../src/main/java/org/apache/sis/math/Vector.java | 2 +-
.../java/org/apache/sis/measure/AbstractUnit.java | 6 ++--
.../java/org/apache/sis/measure/Quantities.java | 38 ++++++++++------------
.../org/apache/sis/measure/QuantityFormat.java | 13 +++-----
.../main/java/org/apache/sis/measure/Range.java | 2 +-
.../java/org/apache/sis/measure/RangeFormat.java | 2 +-
.../apache/sis/measure/SexagesimalConverter.java | 14 ++++----
.../java/org/apache/sis/measure/SystemUnit.java | 2 +-
.../java/org/apache/sis/measure/UnitFormat.java | 2 --
.../java/org/apache/sis/measure/UnitServices.java | 2 +-
.../main/java/org/apache/sis/measure/Units.java | 3 --
.../java/org/apache/sis/util/ArgumentChecks.java | 4 +--
.../java/org/apache/sis/util/CharSequences.java | 4 +--
.../main/java/org/apache/sis/util/Emptiable.java | 2 +-
.../org/apache/sis/util/collection/RangeSet.java | 2 +-
.../org/apache/sis/util/collection/TreeTable.java | 4 +--
.../apache/sis/util/collection/WeakHashSet.java | 2 +-
.../java/org/apache/sis/util/resources/Errors.java | 12 +++----
.../apache/sis/util/resources/Errors.properties | 2 +-
.../apache/sis/util/resources/Errors_fr.properties | 2 +-
.../java/org/apache/sis/io/AppenderTestCase.java | 2 +-
.../sis/measure/SexagesimalConverterTest.java | 18 +++++++++-
.../src/test/java/org/apache/sis/test/Assert.java | 2 +-
.../org/apache/sis/internal/netcdf/TestCase.java | 6 ++--
.../internal/storage/csv/MovingFeatureBuilder.java | 4 +--
.../sis/internal/storage/io/ChannelDataOutput.java | 2 +-
.../internal/storage/io/ChannelDataOutputTest.java | 2 +-
.../sis/internal/storage/gpx/ReaderTest.java | 2 +-
94 files changed, 194 insertions(+), 192 deletions(-)
[sis] 03/03: Better error message for invalid sexagesimal angles.
Posted by de...@apache.org.
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 51cfa9cbab075c91455e9d7188f79f9e92132a2a
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Jul 16 19:04:36 2022 +0200
Better error message for invalid sexagesimal angles.
---
.../org/apache/sis/measure/SexagesimalConverter.java | 14 ++++++--------
.../java/org/apache/sis/util/resources/Errors.java | 12 ++++++------
.../org/apache/sis/util/resources/Errors.properties | 2 +-
.../org/apache/sis/util/resources/Errors_fr.properties | 2 +-
.../apache/sis/measure/SexagesimalConverterTest.java | 18 +++++++++++++++++-
5 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/SexagesimalConverter.java b/core/sis-utility/src/main/java/org/apache/sis/measure/SexagesimalConverter.java
index bb87fd296a..0e9122189e 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/SexagesimalConverter.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/SexagesimalConverter.java
@@ -20,7 +20,6 @@ import javax.measure.Unit;
import javax.measure.quantity.Angle;
import javax.measure.UnitConverter;
import org.apache.sis.util.resources.Errors;
-import org.apache.sis.util.resources.Vocabulary;
import org.apache.sis.internal.util.Numerics;
import org.apache.sis.math.MathFunctions;
@@ -40,7 +39,7 @@ import static org.apache.sis.math.MathFunctions.truncate;
* This class and all inner classes are immutable, and thus inherently thread-safe.
*
* @author Martin Desruisseaux (IRD, Geomatys)
- * @version 1.0
+ * @version 1.2
* @since 0.3
* @module
*/
@@ -280,7 +279,7 @@ class SexagesimalConverter extends AbstractConverter {
if (min >= 0) deg++; else deg--;
min = 0;
} else {
- throw illegalField(angle, min, Vocabulary.Keys.AngularMinutes);
+ throw illegalField(angle, min, 0);
}
}
if (sec <= -60 || sec >= 60) { // Do not enter for NaN
@@ -288,7 +287,7 @@ class SexagesimalConverter extends AbstractConverter {
if (sec >= 0) min++; else min--;
sec = 0;
} else {
- throw illegalField(angle, sec, Vocabulary.Keys.AngularSeconds);
+ throw illegalField(angle, sec, 1);
}
}
return (sec/60 + min)/60 + deg;
@@ -299,12 +298,11 @@ class SexagesimalConverter extends AbstractConverter {
*
* @param value the user-supplied angle value.
* @param field the value of the illegal field.
- * @param unit the vocabulary key for the field (minutes or seconds).
+ * @param unit 0 for minutes or 1 for seconds.
* @return the exception to throw.
*/
- private static IllegalArgumentException illegalField(final double value, final double field, final short unit) {
- return new IllegalArgumentException(Errors.format(Errors.Keys.IllegalArgumentField_4,
- "angle", value, Vocabulary.format(unit), field));
+ private static IllegalArgumentException illegalField(final double value, final double field, final int unit) {
+ return new IllegalArgumentException(Errors.format(Errors.Keys.IllegalSexagesimalField_3, value, unit, field));
}
}
}
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
index 739c255be8..7b3d1dfe90 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
@@ -339,12 +339,6 @@ public final class Errors extends IndexedResourceBundle {
*/
public static final short IllegalArgumentClass_3 = 43;
- /**
- * Argument ‘{0}’ can not take the “{1}” value, because the ‘{2}’ field can not take the “{3}”
- * value.
- */
- public static final short IllegalArgumentField_4 = 44;
-
/**
* Argument ‘{0}’ can not take the “{1}” value.
*/
@@ -435,6 +429,12 @@ public final class Errors extends IndexedResourceBundle {
*/
public static final short IllegalRange_2 = 60;
+ /**
+ * Sexagesimal angle {0,number} is illegal because the {1,choice,0#minutes|1#seconds} field can
+ * not take the {2,number} value.
+ */
+ public static final short IllegalSexagesimalField_3 = 44;
+
/**
* Value {1} for “{0}” is not a valid Unicode code point.
*/
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
index c0b3168576..8ea926426d 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
@@ -79,7 +79,6 @@ ForbiddenAttribute_2 = Attribute \u201c{0}\u201d is not allowed for
ForbiddenProperty_1 = Property \u201c{0}\u201d is not allowed.
IllegalArgumentClass_2 = Argument \u2018{0}\u2019 can not be an instance of \u2018{1}\u2019.
IllegalArgumentClass_3 = Argument \u2018{0}\u2019 can not be an instance of \u2018{2}\u2019. Expected an instance of \u2018{1}\u2019 or derived type.
-IllegalArgumentField_4 = Argument \u2018{0}\u2019 can not take the \u201c{1}\u201d value, because the \u2018{2}\u2019 field can not take the \u201c{3}\u201d value.
IllegalArgumentValue_2 = Argument \u2018{0}\u2019 can not take the \u201c{1}\u201d value.
IllegalBitsPattern_1 = Illegal bits pattern: {0}.
IllegalCharacter_2 = The \u201c{1}\u201d character can not be used for \u201c{0}\u201d.
@@ -98,6 +97,7 @@ IllegalPropertyValue_2 = Property \u201c{0}\u201d can not take the \u
IllegalPropertyValueClass_2 = Property \u201c{0}\u201d does not accept instances of \u2018{1}\u2019.
IllegalPropertyValueClass_3 = Expected an instance of \u2018{1}\u2019 for the \u201c{0}\u201d property, but got an instance of \u2018{2}\u2019.
IllegalRange_2 = Range [{0} \u2026 {1}] is not valid.
+IllegalSexagesimalField_3 = Sexagesimal angle {0,number} is illegal because the {1,choice,0#minutes|1#seconds} field can not take the {2,number} value.
IllegalUnicodeCodePoint_2 = Value {1} for \u201c{0}\u201d is not a valid Unicode code point.
IllegalValueForProperty_2 = Illegal value for property \u201c{1}\u201d in \u201c{0}\u201d.
IncompatibleFormat_2 = Can not use the {1} format with \u201c{0}\u201d.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
index b93ab77358..673dd4df77 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
@@ -76,7 +76,6 @@ ForbiddenAttribute_2 = L\u2019attribut \u00ab\u202f{0}\u202f\u00bb
ForbiddenProperty_1 = La propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb n\u2019est pas autoris\u00e9e.
IllegalArgumentClass_2 = L\u2019argument \u2018{0}\u2019 ne peut pas \u00eatre de type \u2018{1}\u2019.
IllegalArgumentClass_3 = L\u2019argument \u2018{0}\u2019 ne peut pas \u00eatre de type \u2018{2}\u2019. Une instance de \u2018{1}\u2019 ou d\u2019un type d\u00e9riv\u00e9 \u00e9tait attendue.
-IllegalArgumentField_4 = L\u2019argument \u2018{0}\u2019 n\u2019accepte pas la valeur \u00ab\u202f{1}\u202f\u00bb parce que le champs \u2018{2}\u2019 ne peut pas prendre la valeur \u00ab\u202f{3}\u202f\u00bb.
IllegalArgumentValue_2 = L\u2019argument \u2018{0}\u2019 n\u2019accepte pas la valeur \u00ab\u202f{1}\u202f\u00bb.
IllegalBitsPattern_1 = Pattern de bits invalide\u00a0: {0}.
IllegalClass_2 = La classe \u2018{1}\u2019 est ill\u00e9gale. Il doit s\u2019agir d\u2019une classe \u2018{0}\u2019 ou d\u00e9riv\u00e9e.
@@ -95,6 +94,7 @@ IllegalPropertyValue_2 = La propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f
IllegalPropertyValueClass_2 = La propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb n\u2019accepte pas les valeurs de type \u2018{1}\u2019.
IllegalPropertyValueClass_3 = Une instance \u2018{1}\u2019 \u00e9tait attendue pour la propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb, mais la valeur donn\u00e9e est une instance de \u2018{2}\u2019.
IllegalRange_2 = La plage [{0} \u2026 {1}] n\u2019est pas valide.
+IllegalSexagesimalField_3 = L\u2019angle sexag\u00e9simal {0,number} est invalide parce que le champs des {1,choice,0#minutes|1#secondes} ne peut pas prendre la valeur {2,number}.
IllegalUnicodeCodePoint_2 = La valeur {1} de \u00ab\u202f{0}\u202f\u00bb n\u2019est pas un code Unicode valide.
IllegalValueForProperty_2 = Valeur ill\u00e9gale pour la propri\u00e9t\u00e9 \u00ab\u202f{1}\u202f\u00bb dans \u00ab\u202f{0}\u202f\u00bb.
IncompatibleFormat_2 = Le format {1} ne s\u2019applique pas \u00e0 \u00ab\u202f{0}\u202f\u00bb.
diff --git a/core/sis-utility/src/test/java/org/apache/sis/measure/SexagesimalConverterTest.java b/core/sis-utility/src/test/java/org/apache/sis/measure/SexagesimalConverterTest.java
index 041dfd50ef..fa5d2f3cbb 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/measure/SexagesimalConverterTest.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/measure/SexagesimalConverterTest.java
@@ -30,7 +30,7 @@ import static org.junit.Assert.*;
* Test the {@link SexagesimalConverter} class.
*
* @author Martin Desruisseaux (Geomatys)
- * @version 1.0
+ * @version 1.3
* @since 0.3
* @module
*/
@@ -92,6 +92,22 @@ public final strictfp class SexagesimalConverterTest extends TestCase {
checkConversion(44.505590277777777, Units.DEGREE, 443020.125, DMS_SCALED);
}
+ /**
+ * Tests the error message on attempt to convert an illegal value.
+ */
+ @Test
+ public void testErrorMessage() {
+ final UnitConverter converter = DMS.getConverterTo(Units.DEGREE);
+ assertEquals(10.5, converter.convert(10.3), STRICT);
+ try {
+ converter.convert(10.7);
+ fail("Conversion of illegal value should not be allowed.");
+ } catch (IllegalArgumentException e) {
+ final String message = e.getMessage();
+ assertNotNull(message); // Can not test message content because it is locale-sensitive.
+ }
+ }
+
/**
* Tests the fix for rounding error in conversion of 46°57'8.66".
* This fix is necessary for avoiding a 4 cm error with Apache SIS
[sis] 02/03: Fix typo: "is equals" → "is equal"
Posted by de...@apache.org.
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 758949b24dbd043a9a34e528a6e0bfca7206f11a
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Jul 16 18:37:31 2022 +0200
Fix typo: "is equals" → "is equal"
---
.../sis/internal/gui/control/ValueColorMapper.java | 2 +-
.../org/apache/sis/openoffice/TransformerTest.java | 2 +-
.../sis/util/resources/IndexedResourceCompiler.java | 2 +-
.../main/java/org/apache/sis/coverage/Category.java | 2 +-
.../java/org/apache/sis/coverage/SampleDimension.java | 2 +-
.../java/org/apache/sis/coverage/grid/GridExtent.java | 8 ++++----
.../org/apache/sis/coverage/grid/GridGeometry.java | 6 +++---
.../org/apache/sis/coverage/grid/ImageRenderer.java | 2 +-
.../org/apache/sis/feature/AbstractIdentifiedType.java | 2 +-
.../org/apache/sis/filter/BinarySpatialFilter.java | 2 +-
.../org/apache/sis/filter/DefaultFilterFactory.java | 2 +-
.../apache/sis/coverage/grid/GridDerivationTest.java | 2 +-
.../java/org/apache/sis/feature/FeatureTestCase.java | 2 +-
.../java/org/apache/sis/image/InterpolationTest.java | 2 +-
.../java/org/apache/sis/image/PixelIteratorTest.java | 2 +-
.../java/org/apache/sis/internal/jaxb/Context.java | 4 ++--
.../main/java/org/apache/sis/metadata/TreeNode.java | 2 +-
.../identification/DefaultRepresentativeFraction.java | 4 ++--
.../org/apache/sis/metadata/sql/MetadataWriter.java | 2 +-
.../org/apache/sis/util/iso/DefaultRecordType.java | 2 +-
.../sis/internal/jaxb/ModifiableIdentifierMapTest.java | 2 +-
.../java/org/apache/sis/metadata/SpecialCasesTest.java | 8 ++++----
.../iso/extent/DefaultGeographicBoundingBoxTest.java | 2 +-
.../apache/sis/metadata/iso/extent/ExtentsTest.java | 2 +-
.../test/java/org/apache/sis/test/MetadataAssert.java | 4 ++--
.../sis/test/xml/AnnotationConsistencyCheck.java | 2 +-
.../org/apache/sis/test/xml/DocumentComparator.java | 2 +-
.../test/java/org/apache/sis/test/xml/TestCase.java | 6 +++---
.../apache/sis/geometry/AbstractDirectPosition.java | 2 +-
.../java/org/apache/sis/geometry/AbstractEnvelope.java | 18 +++++++++---------
.../java/org/apache/sis/geometry/CoordinateFormat.java | 2 +-
.../main/java/org/apache/sis/geometry/Envelopes.java | 2 +-
.../sis/parameter/AbstractParameterDescriptor.java | 4 ++--
.../org/apache/sis/parameter/TensorParameters.java | 2 +-
.../src/main/java/org/apache/sis/referencing/CRS.java | 4 ++--
.../sis/referencing/datum/BursaWolfParameters.java | 2 +-
.../referencing/factory/IdentifiedObjectFinder.java | 2 +-
.../sis/referencing/factory/IdentifiedObjectSet.java | 2 +-
.../sis/referencing/factory/sql/SQLTranslator.java | 2 +-
.../sis/referencing/operation/DefaultConversion.java | 2 +-
.../operation/DefaultCoordinateOperationFactory.java | 2 +-
.../operation/projection/ObliqueStereographic.java | 4 ++--
.../operation/transform/AbstractMathTransform.java | 2 +-
.../operation/transform/MathTransforms.java | 4 ++--
.../java/org/apache/sis/geometry/EnvelopesTest.java | 2 +-
.../org/apache/sis/geometry/GeneralEnvelopeTest.java | 6 +++---
.../java/org/apache/sis/geometry/Shapes2DTest.java | 2 +-
.../org/apache/sis/geometry/TransformTestCase.java | 2 +-
.../internal/referencing/j2d/ShapeUtilitiesTest.java | 4 ++--
.../java/org/apache/sis/io/wkt/TransliteratorTest.java | 4 ++--
.../org/apache/sis/parameter/TensorValuesTest.java | 2 +-
.../apache/sis/referencing/GeodeticCalculatorTest.java | 2 +-
.../sis/referencing/cs/CoordinateSystemsTest.java | 4 ++--
.../factory/IdentifiedObjectFinderTest.java | 2 +-
.../referencing/operation/matrix/MatrixTestCase.java | 6 +++---
.../operation/transform/MathTransformTestCase.java | 2 +-
.../operation/transform/TransformResultComparator.java | 10 +++++-----
.../apache/sis/referencing/report/HTMLGenerator.java | 2 +-
.../java/org/apache/sis/test/ReferencingAssert.java | 2 +-
.../org/apache/sis/test/widget/SwingAssertions.java | 2 +-
.../sis/internal/converter/ConverterRegistry.java | 2 +-
.../org/apache/sis/internal/util/DoubleDouble.java | 6 +++---
.../org/apache/sis/internal/util/SetOfUnknownSize.java | 2 +-
.../src/main/java/org/apache/sis/math/ArrayVector.java | 12 ++++++------
.../src/main/java/org/apache/sis/math/Fraction.java | 4 ++--
.../main/java/org/apache/sis/math/MathFunctions.java | 6 +++---
.../src/main/java/org/apache/sis/math/Vector.java | 2 +-
.../main/java/org/apache/sis/measure/AbstractUnit.java | 6 +++---
.../src/main/java/org/apache/sis/measure/Range.java | 2 +-
.../main/java/org/apache/sis/measure/RangeFormat.java | 2 +-
.../main/java/org/apache/sis/measure/SystemUnit.java | 2 +-
.../main/java/org/apache/sis/util/ArgumentChecks.java | 4 ++--
.../main/java/org/apache/sis/util/CharSequences.java | 4 ++--
.../src/main/java/org/apache/sis/util/Emptiable.java | 2 +-
.../java/org/apache/sis/util/collection/RangeSet.java | 2 +-
.../java/org/apache/sis/util/collection/TreeTable.java | 4 ++--
.../org/apache/sis/util/collection/WeakHashSet.java | 2 +-
.../test/java/org/apache/sis/io/AppenderTestCase.java | 2 +-
.../src/test/java/org/apache/sis/test/Assert.java | 2 +-
.../java/org/apache/sis/internal/netcdf/TestCase.java | 6 +++---
.../sis/internal/storage/csv/MovingFeatureBuilder.java | 4 ++--
.../sis/internal/storage/io/ChannelDataOutput.java | 2 +-
.../sis/internal/storage/io/ChannelDataOutputTest.java | 2 +-
.../apache/sis/internal/storage/gpx/ReaderTest.java | 2 +-
84 files changed, 138 insertions(+), 138 deletions(-)
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ValueColorMapper.java b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ValueColorMapper.java
index b6a27669dd..55c74387a0 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ValueColorMapper.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ValueColorMapper.java
@@ -126,7 +126,7 @@ public final class ValueColorMapper extends TabularWidget {
* This method compares all properties, including visibility and color.
*
* @param other the other object to compare with this step.
- * @return whether the other object is equals to this step.
+ * @return whether the other object is equal to this step.
*/
@Override
public boolean equals(final Object other) {
diff --git a/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/TransformerTest.java b/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/TransformerTest.java
index 5401e000a8..fdf383b136 100644
--- a/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/TransformerTest.java
+++ b/application/sis-openoffice/src/test/java/org/apache/sis/openoffice/TransformerTest.java
@@ -62,7 +62,7 @@ public final strictfp class TransformerTest extends TestCase {
}
/**
- * Asserts that the transformation result is equals to the expected result.
+ * Asserts that the transformation result is equal to the expected result.
*/
static void assertPointsEqual(final double[][] expected, final double[][] actual, final double tolerance) {
assertNotSame("transform", expected, actual);
diff --git a/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java b/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
index bfd7c623c6..c14c9bd9da 100644
--- a/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
+++ b/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
@@ -563,7 +563,7 @@ search: for (int i=0; i<buffer.length(); i++) { // Length of `bu
if (endOfLine >= 0) {
if (buffer.substring(startLineToCompare, endOfLine).equals(line)) {
startLineToCompare = endOfLine + lineSeparator.length();
- continue; // Content is equals, do not set the `modified` flag.
+ continue; // Content is equal, do not set the `modified` flag.
}
} else if (brackets == 0) {
break; // Content finished at the same time, do not set the `modified` flag.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/Category.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/Category.java
index 019c4eaf87..d560e57bc2 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/Category.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/Category.java
@@ -504,7 +504,7 @@ public class Category implements Serializable {
* Compares the specified object with this category for equality.
*
* @param object the object to compare with.
- * @return {@code true} if the given object is equals to this category.
+ * @return {@code true} if the given object is equal to this category.
*/
@Override
public boolean equals(final Object object) {
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
index 700eddbf24..3341b5970f 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
@@ -458,7 +458,7 @@ public class SampleDimension implements Serializable {
* Compares the specified object with this sample dimension for equality.
*
* @param object the object to compare with.
- * @return {@code true} if the given object is equals to this sample dimension.
+ * @return {@code true} if the given object is equal to this sample dimension.
*/
@Override
public boolean equals(final Object object) {
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
index c875ec3ed5..382c111eb3 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
@@ -715,7 +715,7 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable
*
* @param index the dimension for which to obtain the coordinate value.
* @return the low coordinate value at the given dimension, inclusive.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() grid dimension}.
*
* @see #getLow()
@@ -733,7 +733,7 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable
*
* @param index the dimension for which to obtain the coordinate value.
* @return the high coordinate value at the given dimension, <strong>inclusive</strong>.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() grid dimension}.
*
* @see #getHigh()
@@ -753,7 +753,7 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable
*
* @param index the dimension for which to obtain the size.
* @return the number of integer grid coordinates along the given dimension.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() grid dimension}.
* @throws ArithmeticException if the size is too large for the {@code long} primitive type.
*
@@ -953,7 +953,7 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable
*
* @param index the dimension for which to obtain the axis type.
* @return the axis type at the given dimension. May be absent if the type is unknown.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() grid dimension}.
*/
public Optional<DimensionNameType> getAxisType(final int index) {
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
index f3b1730a0e..6456f230c1 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
@@ -245,7 +245,7 @@ public class GridGeometry implements LenientComparable, Serializable {
/**
* An <em>estimation</em> of the grid resolution, in units of the CRS axes.
* Computed from {@link #gridToCRS}, eventually together with {@link #extent}.
- * May be {@code null} if unknown. If non-null, the array length is equals to
+ * May be {@code null} if unknown. If non-null, the array length is equal to
* the number of CRS dimensions.
*
* @see #RESOLUTION
@@ -559,7 +559,7 @@ public class GridGeometry implements LenientComparable, Serializable {
}
/**
- * Ensures that the given dimension is equals to the expected value. If not, throws an exception.
+ * Ensures that the given dimension is equal to the expected value. If not, throws an exception.
* This method assumes that the argument name is {@code "extent"}.
*
* @param extent the extent to validate, or {@code null} if none.
@@ -1563,7 +1563,7 @@ public class GridGeometry implements LenientComparable, Serializable {
* This method delegates to {@code equals(object, ComparisonMode.STRICT)}.
*
* @param object the object to compare with.
- * @return {@code true} if the given object is equals to this grid geometry.
+ * @return {@code true} if the given object is equal to this grid geometry.
*/
@Override
public boolean equals(final Object object) {
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java
index c0ab6e9148..f129e9d96c 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java
@@ -379,7 +379,7 @@ public class ImageRenderer {
}
/**
- * Ensures that the given number is equals to the expected number of bands.
+ * Ensures that the given number is equal to the expected number of bands.
* The given number shall be either 1 (case of interleaved sample model) or
* {@link #getNumBands()} (case of banded sample model).
*/
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java b/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
index 9a11f4d3b4..608d7044dd 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
@@ -354,7 +354,7 @@ public class AbstractIdentifiedType implements IdentifiedType, Deprecable, Seria
* Compares this type with the given object for equality.
*
* @param obj the object to compare with this type.
- * @return {@code true} if the given object is equals to this type.
+ * @return {@code true} if the given object is equal to this type.
*/
@Override
public boolean equals(final Object obj) {
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/BinarySpatialFilter.java b/core/sis-feature/src/main/java/org/apache/sis/filter/BinarySpatialFilter.java
index 72d8187f6b..c7909b26f7 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/BinarySpatialFilter.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/BinarySpatialFilter.java
@@ -33,7 +33,7 @@ import org.opengis.filter.BinarySpatialOperator;
/**
* Spatial operations between two geometries.
* The nature of the operation depends on {@link #getOperatorType()}.
- * A standard set of spatial operators is equals, disjoin, touches,
+ * A standard set of spatial operators is equal, disjoin, touches,
* within, overlaps, crosses, intersects, contains, beyond and BBOX.
*
* @author Johann Sorel (Geomatys)
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
index 158c2f937b..f213150359 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
@@ -800,7 +800,7 @@ public abstract class DefaultFilterFactory<R,G,T> extends AbstractFactory implem
}
/**
- * Creates an operator that checks if first temporal operand is equals to the second.
+ * Creates an operator that checks if first temporal operand is equal to the second.
*
* @param time1 expression fetching the first temporal value.
* @param time2 expression fetching the second temporal value.
diff --git a/core/sis-feature/src/test/java/org/apache/sis/coverage/grid/GridDerivationTest.java b/core/sis-feature/src/test/java/org/apache/sis/coverage/grid/GridDerivationTest.java
index c8b0f6902c..8bf4b8d158 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/coverage/grid/GridDerivationTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/coverage/grid/GridDerivationTest.java
@@ -647,7 +647,7 @@ public final strictfp class GridDerivationTest extends TestCase {
assertExtentEquals(new long[] {0, -3410}, new long[] {75, -3158}, result.getExtent());
assertEnvelopeEquals(new Envelope2D(null,
-175, // Expected minimum value.
- 80, // Not interresting for this test.
+ 80, // Not interesting for this test.
-172 - -175, // Expected maximum value minus minimum.
90 - 80),
result.getEnvelope(), 0.02);
diff --git a/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java b/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java
index 51123b80ab..149443b95d 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java
@@ -126,7 +126,7 @@ public abstract strictfp class FeatureTestCase extends TestCase {
/**
* Sets the attribute of the given name to the given value.
- * First, this method verifies that the previous value is equals to the given one.
+ * First, this method verifies that the previous value is equal to the given one.
* Then, this method set the attribute to the given value and check if the result.
*
* @param name the name of the attribute to set.
diff --git a/core/sis-feature/src/test/java/org/apache/sis/image/InterpolationTest.java b/core/sis-feature/src/test/java/org/apache/sis/image/InterpolationTest.java
index 42899a0c56..3d08d303de 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/image/InterpolationTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/image/InterpolationTest.java
@@ -169,7 +169,7 @@ public final strictfp class InterpolationTest extends TestCase {
}
/**
- * Verifies that a pixel value interpolated in the source image is equals to the expected value.
+ * Verifies that a pixel value interpolated in the source image is equal to the expected value.
*
* @param x <var>x</var> coordinate in the source image, from {@value #XMIN} to {@value #XUP} (exclusive).
* @param y <var>y</var> coordinate in the source image, from {@value #YMIN} to {@value #YUP} (exclusive).
diff --git a/core/sis-feature/src/test/java/org/apache/sis/image/PixelIteratorTest.java b/core/sis-feature/src/test/java/org/apache/sis/image/PixelIteratorTest.java
index 294f0b9d39..22f974956d 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/image/PixelIteratorTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/image/PixelIteratorTest.java
@@ -335,7 +335,7 @@ public strictfp class PixelIteratorTest extends TestCase {
}
/**
- * Verifies that actual iteration order is equals to the expected one.
+ * Verifies that actual iteration order is equal to the expected one.
*
* @param singleTile {@code true} if iteration occurs in a single tile, or {@code false} for the whole image.
*/
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Context.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Context.java
index 801ccad349..034d1bb592 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Context.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Context.java
@@ -378,7 +378,7 @@ public final class Context extends MarshalContext {
}
/**
- * Returns {@code true} if the GML version is equals or newer than the specified version.
+ * Returns {@code true} if the GML version is equal or newer than the specified version.
* If no GML version was specified, then this method returns {@code true}, i.e. newest
* version is assumed.
*
@@ -387,7 +387,7 @@ public final class Context extends MarshalContext {
*
* @param context the current context, or {@code null} if none.
* @param version the version to compare to.
- * @return {@code true} if the GML version is equals or newer than the specified version.
+ * @return {@code true} if the GML version is equal or newer than the specified version.
*
* @see #getVersion(String)
*/
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java
index 87206bfbca..e2b3f25810 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java
@@ -381,7 +381,7 @@ class TreeNode implements Node {
* in order to get the singular form instead of the plural one, because we will create one
* node for each element in a collection.
*
- * <p>If the property name is equals, ignoring case, to the simple type name, then this method
+ * <p>If the property name is equal, ignoring case, to the simple type name, then this method
* returns the subtype name (<a href="https://issues.apache.org/jira/browse/SIS-298">SIS-298</a>).
* For example instead of:</p>
*
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
index 9063a05981..9e069dc56c 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
@@ -232,7 +232,7 @@ public class DefaultRepresentativeFraction extends Number implements Representat
}
/**
- * Returns 1 if the {@linkplain #getDenominator() denominator} is equals to 1, or 0 otherwise.
+ * Returns 1 if the {@linkplain #getDenominator() denominator} is equal to 1, or 0 otherwise.
*
* <div class="note"><b>Rational:</b>
* This method is defined that way because scales smaller than 1 can
@@ -246,7 +246,7 @@ public class DefaultRepresentativeFraction extends Number implements Representat
}
/**
- * Returns 1 if the {@linkplain #getDenominator() denominator} is equals to 1, or 0 otherwise.
+ * Returns 1 if the {@linkplain #getDenominator() denominator} is equal to 1, or 0 otherwise.
*
* <div class="note"><b>Rational:</b>
* This method is defined that way because scales smaller than 1 can
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataWriter.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataWriter.java
index cd4f0bf194..4343c03512 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataWriter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataWriter.java
@@ -303,7 +303,7 @@ public class MetadataWriter extends MetadataSource {
}
/*
* We have found a column to add. Check if the column actually needs to be added to the parent table
- * (if such parent exists). In most case, the answer is "no" and 'addTo' is equals to 'table'.
+ * (if such parent exists). In most case, the answer is "no" and 'addTo' is equal to 'table'.
*/
String addTo = table;
if (helper.dialect.supportsTableInheritance) {
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
index 9d06b2ad1f..19919c24b9 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
@@ -163,7 +163,7 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
this.container = container;
this.fieldTypes = computeTransientFields(fields);
/*
- * Ensure that the record namespace is equals to the schema name. For example if the schema
+ * Ensure that the record namespace is equal to the schema name. For example if the schema
* name is "MyNameSpace", then the record type name can be "MyNameSpace:MyRecordType".
*/
final LocalName schemaName = container.getSchemaName();
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMapTest.java b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMapTest.java
index ea161da842..7e09c87dcb 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMapTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMapTest.java
@@ -52,7 +52,7 @@ public final strictfp class ModifiableIdentifierMapTest extends TestCase {
private static final String TO_REPLACE = "xlink:href=“";
/**
- * Asserts that the content of the given map is equals to the given content, represented as a string.
+ * Asserts that the content of the given map is equal to the given content, represented as a string.
* This method replaces the {@code xlink:href} value by the {@link XLink#toString()} value before to
* compare with the map content. This is needed because the "special case rules" cause the {@code "href"}
* identifier to be replaced by {@code "xlink:href"}.
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
index 365790b4d0..70d623e283 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/SpecialCasesTest.java
@@ -69,14 +69,14 @@ public final strictfp class SpecialCasesTest extends TestCase {
/**
* Invokes {@link SpecialCases#type(int, TypeValuePolicy)}
- * and ensures that the result is equals to the expected value.
+ * and ensures that the result is equal to the expected value.
*/
private void assertTypeEquals(final String name, final Class<?> expected) {
assertEquals(name, expected, accessor.type(accessor.indexOf(name, true), TypeValuePolicy.ELEMENT_TYPE));
}
/**
- * Invokes {@link SpecialCases#get(int, Object)} and ensures that the result is equals to the expected value.
+ * Invokes {@link SpecialCases#get(int, Object)} and ensures that the result is equal to the expected value.
*/
private void assertPropertyEquals(final String name, final Object expected) {
assertEquals(name, expected, accessor.get(accessor.indexOf(name, true), box));
@@ -84,7 +84,7 @@ public final strictfp class SpecialCasesTest extends TestCase {
/**
* Invokes {@link SpecialCases#set(int, Object, Object, int)} in {@code RETURN_PREVIOUS} mode with the given
- * {@code newValue}, and ensures that the return value is equals to the given {@code oldValue}.
+ * {@code newValue}, and ensures that the return value is equal to the given {@code oldValue}.
*/
private void assertPreviousEquals(final String name, final Object oldValue, final Object newValue) {
final Object value = accessor.set(accessor.indexOf(name, true), box, newValue, PropertyAccessor.RETURN_PREVIOUS);
@@ -93,7 +93,7 @@ public final strictfp class SpecialCasesTest extends TestCase {
/**
* Invokes {@link SpecialCases#set(int, Object, Object, int)} in {@code APPEND} mode with the given
- * {@code newValue}, and ensures that the return value is equals to the given {@code changed}.
+ * {@code newValue}, and ensures that the return value is equal to the given {@code changed}.
*/
private void assertAppendResultEquals(final String name, final Boolean changed, final Object newValue) {
final Object value = accessor.set(accessor.indexOf(name, true), box, newValue, PropertyAccessor.APPEND);
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
index 0dfa5d9a0e..3c0582f703 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBoxTest.java
@@ -323,7 +323,7 @@ public final strictfp class DefaultGeographicBoundingBoxTest extends TestCase {
/**
* Asserts that the result of applying the {@code add} or {@code intersect} operation on {@code b1}
- * is equals to the given values. This method tests also with horizontally flipped boxes, and tests
+ * is equal to the given values. This method tests also with horizontally flipped boxes, and tests
* with interchanged boxes.
*
* @param union {@code true} for {@code b1.add(b2)}, or {@code false} for {@code b1.intersect(b2)}.
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java
index 09667c1ed1..134f1be9b1 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java
@@ -147,7 +147,7 @@ public final strictfp class ExtentsTest extends TestCase {
@Test
public void testArea() {
/*
- * The nautical mile is equals to the length of 1 second of arc along a meridian or parallel at the equator.
+ * The nautical mile is equal to the length of 1 second of arc along a meridian or parallel at the equator.
* Since we are using the GRS80 authalic sphere instead of WGS84, and since the nautical mile definition
* itself is a little bit approximated, we add a slight empirical shift.
*/
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java b/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
index e7b78d4ff8..29b2912d68 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
@@ -55,7 +55,7 @@ public strictfp class MetadataAssert extends Assert {
}
/**
- * Asserts that the English title of the given citation is equals to the expected string.
+ * Asserts that the English title of the given citation is equal to the expected string.
*
* @param message the message to report in case of test failure.
* @param expected the expected English title.
@@ -74,7 +74,7 @@ public strictfp class MetadataAssert extends Assert {
/**
* Asserts that the given citation has only one responsible party,
- * and its English name is equals to the expected string.
+ * and its English name is equal to the expected string.
*
* @param message the message to report in case of test failure.
* @param expected the expected English responsibly party name.
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
index 021c59d249..0b8b75578f 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
@@ -898,7 +898,7 @@ public abstract strictfp class AnnotationConsistencyCheck extends TestCase {
getter.isAnnotationPresent(XmlElementRefs.class));
}
/*
- * If the annotation is @XmlElement, ensure that XmlElement.name() is equals
+ * If the annotation is @XmlElement, ensure that XmlElement.name() is equal
* to the UML identifier. Then verify that the namespace is the expected one.
*/
if (element != null) {
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/DocumentComparator.java b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/DocumentComparator.java
index 5b293b0efa..14a34c33ac 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/DocumentComparator.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/DocumentComparator.java
@@ -715,7 +715,7 @@ public strictfp class DocumentComparator {
* The first line will contain the root of the tree. Other lines will contain
* the child down in the hierarchy until the given node, inclusive.
*
- * <p>This method formats only a summary if the hierarchy is equals to the expected one.</p>
+ * <p>This method formats only a summary if the hierarchy is equal to the expected one.</p>
*
* @param buffer the buffer in which to append the formatted hierarchy.
* @param node the node for which to format the parents.
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/TestCase.java b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/TestCase.java
index 925ba3b0b4..74d6acd151 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/TestCase.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/TestCase.java
@@ -196,7 +196,7 @@ public abstract strictfp class TestCase extends org.apache.sis.test.TestCase {
}
/**
- * Marshals the given object and ensure that the result is equals to the content of the given file.
+ * Marshals the given object and ensure that the result is equal to the content of the given file.
*
* @param filename the name of the XML file in the package of the final subclass of {@code this}.
* @param object the object to marshal.
@@ -213,7 +213,7 @@ public abstract strictfp class TestCase extends org.apache.sis.test.TestCase {
}
/**
- * Marshals the given object and ensure that the result is equals to the content of the given file.
+ * Marshals the given object and ensure that the result is equal to the content of the given file.
*
* @param filename the name of the XML file in the package of the final subclass of {@code this}.
* @param object the object to marshal.
@@ -231,7 +231,7 @@ public abstract strictfp class TestCase extends org.apache.sis.test.TestCase {
}
/**
- * Marshals the given object and ensure that the result is equals to the content of the given file,
+ * Marshals the given object and ensure that the result is equal to the content of the given file,
* within a tolerance threshold for numerical values.
*
* @param filename the name of the XML file in the package of the final subclass of {@code this}.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
index 51495bbe82..e310d99c5d 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
@@ -134,7 +134,7 @@ public abstract class AbstractDirectPosition extends FormattableObject implement
*
* @param dimension the dimension for the coordinate of interest.
* @param value the coordinate value of interest.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() position dimension}.
* @throws UnsupportedOperationException if this direct position is immutable.
*/
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
index fd7652823b..6263e26f64 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
@@ -356,7 +356,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
*
* @param dimension the dimension for which to obtain the coordinate value.
* @return the starting coordinate value at the given dimension.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() envelope dimension}.
*
* @see #getLowerCorner()
@@ -371,7 +371,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
*
* @param dimension the dimension for which to obtain the coordinate value.
* @return the starting coordinate value at the given dimension.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() envelope dimension}.
*
* @see #getUpperCorner()
@@ -388,7 +388,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
*
* @param dimension the dimension for which to obtain the coordinate value.
* @return the minimal coordinate value at the given dimension.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() envelope dimension}.
*/
@Override
@@ -410,7 +410,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
*
* @param dimension the dimension for which to obtain the coordinate value.
* @return the maximal coordinate value at the given dimension.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() envelope dimension}.
*/
@Override
@@ -425,7 +425,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
/**
* Returns the median coordinate along the specified dimension.
- * In most cases, the result is equals (minus rounding error) to:
+ * In most cases, the result is equal (minus rounding error) to:
*
* {@preformat java
* median = (getUpper(dimension) + getLower(dimension)) / 2;
@@ -443,7 +443,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
*
* @param dimension the dimension for which to obtain the coordinate value.
* @return the median coordinate at the given dimension, or {@link Double#NaN}.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() envelope dimension}.
*
* @see #getMedian()
@@ -478,7 +478,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
/**
* Returns the envelope span (typically width or height) along the specified dimension.
- * In most cases, the result is equals (minus rounding error) to:
+ * In most cases, the result is equal (minus rounding error) to:
*
* {@preformat java
* span = getUpper(dimension) - getLower(dimension);
@@ -494,7 +494,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
*
* @param dimension the dimension for which to obtain the span.
* @return the span (typically width or height) at the given dimension, or {@link Double#NaN}.
- * @throws IndexOutOfBoundsException if the given index is negative or is equals or greater
+ * @throws IndexOutOfBoundsException if the given index is negative or is equal or greater
* than the {@linkplain #getDimension() envelope dimension}.
*/
@Override
@@ -874,7 +874,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
/*
* If this envelope does not cross the anti-meridian but the given envelope does,
* then this envelope does not contain the given envelope except in the special
- * case where the envelope spanning is equals or greater than the axis spanning
+ * case where the envelope spanning is equal or greater than the axis spanning
* (including the case where this envelope expands to infinities).
*/
if ((lower0 == Double.NEGATIVE_INFINITY && upper0 == Double.POSITIVE_INFINITY) ||
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java
index 194ae0ec89..c06a06491c 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/CoordinateFormat.java
@@ -178,7 +178,7 @@ public class CoordinateFormat extends CompoundFormat<DirectPosition> {
/**
* Value of {@link #desiredPrecisions} which cause {@link #accuracyText} to be shown.
* For each dimension identified by {@link #groundDimensions}, if the corresponding
- * value in {@link #desiredPrecisions} is equals or smaller to this threshold, then
+ * value in {@link #desiredPrecisions} is equal or smaller to this threshold, then
* {@link #accuracyText} will be appended after the formatted coordinates.
*
* @see #desiredPrecisions
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
index c420ab4918..e270524438 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
@@ -833,7 +833,7 @@ poles: for (int i=0; i<dimension; i++) {
if ((includedMinValue & includedMaxValue & dimensionBitMask) == 0 && CoordinateOperations.isWrapAround(axis)) {
isWrapAroundAxis |= dimensionBitMask;
}
- // Restore `targetPt` to its initial state, which is equals to `centerPt`.
+ // Restore `targetPt` to its initial state, which is equal to `centerPt`.
if (targetPt != null) {
targetPt.setOrdinate(i, centerPt[i]);
}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
index 5801217913..061a620e73 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
@@ -382,7 +382,7 @@ public abstract class AbstractParameterDescriptor extends AbstractIdentifiedObje
/**
* Invoked by JAXB for marshalling the {@link #minimumOccurs} value. Omit marshalling of this
- * {@code gml:minimumOccurs} element if its value is equals to the default value, which is 1.
+ * {@code gml:minimumOccurs} element if its value is equal to the default value, which is 1.
*/
@XmlElement(name = "minimumOccurs")
@XmlSchemaType(name = "nonNegativeInteger")
@@ -393,7 +393,7 @@ public abstract class AbstractParameterDescriptor extends AbstractIdentifiedObje
/**
* Invoked by JAXB for marshalling the {@link #maximumOccurs} value. Omit marshalling of this
- * {@code gml:maximumOccurs} element if its value is equals to the default value, which is 1.
+ * {@code gml:maximumOccurs} element if its value is equal to the default value, which is 1.
*
* <p>This property should not be marshalled in {@link DefaultParameterDescriptor} objects (the GML schema
* does not allow that). It should be marshalled only for {@link DefaultParameterDescriptorGroup} objects.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java
index 3695c53a9d..761c47afa3 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java
@@ -384,7 +384,7 @@ public class TensorParameters<E> implements Serializable {
}
/**
- * Verifies that the length of the given array is equals to the tensor rank.
+ * Verifies that the length of the given array is equal to the tensor rank.
*/
private void verifyRank(final int[] indices) {
if (indices.length != rank()) {
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
index acb27f0868..18e19dad8a 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
@@ -1326,8 +1326,8 @@ public final class CRS extends Static {
* searches for a {@linkplain CompoundCRS#getComponents() component} where:
* <ul>
* <li>The {@linkplain org.apache.sis.referencing.cs.AbstractCS#getDimension() number of dimensions}
- * is equals to {@code upper - lower};</li>
- * <li>The sum of the number of dimensions of all previous CRS is equals to {@code lower}.</li>
+ * is equal to {@code upper - lower};</li>
+ * <li>The sum of the number of dimensions of all previous CRS is equal to {@code lower}.</li>
* </ul>
* If such component is found, then it is returned.</li>
* <li>Otherwise (i.e. no component match), this method returns {@code null}.</li>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
index 71cfec9528..004fcdf0b5 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
@@ -344,7 +344,7 @@ public class BursaWolfParameters extends FormattableObject implements Cloneable,
}
/**
- * Returns {@code true} if the {@linkplain #targetDatum target datum} is equals (at least on computation purpose)
+ * Returns {@code true} if the {@linkplain #targetDatum target datum} is equal (at least on computation purpose)
* to the WGS84 datum. If the datum is unspecified, then this method returns {@code true} since WGS84 is the only
* datum supported by the WKT 1 format, and is what users often mean.
*
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java
index cac325a4b0..19f8396102 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java
@@ -570,7 +570,7 @@ public class IdentifiedObjectFinder {
* <p>This method is invoked by the default {@link #find(IdentifiedObject)} method implementation.
* The caller iterates through the returned codes, instantiate the objects and compare them with
* the specified one in order to determine which codes are really applicable.
- * The iteration stops as soon as a match is found (in other words, if more than one object is equals
+ * The iteration stops as soon as a match is found (in other words, if more than one object is equal
* to the specified one, then the {@code find(…)} method selects the first one in iteration order).</p>
*
* <h4>Default implementation</h4>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java
index f1365b5db9..de5a619f2c 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java
@@ -476,7 +476,7 @@ public class IdentifiedObjectSet<T extends IdentifiedObject> extends AbstractSet
* {@link FactoryException} (except the ones accepted as {@linkplain #isRecoverableFailure recoverable failures})
* are thrown as if they were never wrapped into {@link BackingStoreException}.
*
- * @param n the number of object to resolve. If this number is equals or greater than {@link #size()}, then
+ * @param n the number of object to resolve. If this number is equal or greater than {@link #size()}, then
* this method ensures that all {@code IdentifiedObject} instances in this collection are created.
* @throws FactoryException if an {@linkplain #createObject(String) object creation} failed.
*/
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java
index e099d5e2fb..7925511fa9 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java
@@ -507,7 +507,7 @@ public class SQLTranslator implements Function<String,String> {
}
/**
- * Replaces the text at the given position in the buffer if it is equals to the {@code expected} text.
+ * Replaces the text at the given position in the buffer if it is equal to the {@code expected} text.
*/
private static boolean replaceIfEquals(final StringBuilder ansi, final int pos,
final String expected, final String replacement)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
index dcc444c940..92ac8c9899 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
@@ -431,7 +431,7 @@ public class DefaultConversion extends AbstractSingleOperation implements Conver
}
/**
- * Ensures that the {@code actual} CRS uses a datum which is equals, ignoring metadata,
+ * Ensures that the {@code actual} CRS uses a datum which is equal, ignoring metadata,
* to the datum of the {@code expected} CRS.
*
* @param param the parameter name, used only in case of error.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
index 3cd1f00d9d..833d3f4bdc 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
@@ -557,7 +557,7 @@ next: for (int i=components.size(); --i >= 0;) {
* - Otherwise we have a datum change, which implies that we have a Transformation.
*
* In the case of Conversion, we can specialize one step more if the conversion is going from a geographic CRS
- * to a projected CRS. It may seems that we should check if ProjectedCRS.getBaseCRS() is equals (ignoring meta
+ * to a projected CRS. It may seems that we should check if ProjectedCRS.getBaseCRS() is equal (ignoring meta
* data) to source CRS. But we already checked the datum, which is the important part. The axis order and unit
* could be different, which we want to allow.
*/
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
index 615bad75ba..d68b5d3e7e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
@@ -327,7 +327,7 @@ public class ObliqueStereographic extends NormalizedProjection {
final double cosφ = cos(φ);
final double dχ_dφ = (1/cosφ - cosφ*eccentricitySquared/(1 - ℯsinφ*ℯsinφ)) * 2*n*sqrt(w) / (w + 1);
/*
- * Above ∂χ/∂φ is equals to 1 in the spherical case.
+ * Above ∂χ/∂φ is equal to 1 in the spherical case.
* Remaining formulas below are the same than in the spherical case.
*/
final double B2 = B * B;
@@ -360,7 +360,7 @@ public class ObliqueStereographic extends NormalizedProjection {
final double j = atan2(x, g - y) - i;
/*
* The conformal longitude is Λ = j + 2i + Λ₀. In the particular case of stereographic projection,
- * the geodetic longitude λ is equals to Λ. Furthermore in Apache SIS implementation, Λ₀ is added by
+ * the geodetic longitude λ is equal to Λ. Furthermore in Apache SIS implementation, Λ₀ is added by
* the denormalization matrix and shall not be handled here. The only remaining part is λ = j + 2i.
*/
final double λ = j + 2*i;
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
index 8e3709d859..fc1a8547a8 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
@@ -785,7 +785,7 @@ public abstract class AbstractMathTransform extends FormattableObject
* The default implementation performs the following steps:
*
* <ul>
- * <li>Ensure that the {@code point} dimension is equals to this math transform
+ * <li>Ensure that the {@code point} dimension is equal to this math transform
* {@linkplain #getSourceDimensions() source dimensions}.</li>
* <li>Copy the coordinate in a temporary array and pass that array to the
* {@link #transform(double[], int, double[], int, boolean)} method,
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
index 65af836c6c..73e125f7a9 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
@@ -375,9 +375,9 @@ public final class MathTransforms extends Static {
* <p>Invariants:</p>
* <ul>
* <li>The {@linkplain AbstractMathTransform#getSourceDimensions() source dimensions} of the returned transform
- * is equals to the sum of the source dimensions of all given transforms.</li>
+ * is equal to the sum of the source dimensions of all given transforms.</li>
* <li>The {@linkplain AbstractMathTransform#getTargetDimensions() target dimensions} of the returned transform
- * is equals to the sum of the target dimensions of all given transforms.</li>
+ * is equal to the sum of the target dimensions of all given transforms.</li>
* </ul>
*
* @param components the transforms to aggregate in a single transform, in the given order.
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/geometry/EnvelopesTest.java b/core/sis-referencing/src/test/java/org/apache/sis/geometry/EnvelopesTest.java
index 5f4967b33e..3f17668fcf 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/geometry/EnvelopesTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/geometry/EnvelopesTest.java
@@ -102,7 +102,7 @@ public final strictfp class EnvelopesTest extends TransformTestCase<GeneralEnvel
}
/**
- * Asserts that the given envelope is equals to the expected value.
+ * Asserts that the given envelope is equal to the expected value.
*/
@Override
void assertGeometryEquals(GeneralEnvelope expected, GeneralEnvelope actual, double tolx, double toly) {
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java b/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java
index d2e44c180f..ac572c78be 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/geometry/GeneralEnvelopeTest.java
@@ -85,7 +85,7 @@ public strictfp class GeneralEnvelopeTest extends TestCase {
}
/**
- * Asserts that the given two-dimensional envelope is equals to the given rectangle.
+ * Asserts that the given two-dimensional envelope is equal to the given rectangle.
* The {@code xLower} and {@code xUpper} arguments are the <var>x</var> coordinate values
* for the lower and upper corners respectively. The actual {@code xmin} and {@code ymin}
* values will be inferred from those corners.
@@ -129,7 +129,7 @@ public strictfp class GeneralEnvelopeTest extends TestCase {
}
/**
- * Asserts that the intersection of the two following envelopes is equals to the given rectangle.
+ * Asserts that the intersection of the two following envelopes is equal to the given rectangle.
* First, this method tests using the {@link Envelope2D} implementation. Then, it tests using the
* {@link GeneralEnvelope} implementation.
*/
@@ -159,7 +159,7 @@ public strictfp class GeneralEnvelopeTest extends TestCase {
}
/**
- * Asserts that the union of the two following envelopes is equals to the given rectangle.
+ * Asserts that the union of the two following envelopes is equal to the given rectangle.
* First, this method tests using the {@link Envelope2D} implementation.
* Then, it tests using the {@link GeneralEnvelope} implementation.
*
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/geometry/Shapes2DTest.java b/core/sis-referencing/src/test/java/org/apache/sis/geometry/Shapes2DTest.java
index 8862db46de..53a6556fbe 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/geometry/Shapes2DTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/geometry/Shapes2DTest.java
@@ -79,7 +79,7 @@ public final strictfp class Shapes2DTest extends TransformTestCase<Rectangle2D>
}
/**
- * Asserts that the given rectangle is equals to the expected value.
+ * Asserts that the given rectangle is equal to the expected value.
*/
@Override
void assertGeometryEquals(Rectangle2D expected, Rectangle2D actual, double tolx, double toly) {
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/geometry/TransformTestCase.java b/core/sis-referencing/src/test/java/org/apache/sis/geometry/TransformTestCase.java
index 0514d7f4da..27233c28dd 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/geometry/TransformTestCase.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/geometry/TransformTestCase.java
@@ -80,7 +80,7 @@ public abstract strictfp class TransformTestCase<G> extends TestCase {
abstract boolean contains(G outer, G inner);
/**
- * Asserts that the given envelope or rectangle is equals to the expected value.
+ * Asserts that the given envelope or rectangle is equal to the expected value.
*/
abstract void assertGeometryEquals(G expected, G actual, double tolx, double toly);
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesTest.java b/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesTest.java
index a0653a9885..efac0d66e9 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/j2d/ShapeUtilitiesTest.java
@@ -44,7 +44,7 @@ public final strictfp class ShapeUtilitiesTest extends TestCase {
private static final double EPS = 1E-12;
/**
- * Asserts that the given point is equals to the given value.
+ * Asserts that the given point is equal to the given value.
*/
private static void assertPointEquals(final double x, final double y, final Point2D point) {
assertEquals(x, point.getX(), EPS);
@@ -95,7 +95,7 @@ public final strictfp class ShapeUtilitiesTest extends TestCase {
/**
* Invokes {@code ShapeUtilities.fitParabol(x1, y1, px, py, x2, y2, horizontal)},
- * then verifies that the control point of the returned curve is equals to {@code (cx, cy)}.
+ * then verifies that the control point of the returned curve is equal to {@code (cx, cy)}.
*/
private static void assertParabolEquals(final double cx, final double cy,
final double x1, final double y1,
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/TransliteratorTest.java b/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/TransliteratorTest.java
index c1f35d737a..77e89b7c66 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/TransliteratorTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/TransliteratorTest.java
@@ -119,7 +119,7 @@ public final strictfp class TransliteratorTest extends TestCase {
/**
* Asserts that the name of the given axis, after replacement by a short name,
- * is equals to the expected string.
+ * is equal to the expected string.
*/
private static void assertShortAxisNameEquals(final String expected, final CoordinateSystemAxisMock axis) {
assertEquals("name", expected, Transliterator.DEFAULT.toShortAxisName(axis,
@@ -128,7 +128,7 @@ public final strictfp class TransliteratorTest extends TestCase {
/**
* Asserts that the abbreviation of the given axis, after replacement of Greek letters,
- * is equals to the expected string.
+ * is equal to the expected string.
*/
private static void assertAbbreviationEquals(final String expected, final CoordinateSystemAxisMock axis) {
assertEquals("abbreviation", expected, Transliterator.DEFAULT.toLatinAbbreviation(axis,
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java b/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java
index a47d554f54..f2fc84dbbb 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java
@@ -333,7 +333,7 @@ public final strictfp class TensorValuesTest extends TestCase {
* Tests {@link TensorParameters#ALPHANUM} formatting.
* <ul>
* <li>Group name shall be {@code "Affine parametric transformation"}.</li>
- * <li>No {@code "num_row"} or {@code "num_col"} parameters if their value is equals to 3.</li>
+ * <li>No {@code "num_row"} or {@code "num_col"} parameters if their value is equal to 3.</li>
* <li>Parameter names shall be of the form {@code "A0"}.</li>
* <li>Identifiers present, but only for A0-A2 and B0-B2.</li>
* </ul>
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java
index 3dcbcdf8c4..57e6980bc0 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java
@@ -75,7 +75,7 @@ public strictfp class GeodeticCalculatorTest extends TestCase {
}
/**
- * Verifies that the given point is equals to the given latitude and longitude.
+ * Verifies that the given point is equal to the given latitude and longitude.
*
* @param φ the expected latitude value, in degrees.
* @param λ the expected longitude value, in degrees.
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java
index cc10dab379..cc4dbc864a 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java
@@ -132,7 +132,7 @@ public final strictfp class CoordinateSystemsTest extends TestCase {
}
/**
- * Asserts that the angle between the parsed directions is equals to the given value.
+ * Asserts that the angle between the parsed directions is equal to the given value.
* This method tests also the angle by interchanging the axis directions.
*/
private static void assertAngleEquals(final boolean isElevation, final double expected,
@@ -146,7 +146,7 @@ public final strictfp class CoordinateSystemsTest extends TestCase {
}
/**
- * Asserts that the angle between the given directions is equals to the given value.
+ * Asserts that the angle between the given directions is equal to the given value.
* This method tests also the angle by interchanging the given directions.
*/
private static void assertAngleEquals(final boolean isElevation, final double expected,
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/IdentifiedObjectFinderTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/IdentifiedObjectFinderTest.java
index 83e29ba6a1..3baf8bd64d 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/IdentifiedObjectFinderTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/IdentifiedObjectFinderTest.java
@@ -89,7 +89,7 @@ public final strictfp class IdentifiedObjectFinderTest extends TestCase {
finder.findSingleton(search));
finder.setSearchDomain(IdentifiedObjectFinder.Domain.VALID_DATASET);
- assertSame("A full scan should allow us to find WGS84, since it is equals ignoring metadata to CRS:84.",
+ assertSame("A full scan should allow us to find WGS84, since it is equal ignoring metadata to CRS:84.",
CRS84, finder.findSingleton(search));
}
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
index 749ddb1678..d1522ed14e 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
@@ -149,7 +149,7 @@ public abstract strictfp class MatrixTestCase extends TestCase {
}
/**
- * Verifies that the SIS matrix is equals to the JAMA one, up to the given tolerance value.
+ * Verifies that the SIS matrix is equal to the JAMA one, up to the given tolerance value.
*
* @param expected the JAMA matrix used as a reference implementation.
* @param actual the SIS matrix to compare to JAMA.
@@ -177,7 +177,7 @@ public abstract strictfp class MatrixTestCase extends TestCase {
}
/**
- * Asserts that the given matrix is equals to the given expected values, up to the given tolerance threshold.
+ * Asserts that the given matrix is equal to the given expected values, up to the given tolerance threshold.
* This method compares the elements values in two slightly redundant ways.
*/
static void assertEqualsElements(final double[] expected, final int numRow, final int numCol,
@@ -190,7 +190,7 @@ public abstract strictfp class MatrixTestCase extends TestCase {
}
/**
- * Asserts that an element from the given matrix is equals to the expected value, using a relative threshold.
+ * Asserts that an element from the given matrix is equal to the expected value, using a relative threshold.
*/
private static void assertEqualsRelative(final String message, final double expected,
final MatrixSIS matrix, final int row, final int column)
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
index 7ee9d065d6..7b949b16ee 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
@@ -218,7 +218,7 @@ public abstract strictfp class MathTransformTestCase extends TransformTestCase {
}
/**
- * Transforms the given coordinates and verifies that the result is equals (within a positive delta)
+ * Transforms the given coordinates and verifies that the result is equal (within a positive delta)
* to the expected ones. If the difference between an expected and actual coordinate value is greater
* than the {@linkplain #tolerance tolerance} threshold, then the assertion fails.
*
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformResultComparator.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformResultComparator.java
index ca59ed4fbc..817b3f46a2 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformResultComparator.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformResultComparator.java
@@ -61,7 +61,7 @@ final strictfp class TransformResultComparator implements MathTransform {
}
/**
- * Delegates to the tested implementation and verifies that the value is equals
+ * Delegates to the tested implementation and verifies that the value is equal
* to the one provided by the reference implementation.
*/
@Override
@@ -72,7 +72,7 @@ final strictfp class TransformResultComparator implements MathTransform {
}
/**
- * Delegates to the tested implementation and verifies that the value is equals
+ * Delegates to the tested implementation and verifies that the value is equal
* to the one provided by the reference implementation.
*/
@Override
@@ -83,7 +83,7 @@ final strictfp class TransformResultComparator implements MathTransform {
}
/**
- * Delegates to the tested implementation and verifies that the value is equals
+ * Delegates to the tested implementation and verifies that the value is equal
* to the one provided by the reference implementation.
*/
@Override
@@ -94,7 +94,7 @@ final strictfp class TransformResultComparator implements MathTransform {
}
/**
- * Delegates to the tested implementation and verifies that the value is equals
+ * Delegates to the tested implementation and verifies that the value is equal
* to the one provided by the reference implementation.
*/
@Override
@@ -105,7 +105,7 @@ final strictfp class TransformResultComparator implements MathTransform {
}
/**
- * Delegates to the tested implementation and verifies that the value is equals
+ * Delegates to the tested implementation and verifies that the value is equal
* to the one provided by the reference implementation.
*/
@Override
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java
index f8751f3d4a..86404ec20a 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java
@@ -185,7 +185,7 @@ abstract strictfp class HTMLGenerator implements Closeable {
}
/**
- * Closes the last HTML tag if it is equals to the given element, and opens a new tag on the same line.
+ * Closes the last HTML tag if it is equal to the given element, and opens a new tag on the same line.
*
* @param tag the HTML tag without brackets (e.g. {@code "h2"}).
* @throws IOException if an error occurred while writing to the file.
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java b/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
index b4f61f0d0d..617af3ace8 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
@@ -132,7 +132,7 @@ public strictfp class ReferencingAssert extends MetadataAssert {
}
/**
- * Asserts that the tip of the unique alias of the given object is equals to the expected value.
+ * Asserts that the tip of the unique alias of the given object is equal to the expected value.
* As a special case if the expected value is null, then this method verifies that the given object has no alias.
*
* @param expected the expected alias, or {@code null} if we expect no alias.
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/test/widget/SwingAssertions.java b/core/sis-referencing/src/test/java/org/apache/sis/test/widget/SwingAssertions.java
index afbf9b44a3..ed2aee7d16 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/test/widget/SwingAssertions.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/test/widget/SwingAssertions.java
@@ -38,7 +38,7 @@ public final strictfp class SwingAssertions {
}
/**
- * Ensures that a tree is equals to an other tree.
+ * Ensures that a tree is equal to an other tree.
* This method invokes itself recursively for every child nodes.
*
* @param expected the expected tree, or {@code null}.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java
index eb25d9328c..2d1a07e128 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java
@@ -151,7 +151,7 @@ public class ConverterRegistry {
}
/**
- * If {@code existing} or one of its children is equals to the given {@code converter},
+ * If {@code existing} or one of its children is equal to the given {@code converter},
* returns it. Otherwise returns {@code null}.
*
* @param <S> the {@code converter} source class.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
index 792ecb419b..4b483d600a 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
@@ -88,7 +88,7 @@ public final class DoubleDouble extends Number {
/**
* When computing <var>a</var> - <var>b</var> as a double-double (106 significand bits) value,
- * if the amount of non-zero significand bits is equals or lower than {@code ZERO_THRESHOLD+1},
+ * if the amount of non-zero significand bits is equal or lower than {@code ZERO_THRESHOLD+1},
* consider the result as zero.
*/
private static final int ZERO_THRESHOLD = 2;
@@ -382,9 +382,9 @@ public final class DoubleDouble extends Number {
}
/**
- * Returns {@code true} if this {@code DoubleDouble} is equals to zero.
+ * Returns {@code true} if this {@code DoubleDouble} is equal to zero.
*
- * @return {@code true} if this {@code DoubleDouble} is equals to zero.
+ * @return {@code true} if this {@code DoubleDouble} is equal to zero.
*/
public boolean isZero() {
return value == 0 && error == 0;
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/SetOfUnknownSize.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/SetOfUnknownSize.java
index 399bdf67e3..620ef2b972 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/SetOfUnknownSize.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/SetOfUnknownSize.java
@@ -181,7 +181,7 @@ public abstract class SetOfUnknownSize<E> extends AbstractSet<E> {
* iterate over the elements of this Set. The reason is that this Set may compute the values dynamically and
* it is sometime difficult to ensure that this Set's iterator is fully consistent with the values recognized
* by the contains(Object) method. For example the iterator may return "EPSG:4326" while the contains(Object)
- * method may accept both "EPSG:4326" and "EPSG:4326". For this equals(Object) method, we consider the
+ * method may accept both "EPSG:4326" and "EPSG:4326". For this equal(Object) method, we consider the
* contains(Object) method of the other Set as more reliable.
*/
if (object == this) {
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/ArrayVector.java b/core/sis-utility/src/main/java/org/apache/sis/math/ArrayVector.java
index 1b5c65ae77..c2b108f9d1 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/ArrayVector.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/ArrayVector.java
@@ -275,7 +275,7 @@ abstract class ArrayVector<E extends Number> extends Vector implements CheckedCo
return true;
}
- /** Returns whether this vector in the given range is equals to the specified vector. */
+ /** Returns whether this vector in the given range is equal to the specified vector. */
@Override boolean equals(final int lower, final int upper, final Vector other, final int otherOffset) {
if (other instanceof Doubles) {
return JDK9.equals(array, lower, upper,
@@ -395,7 +395,7 @@ abstract class ArrayVector<E extends Number> extends Vector implements CheckedCo
return true;
}
- /** Returns whether this vector in the given range is equals to the specified vector. */
+ /** Returns whether this vector in the given range is equal to the specified vector. */
@Override final boolean equals(final int lower, final int upper, final Vector other, final int otherOffset) {
if (other.getClass() == getClass()) {
return JDK9.equals(array, lower, upper,
@@ -555,7 +555,7 @@ abstract class ArrayVector<E extends Number> extends Vector implements CheckedCo
return index;
}
- /** Returns whether this vector in the given range is equals to the specified vector. */
+ /** Returns whether this vector in the given range is equal to the specified vector. */
@Override final boolean equals(final int lower, final int upper, final Vector other, final int otherOffset) {
if (other.getClass() == getClass()) {
return JDK9.equals(array, lower, upper,
@@ -685,7 +685,7 @@ abstract class ArrayVector<E extends Number> extends Vector implements CheckedCo
return index;
}
- /** Returns whether this vector in the given range is equals to the specified vector. */
+ /** Returns whether this vector in the given range is equal to the specified vector. */
@Override final boolean equals(final int lower, final int upper, final Vector other, final int otherOffset) {
if (other.getClass() == getClass()) {
return JDK9.equals(array, lower, upper,
@@ -819,7 +819,7 @@ abstract class ArrayVector<E extends Number> extends Vector implements CheckedCo
return index;
}
- /** Returns whether this vector in the given range is equals to the specified vector. */
+ /** Returns whether this vector in the given range is equal to the specified vector. */
@Override final boolean equals(final int lower, final int upper, final Vector other, final int otherOffset) {
if (other.getClass() == getClass()) {
return JDK9.equals(array, lower, upper,
@@ -928,7 +928,7 @@ abstract class ArrayVector<E extends Number> extends Vector implements CheckedCo
return index;
}
- /** Returns whether this vector in the given range is equals to the specified vector. */
+ /** Returns whether this vector in the given range is equal to the specified vector. */
@Override final boolean equals(int lower, final int upper, final Vector other, int otherOffset) {
if (other.getClass() == getClass()) {
return JDK9.equals(array, lower, upper,
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java b/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
index 6e59a67b28..c3479f3b54 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
@@ -92,7 +92,7 @@ public final class Fraction extends Number implements Comparable<Fraction>, Seri
* will be smaller depending on the {@linkplain #denominator} required for representing that value.
*
* @param value the double-precision value to convert to a fraction.
- * @return a fraction such as {@link #doubleValue()} is equals to the given value.
+ * @return a fraction such as {@link #doubleValue()} is equal to the given value.
* @throws IllegalArgumentException if the given value can not be converted to a fraction.
*
* @since 1.0
@@ -210,7 +210,7 @@ public final class Fraction extends Number implements Comparable<Fraction>, Seri
/**
* Returns a fraction equivalent to {@code num} / {@code den} after simplification.
- * If the simplified fraction is equals to {@code this}, then this method returns {@code this}.
+ * If the simplified fraction is equal to {@code this}, then this method returns {@code this}.
*
* <p>The arguments given to this method are the results of multiplications and additions of {@code int} values.
* This method fails if any argument value is {@link Long#MIN_VALUE} because that value can not be made positive.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java b/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
index 1b8ca41522..0cdee86f93 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
@@ -212,7 +212,7 @@ public final class MathFunctions extends Static {
* the value is negative.
*
* @param value the value to truncate.
- * @return the largest in magnitude (further from zero) integer value which is equals
+ * @return the largest in magnitude (further from zero) integer value which is equal
* or less in magnitude than the given value.
*/
public static double truncate(final double value) {
@@ -385,8 +385,8 @@ public final class MathFunctions extends Static {
*
* Special cases:
* <ul>
- * <li>If <var>x</var> is equals or lower than -324, then the result is 0.</li>
- * <li>If <var>x</var> is equals or greater than 309, then the result is {@linkplain Double#POSITIVE_INFINITY positive infinity}.</li>
+ * <li>If <var>x</var> is equal or lower than -324, then the result is 0.</li>
+ * <li>If <var>x</var> is equal or greater than 309, then the result is {@linkplain Double#POSITIVE_INFINITY positive infinity}.</li>
* <li>If <var>x</var> is in the [0 … 18] range inclusive, then the result is exact.</li>
* <li>For all other <var>x</var> values, the result is the closest IEEE 754 approximation.</li>
* </ul>
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java b/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
index 31556b5932..2270ece019 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
@@ -1663,7 +1663,7 @@ search: for (;;) {
}
/**
- * Returns {@code true} if this vector in the given range is equals to the specified vector.
+ * Returns {@code true} if this vector in the given range is equal to the specified vector.
* NaN values are considered equal to all other NaN values, and -0.0 is different than +0.0.
*
* @param lower index of the first value to compare in this vector, inclusive.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java b/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java
index 47bb1b69b8..18e04368f4 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java
@@ -361,7 +361,7 @@ abstract class AbstractUnit<Q extends Quantity<Q>> implements Unit<Q>, LenientCo
/**
* Returns the result of setting the origin of the scale of measurement to the given value.
- * For example {@code CELSIUS = KELVIN.shift(273.15)} returns a unit where 0°C is equals to 273.15 K.
+ * For example {@code CELSIUS = KELVIN.shift(273.15)} returns a unit where 0°C is equal to 273.15 K.
*
* @param offset the value to add when converting from the new unit to this unit.
* @return this unit offset by the specified value, or {@code this} if the given offset is zero.
@@ -385,7 +385,7 @@ abstract class AbstractUnit<Q extends Quantity<Q>> implements Unit<Q>, LenientCo
/**
* Returns the result of multiplying this unit by the specified factor.
- * For example {@code KILOMETRE = METRE.multiply(1000)} returns a unit where 1 km is equals to 1000 m.
+ * For example {@code KILOMETRE = METRE.multiply(1000)} returns a unit where 1 km is equal to 1000 m.
*
* @param multiplier the scale factor when converting from the new unit to this unit.
* @return this unit scaled by the specified multiplier.
@@ -413,7 +413,7 @@ abstract class AbstractUnit<Q extends Quantity<Q>> implements Unit<Q>, LenientCo
/**
* Returns the result of dividing this unit by an approximate divisor.
- * For example {@code GRAM = KILOGRAM.divide(1000)} returns a unit where 1 g is equals to 0.001 kg.
+ * For example {@code GRAM = KILOGRAM.divide(1000)} returns a unit where 1 g is equal to 0.001 kg.
*
* @param divisor the inverse of the scale factor when converting from the new unit to this unit.
* @return this unit divided by the specified divisor.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java b/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
index adde620501..6ba1731f3e 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
@@ -665,7 +665,7 @@ public class Range<E extends Comparable<? super E>> implements CheckedContainer<
*
* <ul>
* <li>If the range {@linkplain #isEmpty() is empty}, then this method returns "{@code {}}".</li>
- * <li>Otherwise if the minimal value is equals to the maximal value, then the string
+ * <li>Otherwise if the minimal value is equal to the maximal value, then the string
* representation of that value is returned inside braces as in "{@code {value}}".</li>
* <li>Otherwise the string representation of the minimal and maximal values are formatted
* like "{@code [min … max]}" for inclusive endpoints or "{@code (min … max)}" for exclusive
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java b/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
index 3e35eac1f9..a6c4337e26 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
@@ -55,7 +55,7 @@ import org.apache.sis.internal.util.Numerics;
*
* <ul>
* <li>If the range {@linkplain Range#isEmpty() is empty}, then the range is represented by "{@code {}}".</li>
- * <li>Otherwise if the {@linkplain Range#getMinValue() minimal value} is equals to the
+ * <li>Otherwise if the {@linkplain Range#getMinValue() minimal value} is equal to the
* {@linkplain Range#getMaxValue() maximal value}, then that single value is formatted
* inside braces as in "{@code {value}}".</li>
* <li>Otherwise the minimal and maximal values are formatted inside bracket or parenthesis,
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java b/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
index d4ddc59759..0fdaec916c 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
@@ -320,7 +320,7 @@ final class SystemUnit<Q extends Quantity<Q>> extends AbstractUnit<Q> implements
}
/**
- * Returns {@code true} if this unit is equals to the given unit ignoring name, symbol and EPSG code.
+ * Returns {@code true} if this unit is equal to the given unit ignoring name, symbol and EPSG code.
* This method should always returns {@code true} if parameterized type has not been compromised with
* raw types or unchecked casts.
*
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java b/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
index 4240e1be35..10f6d756ac 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
@@ -173,7 +173,7 @@ public final class ArgumentChecks extends Static {
/**
* Makes sure that an array is non-null and non-empty. If the given {@code array} is null,
- * then a {@link NullArgumentException} is thrown. Otherwise if the array length is equals
+ * then a {@link NullArgumentException} is thrown. Otherwise if the array length is equal
* to 0, then an {@link IllegalArgumentException} is thrown.
*
* @param name the name of the argument to be checked. Used only if an exception is thrown.
@@ -331,7 +331,7 @@ public final class ArgumentChecks extends Static {
}
/**
- * Ensures that the given index is equals or greater than zero and lower than the given
+ * Ensures that the given index is equal or greater than zero and lower than the given
* upper value. This method is designed for methods that expect an index value as the only
* argument. For this reason, this method does not take the argument name.
*
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java b/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
index 80006a0bbf..da114b333b 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
@@ -518,7 +518,7 @@ search: for (; fromIndex <= toIndex; fromIndex++) {
* Returns the index of the first non-white character in the given range.
* If the given range contains only space characters, then this method returns the index of the
* first character after the given range, which is always equals or greater than {@code toIndex}.
- * Note that this character may not exist if {@code toIndex} is equals to the text length.
+ * Note that this character may not exist if {@code toIndex} is equal to the text length.
*
* <p>Special cases:</p>
* <ul>
@@ -2165,7 +2165,7 @@ cmp: while (ia < lga) {
*
* <p>This method is similar to {@link String#replace(CharSequence, CharSequence)} except that is accepts
* arbitrary {@code CharSequence} objects. As of Java 10, another difference is that this method does not
- * create a new {@code String} if {@code toSearch} is equals to {@code replaceBy}.</p>
+ * create a new {@code String} if {@code toSearch} is equal to {@code replaceBy}.</p>
*
* @param text the character sequence in which to perform the replacements, or {@code null}.
* @param toSearch the string to replace.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Emptiable.java b/core/sis-utility/src/main/java/org/apache/sis/util/Emptiable.java
index 6d3171ee74..a377a31c8b 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/Emptiable.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/Emptiable.java
@@ -23,7 +23,7 @@ package org.apache.sis.util;
* Some examples of emptiable classes are:
*
* <ul>
- * <li>{@link org.apache.sis.measure.Range} when the lower bounds is equals to the upper bounds and at least
+ * <li>{@link org.apache.sis.measure.Range} when the lower bounds is equal to the upper bounds and at least
* one bound is exclusive.</li>
* <li>{@link org.apache.sis.metadata.AbstractMetadata} when no property value has been given to the metadata,
* or all properties are themselves empty.</li>
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
index ad0b99588b..ce7df4dc3c 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
@@ -1402,7 +1402,7 @@ public class RangeSet<E extends Comparable<? super E>> extends AbstractSet<Range
return -1;
}
} else if (!((index & 1) == 0 ? isMinIncluded : isMaxIncluded)) {
- // The value is equals to an excluded endpoint.
+ // The value is equal to an excluded endpoint.
return -1;
}
index /= 2; // Round toward 0 (odd index are maximum values).
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
index 8d71f62586..3665317aa3 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
@@ -242,9 +242,9 @@ public interface TreeTable {
*
* <ul>
* <li>The given object is also a {@code Node}.</li>
- * <li>The list returned by {@link TreeTable#getColumns()} is equals for both nodes.</li>
+ * <li>The list returned by {@link TreeTable#getColumns()} is equal for both nodes.</li>
* <li>The objects returned by {@link #getValue(TableColumn)} are equal for each column.</li>
- * <li>The list returned by {@linkplain #getChildren() children} is equals for both node.</li>
+ * <li>The list returned by {@linkplain #getChildren() children} is equal for both node.</li>
* </ul>
*
* The node returned by {@link #getParent()} shall <strong>not</strong> be taken in account.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
index fec31f2850..a518ae3851 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
@@ -45,7 +45,7 @@ import static org.apache.sis.util.collection.WeakEntry.*;
* <h2>Optimizing memory use in factory implementations</h2>
* The {@code WeakHashSet} class has a {@link #get(Object)} method that is not part of the
* {@link java.util.Set} interface. This {@code get} method retrieves an entry from this set
- * that is equals to the supplied object. The {@link #unique(Object)} method combines a
+ * that is equal to the supplied object. The {@link #unique(Object)} method combines a
* {@code get} followed by a {@code add} operation if the specified object was not in the set.
* This is similar in spirit to the {@link String#intern()} method. The following example shows
* a convenient way to use {@code WeakHashSet} as an internal pool of immutable objects:
diff --git a/core/sis-utility/src/test/java/org/apache/sis/io/AppenderTestCase.java b/core/sis-utility/src/test/java/org/apache/sis/io/AppenderTestCase.java
index 46a8d8c967..9b5cbc8181 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/io/AppenderTestCase.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/io/AppenderTestCase.java
@@ -67,7 +67,7 @@ public abstract class AppenderTestCase extends TestCase {
abstract void run(final String lineSeparator) throws IOException;
/**
- * Ensures that the buffer content is equals to the given string.
+ * Ensures that the buffer content is equal to the given string.
*
* @param expected the expected content.
* @throws IOException should never happen since the tests will write in a buffer.
diff --git a/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java b/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java
index 9a1b6d9644..fc4fb732eb 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java
@@ -311,7 +311,7 @@ public strictfp class Assert extends org.opengis.test.Assert {
/**
* Serializes the given object in memory, deserializes it and ensures that the deserialized
- * object is equals to the original one. This method does not write anything to the disk.
+ * object is equal to the original one. This method does not write anything to the disk.
*
* <p>If the serialization fails, then this method throws an {@link AssertionError}
* as do the other JUnit assertion methods.</p>
diff --git a/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
index bd2adecb2c..f6d8c9f240 100644
--- a/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
+++ b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
@@ -213,7 +213,7 @@ public abstract strictfp class TestCase extends org.apache.sis.test.TestCase {
}
/**
- * Asserts that the textual value of the named attribute is equals to the expected value.
+ * Asserts that the textual value of the named attribute is equal to the expected value.
* The {@link #selectDataset(TestData)} method must be invoked at least once before this method.
*
* @param expected the expected attribute value.
@@ -225,7 +225,7 @@ public abstract strictfp class TestCase extends org.apache.sis.test.TestCase {
}
/**
- * Asserts that the numeric value of the named attribute is equals to the expected value.
+ * Asserts that the numeric value of the named attribute is equal to the expected value.
* The {@link #selectDataset(TestData)} method must be invoked at least once before this method.
*
* @param expected the expected attribute value.
@@ -237,7 +237,7 @@ public abstract strictfp class TestCase extends org.apache.sis.test.TestCase {
}
/**
- * Asserts that the temporal value of the named attribute is equals to the expected value.
+ * Asserts that the temporal value of the named attribute is equal to the expected value.
* The {@link #selectDataset(TestData)} method must be invoked at least once before this method.
*
* @param expected the expected attribute value.
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/MovingFeatureBuilder.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/MovingFeatureBuilder.java
index 9d19f6f023..fca3055017 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/MovingFeatureBuilder.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/MovingFeatureBuilder.java
@@ -229,7 +229,7 @@ final class MovingFeatureBuilder extends MovingFeatures {
}
/*
* At this point we have a non-empty valid sequence of coordinate values. If the first point of current
- * vector is equals to the last point of previous vector, assume that they form a continuous polyline.
+ * vector is equal to the last point of previous vector, assume that they form a continuous polyline.
*/
if (previous != null) {
if (equals(previous, v, dimension)) {
@@ -280,7 +280,7 @@ final class MovingFeatureBuilder extends MovingFeatures {
}
/**
- * Returns {@code true} if the last coordinate of the {@code previous} vector is equals to the first
+ * Returns {@code true} if the last coordinate of the {@code previous} vector is equal to the first
* coordinate of the {@code next} vector.
*
* @param previous the previous vector.
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelDataOutput.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelDataOutput.java
index 84244c68df..4fd559232a 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelDataOutput.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelDataOutput.java
@@ -682,7 +682,7 @@ public class ChannelDataOutput extends ChannelData implements Flushable {
/**
* Writes fully the buffer content from its position to its limit.
- * After this method call, the buffer position is equals to its limit.
+ * After this method call, the buffer position is equal to its limit.
*
* @throws IOException if an error occurred while writing to the channel.
*/
diff --git a/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/io/ChannelDataOutputTest.java b/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/io/ChannelDataOutputTest.java
index 5a422165a9..6c86ccbfc2 100644
--- a/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/io/ChannelDataOutputTest.java
+++ b/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/io/ChannelDataOutputTest.java
@@ -113,7 +113,7 @@ public strictfp class ChannelDataOutputTest extends ChannelDataTestCase {
}
/**
- * Asserts that the content of {@link #testedStream} is equals to the content of {@link #referenceStream}.
+ * Asserts that the content of {@link #testedStream} is equal to the content of {@link #referenceStream}.
* This method closes the reference stream before to perform the comparison.
*/
final void assertStreamContentEquals() throws IOException {
diff --git a/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java b/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java
index e53176bd96..da119f8e5e 100644
--- a/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java
+++ b/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java
@@ -122,7 +122,7 @@ public final strictfp class ReaderTest extends TestCase {
}
/**
- * Asserts that the string value of {@code actual} is equals to the expected value.
+ * Asserts that the string value of {@code actual} is equal to the expected value.
*
* @param expected the expected value (can be {@code null}).
* @param actual the actual value (can be {@code null}).
[sis] 01/03: Remove the `if (quantity instanceof Scalar)` special case in `Quantities` because it add conversions on top of conversions already done. Documentation updates related to units of measurement.
Posted by de...@apache.org.
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 29ab2c8a4470bb677bbd4a370a616f600eda3063
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Jul 16 18:26:43 2022 +0200
Remove the `if (quantity instanceof Scalar)` special case in `Quantities` because it add conversions on top of conversions already done.
Documentation updates related to units of measurement.
---
.../apache/sis/internal/util/SetOfUnknownSize.java | 4 +--
.../java/org/apache/sis/measure/Quantities.java | 38 ++++++++++------------
.../org/apache/sis/measure/QuantityFormat.java | 13 +++-----
.../java/org/apache/sis/measure/UnitFormat.java | 2 --
.../java/org/apache/sis/measure/UnitServices.java | 2 +-
.../main/java/org/apache/sis/measure/Units.java | 3 --
6 files changed, 25 insertions(+), 37 deletions(-)
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/SetOfUnknownSize.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/SetOfUnknownSize.java
index be3fcda9f4..399bdf67e3 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/SetOfUnknownSize.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/SetOfUnknownSize.java
@@ -68,8 +68,8 @@ public abstract class SetOfUnknownSize<E> extends AbstractSet<E> {
/**
* Returns the number of elements in this set. The default implementation counts the number of elements
- * returned by the {@link #iterator() iterator}. Subclasses are encouraged to cache this value if they
- * know that the underlying storage is immutable.
+ * returned by the {@linkplain #iterator() iterator}. Subclasses are encouraged to cache this value
+ * if they know that the underlying storage is immutable.
*
* @return the number of elements in this set.
*/
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/Quantities.java b/core/sis-utility/src/main/java/org/apache/sis/measure/Quantities.java
index 3c47d6242d..f798ca6a74 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/Quantities.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/Quantities.java
@@ -42,7 +42,7 @@ import org.apache.sis.util.resources.Errors;
* </ul>
*
* @author Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.3
* @since 0.8
* @module
*/
@@ -218,25 +218,23 @@ public final class Quantities extends Static {
Number v2 = u2.getConverterTo(s2).convert(q2.getValue());
if (Numbers.isNaN(v2)) return q1;
if (Numbers.isNaN(v1)) return q2;
- /*
- * If the two types are instances of `Scalar`, we can compare them directly. Otherwise convert the
- * `Scalar` type (if any) to `Double` type, then convert again to the widest type of both values.
- */
- final boolean t1 = (v1 instanceof Scalar);
- final boolean t2 = (v2 instanceof Scalar);
- if (!(t1 & t2)) {
- if (t1) v1 = v1.doubleValue();
- if (t2) v2 = v2.doubleValue();
- final Class<? extends Number> type = Numbers.widestClass(v1, v2);
- v1 = Numbers.cast(v1, type);
- v2 = Numbers.cast(v2, type);
- }
- /*
- * Both v1 and v2 are instance of `Comparable<?>` because `Numbers.widestClass(…)`
- * accepts only known number types such as `Integer`, `Float`, `BigDecimal`, etc.
- */
- @SuppressWarnings("unchecked")
- final int c = ((Comparable) v1).compareTo((Comparable) v2);
+ final int c = compare(v1, v2);
return (max ? c >= 0 : c <= 0) ? q1 : q2;
}
+
+ /**
+ * Compares the two given number, without casting to {@code double} if we can avoid that cast.
+ * The intent is to avoid loosing precision for example by casting a {@code BigDecimal}.
+ */
+ @SuppressWarnings("unchecked")
+ private static int compare(final Number v1, final Number v2) {
+ if (v1 instanceof Comparable<?>) {
+ if (v1.getClass().isInstance(v2)) {
+ return ((Comparable) v1).compareTo(v2);
+ } else if (v2 instanceof Comparable<?> && v2.getClass().isInstance(v1)) {
+ return -((Comparable) v2).compareTo(v1);
+ }
+ }
+ return Double.compare(v1.doubleValue(), v2.doubleValue());
+ }
}
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/QuantityFormat.java b/core/sis-utility/src/main/java/org/apache/sis/measure/QuantityFormat.java
index 9060ccf455..b727122486 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/QuantityFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/QuantityFormat.java
@@ -24,6 +24,7 @@ import java.text.ParsePosition;
import javax.measure.Quantity;
import javax.measure.Unit;
import org.apache.sis.util.ArgumentChecks;
+import org.apache.sis.internal.util.FinalFieldSetter;
/**
@@ -130,16 +131,10 @@ public class QuantityFormat extends Format {
public QuantityFormat clone() {
final QuantityFormat clone = (QuantityFormat) super.clone();
try {
- java.lang.reflect.Field field;
- field = QuantityFormat.class.getField("numberFormat");
- field.setAccessible(true);
- field.set(clone, numberFormat.clone());
-
- field = QuantityFormat.class.getField("unitFormat");
- field.setAccessible(true);
- field.set(clone, unitFormat.clone());
+ FinalFieldSetter.set(QuantityFormat.class, "numberFormat", "unitFormat",
+ clone, numberFormat.clone(), unitFormat.clone());
} catch (ReflectiveOperationException e) {
- throw new AssertionError(e);
+ throw FinalFieldSetter.cloneFailure(e);
}
return clone;
}
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java b/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
index d5df26e825..73ca72bff9 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
@@ -68,8 +68,6 @@ import static java.util.logging.Logger.getLogger;
* The attributes in netCDF files often merge the axis direction with the angular unit,
* as in {@code "degrees_east"}, {@code "degrees_north"} or {@code "Degrees North"}.
* This class ignores those suffixes and unconditionally returns {@link Units#DEGREE} for all axis directions.
- * In particular, the units for {@code "degrees_west"} and {@code "degrees_east"} do <strong>not</strong> have
- * opposite sign. It is caller responsibility to handle the direction of axes associated to netCDF units.
*
* <h2>Multi-threading</h2>
* {@code UnitFormat} is generally not thread-safe. If units need to be parsed or formatted in different threads,
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/UnitServices.java b/core/sis-utility/src/main/java/org/apache/sis/measure/UnitServices.java
index 386e114762..0c615ea354 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/UnitServices.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/UnitServices.java
@@ -46,7 +46,7 @@ import static java.util.logging.Logger.getLogger;
* without direct dependency. A {@code UnitServices} instance can be obtained by call to {@link #current()}.
*
* @author Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.2
* @since 0.8
* @module
*/
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java b/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
index 0cad26f04f..d2fa3a646f 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
@@ -1709,9 +1709,6 @@ public final class Units extends Static {
* The attributes in netCDF files often merge the axis direction with the angular unit,
* as in {@code "degrees_east"} or {@code "degrees_north"}. This {@code valueOf} method
* ignores those suffixes and unconditionally returns {@link #DEGREE} for all axis directions.
- * In particular, the units for {@code "degrees_west"} and {@code "degrees_east"}
- * do <strong>not</strong> have opposite sign.
- * It is caller responsibility to handle the direction of axes associated to netCDF units.
*
* @param uom the symbol to parse, or {@code null}.
* @return the parsed symbol, or {@code null} if {@code uom} was null.