Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -23,6 +23,7 @@ import java.util.List; import java.util.ListIterator; import java.util.ArrayList; import java.util.Iterator; +import java.util.Objects; import java.util.logging.Level; import java.util.logging.LogRecord; import javax.measure.IncommensurableException; @@ -76,7 +77,6 @@ import org.apache.sis.util.collection.Ba import org.apache.sis.util.resources.Vocabulary; // Branch-dependent imports -import java.util.Objects; import org.apache.sis.internal.jdk8.JDK8; import org.apache.sis.internal.jdk8.Predicate;
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -20,6 +20,7 @@ import java.util.Map; import java.util.List; import java.util.ArrayList; import java.util.Collections; +import java.util.Objects; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @@ -41,11 +42,8 @@ import org.apache.sis.io.wkt.Formatter; import static org.apache.sis.util.Utilities.deepEquals; -// Branch-dependent imports -import java.util.Objects; import org.opengis.referencing.operation.SingleOperation; - /** * An ordered sequence of two or more single coordinate operations. The sequence of operations is constrained * by the requirement that the source coordinate reference system of step (<var>n</var>+1) must be the same as @@ -159,12 +157,12 @@ final class DefaultConcatenatedOperation * since we are adding accuracy informations to a concatenated operation. This departure should be considered * as a convenience feature only; accuracies are really relevant in transformations only.</div> * - * @param properties the properties specified at construction time, or {@code null} if unknown. - * @param operations the operations to concatenate. - * @param flattened the destination list in which to add the {@code SingleOperation} instances. - * @param mtFactory the math transform factory to use, or {@code null} for not performing concatenation. - * @param setAccuracy {@code true} for setting the {@link #coordinateOperationAccuracy} field. - * @param setDomain {@code true} for setting the {@link #domainOfValidity} field. + * @param properties the properties specified at construction time, or {@code null} if unknown. + * @param operations the operations to concatenate. + * @param flattened the destination list in which to add the {@code SingleOperation} instances. + * @param mtFactory the math transform factory to use, or {@code null} for not performing concatenation. + * @param setAccuracy {@code true} for setting the {@link #coordinateOperationAccuracy} field. + * @param setDomain {@code true} for setting the {@link #domainOfValidity} field. * @throws FactoryException if the factory can not concatenate the math transforms. */ private void initialize(final Map<String,?> properties, Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConicProjection.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConicProjection.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConicProjection.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConicProjection.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -50,11 +50,11 @@ final class DefaultConicProjection exten /** * Creates a projection from the given properties. * - * @param properties The properties to be given to the identified object. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param method The coordinate operation method. - * @param transform Transform from positions in the source CRS to positions in the target CRS. + * @param properties the properties to be given to the identified object. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param method the coordinate operation method. + * @param transform transform from positions in the source CRS to positions in the target CRS. */ public DefaultConicProjection(final Map<String,?> properties, final GeographicCRS sourceCRS, @@ -70,11 +70,11 @@ final class DefaultConicProjection exten * specified source and target CRS. While the source conversion can be an arbitrary one, it * is typically a defining conversion. * - * @param definition The defining conversion. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param factory The factory to use for creating a transform from the parameters or for performing axis changes. - * @param actual An array of length 1 where to store the actual operation method used by the math transform factory. + * @param definition the defining conversion. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param factory the factory to use for creating a transform from the parameters or for performing axis changes. + * @param actual an array of length 1 where to store the actual operation method used by the math transform factory. */ DefaultConicProjection(final Conversion definition, final CoordinateReferenceSystem sourceCRS, @@ -92,7 +92,7 @@ final class DefaultConicProjection exten * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param operation The coordinate operation to copy. + * @param operation the coordinate operation to copy. */ protected DefaultConicProjection(final ConicProjection operation) { super(operation); Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -144,13 +144,13 @@ public class DefaultConversion extends A * with different source and target datum, it does not accept to use such instances for * {@linkplain org.apache.sis.referencing.crs.DefaultDerivedCRS derived CRS} construction. * - * @param properties the properties to be given to the identified object. - * @param sourceCRS the source CRS. - * @param targetCRS the target CRS, which shall use a datum - * {@linkplain Utilities#equalsIgnoreMetadata equals (ignoring metadata)} to the source CRS datum. + * @param properties the properties to be given to the identified object. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS, which shall use a datum {@linkplain Utilities#equalsIgnoreMetadata + * equals (ignoring metadata)} to the source CRS datum. * @param interpolationCRS the CRS of additional coordinates needed for the operation, or {@code null} if none. - * @param method the coordinate operation method (mandatory in all cases). - * @param transform transform from positions in the source CRS to positions in the target CRS. + * @param method the coordinate operation method (mandatory in all cases). + * @param transform transform from positions in the source CRS to positions in the target CRS. */ public DefaultConversion(final Map<String,?> properties, final CoordinateReferenceSystem sourceCRS, Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -42,6 +42,7 @@ import org.apache.sis.internal.util.Coll import org.apache.sis.internal.util.Constants; import org.apache.sis.referencing.CRS; import org.apache.sis.referencing.factory.InvalidGeodeticParameterException; +import org.apache.sis.referencing.operation.transform.AbstractMathTransform; import org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory; import org.apache.sis.util.collection.WeakHashSet; import org.apache.sis.util.collection.Containers; @@ -150,10 +151,10 @@ public class DefaultCoordinateOperationF * for any property not present in the map provided to a {@code createFoo(Map<String,?>, …)} method. * * @param properties the default properties, or {@code null} if none. - * @param factory the factory to use for creating - * {@linkplain org.apache.sis.referencing.operation.transform.AbstractMathTransform math transforms}, - * or {@code null} for the default factory. + * @param factory the factory to use for creating {@linkplain AbstractMathTransform math transforms}, + * or {@code null} for the default factory. */ + @SuppressWarnings("ResultOfMethodCallIgnored") public DefaultCoordinateOperationFactory(Map<String,?> properties, final MathTransformFactory factory) { if (properties == null || properties.isEmpty()) { properties = Collections.emptyMap(); @@ -430,7 +431,7 @@ next: for (int i=components.size(); -- final Datum d = components.get(i).getDatum(); for (int j=n; --j >= 0;) { if (Utilities.equalsIgnoreMetadata(d, datum[j])) { - System.arraycopy(datum, j+1, datum, j, --n - j); // Remove the datum from the list. + System.arraycopy(datum, j+1, datum, j, --n - j); // Remove the datum from the list. continue next; } } Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCylindricalProjection.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCylindricalProjection.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCylindricalProjection.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCylindricalProjection.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -50,11 +50,11 @@ final class DefaultCylindricalProjection /** * Creates a projection from the given properties. * - * @param properties The properties to be given to the identified object. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param method The coordinate operation method. - * @param transform Transform from positions in the source CRS to positions in the target CRS. + * @param properties the properties to be given to the identified object. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param method the coordinate operation method. + * @param transform transform from positions in the source CRS to positions in the target CRS. */ public DefaultCylindricalProjection(final Map<String,?> properties, final GeographicCRS sourceCRS, @@ -70,11 +70,11 @@ final class DefaultCylindricalProjection * specified source and target CRS. While the source conversion can be an arbitrary one, it * is typically a defining conversion. * - * @param definition The defining conversion. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param factory The factory to use for creating a transform from the parameters or for performing axis changes. - * @param actual An array of length 1 where to store the actual operation method used by the math transform factory. + * @param definition the defining conversion. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param factory the factory to use for creating a transform from the parameters or for performing axis changes. + * @param actual an array of length 1 where to store the actual operation method used by the math transform factory. */ DefaultCylindricalProjection(final Conversion definition, final CoordinateReferenceSystem sourceCRS, @@ -92,7 +92,7 @@ final class DefaultCylindricalProjection * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param operation The coordinate operation to copy. + * @param operation the coordinate operation to copy. */ protected DefaultCylindricalProjection(final CylindricalProjection operation) { super(operation); Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -16,6 +16,7 @@ */ package org.apache.sis.referencing.operation; +import java.util.Objects; import java.io.Serializable; import org.opengis.util.InternationalString; import org.opengis.metadata.citation.Citation; @@ -28,9 +29,6 @@ import org.apache.sis.util.iso.Types; import static org.apache.sis.util.ArgumentChecks.ensureNonNull; -// Branch-dependent imports -import java.util.Objects; - /** * Specification of the coordinate operation method formula. @@ -79,7 +77,7 @@ public class DefaultFormula extends Form /** * Creates a new formula from the given string. * - * @param formula The formula. + * @param formula the formula. */ public DefaultFormula(final CharSequence formula) { ensureNonNull("formula", formula); @@ -90,7 +88,7 @@ public class DefaultFormula extends Form /** * Creates a new formula from the given citation. * - * @param citation The citation. + * @param citation the citation. */ public DefaultFormula(final Citation citation) { ensureNonNull("citation", citation); @@ -105,7 +103,7 @@ public class DefaultFormula extends Form * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param formula The formula to copy. + * @param formula the formula to copy. * * @see #castOrCopy(Formula) */ @@ -121,8 +119,8 @@ public class DefaultFormula extends Form * Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged. * Otherwise a new SIS implementation is created and initialized to the attribute values of the given object. * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultFormula castOrCopy(final Formula object) { @@ -161,7 +159,7 @@ public class DefaultFormula extends Form /** * Compares this formula with the given object for equality. * - * @param object The object to compare with this formula. + * @param object the object to compare with this formula. * @return {@code true} if both objects are equal. */ @Override Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -19,6 +19,7 @@ package org.apache.sis.referencing.opera import java.util.Map; import java.util.HashMap; import java.util.List; +import java.util.Objects; import java.util.Collections; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlElement; @@ -61,9 +62,6 @@ import org.apache.sis.io.wkt.Formattable import static org.apache.sis.util.ArgumentChecks.*; -// Branch-dependent imports -import java.util.Objects; - /** * Describes the algorithm and parameters used to perform a coordinate operation. An {@code OperationMethod} @@ -236,10 +234,10 @@ public class DefaultOperationMethod exte * The source and target dimensions may be {@code null} if this method can work * with any number of dimensions (e.g. <cite>Affine Transform</cite>). * - * @param properties Set of properties. Shall contain at least {@code "name"}. - * @param sourceDimensions Number of dimensions in the source CRS of this operation method, or {@code null}. - * @param targetDimensions Number of dimensions in the target CRS of this operation method, or {@code null}. - * @param parameters Description of parameters expected by this operation. + * @param properties set of properties. Shall contain at least {@code "name"}. + * @param sourceDimensions number of dimensions in the source CRS of this operation method, or {@code null}. + * @param targetDimensions number of dimensions in the target CRS of this operation method, or {@code null}. + * @param parameters description of parameters expected by this operation. */ public DefaultOperationMethod(final Map<String,?> properties, final Integer sourceDimensions, @@ -272,7 +270,7 @@ public class DefaultOperationMethod exte * The information provided in the newly created object are approximative, and * usually acceptable only as a fallback when no other information are available. * - * @param transform The math transform to describe. + * @param transform the math transform to describe. */ public DefaultOperationMethod(final MathTransform transform) { super(getProperties(transform)); @@ -317,10 +315,10 @@ public class DefaultOperationMethod exte * This method returns a mutable map. Consequently, callers can add their own identifiers * directly to this map if they wish. * - * @param info The identified object to view as a properties map. - * @param authority The new authority for the object to be created, - * or {@code null} if it is not going to have any declared authority. - * @return The identified object properties in a mutable map. + * @param info the identified object to view as a properties map. + * @param authority the new authority for the object to be created, + * or {@code null} if it is not going to have any declared authority. + * @return the identified object properties in a mutable map. */ private static Map<String,Object> getProperties(final IdentifiedObject info, final Citation authority) { final Map<String,Object> properties = new HashMap<String,Object>(IdentifiedObjects.getProperties(info)); @@ -336,7 +334,7 @@ public class DefaultOperationMethod exte * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param method The operation method to copy. + * @param method the operation method to copy. * * @see #castOrCopy(OperationMethod) */ @@ -354,8 +352,8 @@ public class DefaultOperationMethod exte * Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged. * Otherwise a new SIS implementation is created and initialized to the attribute values of the given object. * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultOperationMethod castOrCopy(final OperationMethod object) { @@ -368,9 +366,9 @@ public class DefaultOperationMethod exte * The source and target dimensions may be {@code null} if this method can work with any number of dimensions * (e.g. <cite>Affine Transform</cite>). * - * @param method The operation method to copy. - * @param sourceDimensions Number of dimensions in the source CRS of this operation method. - * @param targetDimensions Number of dimensions in the target CRS of this operation method. + * @param method the operation method to copy. + * @param sourceDimensions number of dimensions in the source CRS of this operation method. + * @param targetDimensions number of dimensions in the target CRS of this operation method. */ private DefaultOperationMethod(final OperationMethod method, final Integer sourceDimensions, @@ -388,11 +386,11 @@ public class DefaultOperationMethod exte * This method accepts to change a dimension only if the value specified by the original method * is {@code null}. Otherwise an {@link IllegalArgumentException} is thrown. * - * @param method The operation method to redimension. - * @param sourceDimensions The desired new source dimensions. - * @param methodSource The current number of source dimensions (may be {@code null}). - * @param targetDimensions The desired new target dimensions. - * @param methodTarget The current number of target dimensions (may be {@code null}). + * @param method the operation method to redimension. + * @param sourceDimensions the desired new source dimensions. + * @param methodSource the current number of source dimensions (may be {@code null}). + * @param targetDimensions the desired new target dimensions. + * @param methodTarget the current number of target dimensions (may be {@code null}). * @throws IllegalArgumentException if the given dimensions are illegal for this operation method. */ private static OperationMethod redimension(final OperationMethod method, @@ -445,10 +443,10 @@ public class DefaultOperationMethod exte * </li> * </ul> * - * @param method The operation method to redimension, or {@code null}. - * @param sourceDimensions The desired number of input dimensions. - * @param targetDimensions The desired number of output dimensions. - * @return The redimensioned operation method, or {@code null} if the given method was null, + * @param method the operation method to redimension, or {@code null}. + * @param sourceDimensions the desired number of input dimensions. + * @param targetDimensions the desired number of output dimensions. + * @return the redimensioned operation method, or {@code null} if the given method was null, * or {@code method} if no change is needed. * @throws IllegalArgumentException if the given dimensions are illegal for the given operation method. */ @@ -484,9 +482,9 @@ public class DefaultOperationMethod exte * but can also work in a two-dimensional space by assuming that the ellipsoidal height is zero * everywhere. * - * @param sourceDimensions The desired number of input dimensions. - * @param targetDimensions The desired number of output dimensions. - * @return The redimensioned operation method, or {@code this} if no change is needed. + * @param sourceDimensions the desired number of input dimensions. + * @param targetDimensions the desired number of output dimensions. + * @return the redimensioned operation method, or {@code this} if no change is needed. * @throws IllegalArgumentException if the given dimensions are illegal for this operation method. * * @since 0.6 @@ -536,7 +534,7 @@ public class DefaultOperationMethod exte * The default implementation returns {@code SingleOperation.class}, * which is the most conservative return value. * - * @return Interface implemented by all coordinate operations that use this method. + * @return interface implemented by all coordinate operations that use this method. * * @see org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory#getAvailableMethods(Class) */ @@ -552,7 +550,7 @@ public class DefaultOperationMethod exte * <div class="note"><b>Departure from the ISO 19111 standard:</b> * this property is mandatory according ISO 19111, but optional in Apache SIS.</div> * - * @return The formula used by this method, or {@code null} if unknown. + * @return the formula used by this method, or {@code null} if unknown. * * @see DefaultFormula * @see org.apache.sis.referencing.operation.transform.MathTransformProvider @@ -566,7 +564,7 @@ public class DefaultOperationMethod exte * Number of dimensions in the source CRS of this operation method. * May be null if unknown, as in an <cite>Affine Transform</cite>. * - * @return The dimension of source CRS, or {@code null} if unknown. + * @return the dimension of source CRS, or {@code null} if unknown. * * @see org.apache.sis.referencing.operation.transform.AbstractMathTransform#getSourceDimensions() */ @@ -581,7 +579,7 @@ public class DefaultOperationMethod exte * Number of dimensions in the target CRS of this operation method. * May be null if unknown, as in an <cite>Affine Transform</cite>. * - * @return The dimension of target CRS, or {@code null} if unknown. + * @return the dimension of target CRS, or {@code null} if unknown. * * @see org.apache.sis.referencing.operation.transform.AbstractMathTransform#getTargetDimensions() */ @@ -600,7 +598,7 @@ public class DefaultOperationMethod exte * {@link #DefaultOperationMethod(MathTransform)} constructor has been unable to infer it * or if this {@code OperationMethod} has been read from an incomplete GML document.</div> * - * @return The parameters, or {@code null} if unknown. + * @return the parameters, or {@code null} if unknown. * * @see DefaultConversion#getParameterDescriptors() * @see DefaultConversion#getParameterValues() @@ -616,16 +614,16 @@ public class DefaultOperationMethod exte * {@link ComparisonMode#BY_CONTRACT BY_CONTRACT}, then all available properties * are compared including the {@linkplain #getFormula() formula}. * - * @param object The object to compare to {@code this}. - * @param mode {@link ComparisonMode#STRICT STRICT} for performing a strict comparison, or - * {@link ComparisonMode#IGNORE_METADATA IGNORE_METADATA} for comparing only properties - * relevant to transformations. + * @param object the object to compare to {@code this}. + * @param mode {@link ComparisonMode#STRICT STRICT} for performing a strict comparison, or + * {@link ComparisonMode#IGNORE_METADATA IGNORE_METADATA} for comparing only + * properties relevant to transformations. * @return {@code true} if both objects are equal. */ @Override public boolean equals(final Object object, final ComparisonMode mode) { if (object == this) { - return true; // Slight optimization. + return true; // Slight optimization. } if (super.equals(object, mode)) { switch (mode) { @@ -680,7 +678,7 @@ public class DefaultOperationMethod exte * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()} * for more information. * - * @return The hash code value. This value may change in any future Apache SIS version. + * @return the hash code value. This value may change in any future Apache SIS version. */ @Override protected long computeHashCode() { Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPassThroughOperation.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPassThroughOperation.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPassThroughOperation.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPassThroughOperation.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -18,6 +18,7 @@ package org.apache.sis.referencing.opera import java.util.Map; import java.util.Arrays; +import java.util.Objects; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @@ -39,12 +40,9 @@ import org.apache.sis.io.wkt.Formatter; import static org.apache.sis.util.Utilities.deepEquals; -// Branch-dependent imports -import java.util.Objects; import org.opengis.referencing.operation.OperationMethod; import org.opengis.referencing.operation.SingleOperation; - /** * Specifies that a subset of a coordinate tuple is subject to a specific coordinate operation. * @@ -100,12 +98,12 @@ public class DefaultPassThroughOperation * </tr> * </table> * - * @param properties The properties to be given to the identified object. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param operation The operation to apply on the subset of a coordinate tuple. - * @param firstAffectedOrdinate Index of the first affected ordinate. - * @param numTrailingOrdinates Number of trailing ordinates to pass through. + * @param properties the properties to be given to the identified object. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param operation the operation to apply on the subset of a coordinate tuple. + * @param firstAffectedOrdinate index of the first affected ordinate. + * @param numTrailingOrdinates number of trailing ordinates to pass through. */ public DefaultPassThroughOperation(final Map<String,?> properties, final CoordinateReferenceSystem sourceCRS, @@ -127,7 +125,7 @@ public class DefaultPassThroughOperation * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param operation The coordinate operation to copy. + * @param operation the coordinate operation to copy. * * @see #castOrCopy(PassThroughOperation) */ @@ -144,8 +142,8 @@ public class DefaultPassThroughOperation * Note that this is a <cite>shallow</cite> copy operation, since the other properties contained in the given * object are not recursively copied. * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultPassThroughOperation castOrCopy(final PassThroughOperation object) { @@ -200,7 +198,7 @@ public class DefaultPassThroughOperation * This is necessary for supporting usage of {@code PassThroughOperation} with {@link ConcatenatedOperation}. * </div> * - * @return The operation to apply on the subset of a coordinate tuple. + * @return the operation to apply on the subset of a coordinate tuple. * * @see PassThroughTransform#getSubTransform() */ @@ -214,7 +212,7 @@ public class DefaultPassThroughOperation * Returns the ordered sequence of indices in a source coordinate tuple of the coordinates * affected by this pass-through operation. * - * @return Zero-based indices of the modified source coordinates. + * @return zero-based indices of the modified source coordinates. * * @see PassThroughTransform#getModifiedCoordinates() */ @@ -260,7 +258,7 @@ public class DefaultPassThroughOperation @Override public boolean equals(final Object object, final ComparisonMode mode) { if (object == this) { - return true; // Slight optimization. + return true; // Slight optimization. } if (super.equals(object, mode)) { if (mode == ComparisonMode.STRICT) { @@ -287,8 +285,8 @@ public class DefaultPassThroughOperation * Current format is specific to Apache SIS and may change in any future version * if a standard format for pass through operations is defined. * - * @param formatter The formatter to use. - * @return Currently {@code "PassThroughOperation"} (may change in any future version). + * @param formatter the formatter to use. + * @return currently {@code "PassThroughOperation"} (may change in any future version). * * @since 0.7 */ Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPlanarProjection.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPlanarProjection.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPlanarProjection.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPlanarProjection.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -50,11 +50,11 @@ final class DefaultPlanarProjection exte /** * Creates a projection from the given properties. * - * @param properties The properties to be given to the identified object. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param method The coordinate operation method. - * @param transform Transform from positions in the source CRS to positions in the target CRS. + * @param properties the properties to be given to the identified object. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param method the coordinate operation method. + * @param transform transform from positions in the source CRS to positions in the target CRS. */ public DefaultPlanarProjection(final Map<String,?> properties, final GeographicCRS sourceCRS, @@ -70,11 +70,11 @@ final class DefaultPlanarProjection exte * specified source and target CRS. While the source conversion can be an arbitrary one, it * is typically a defining conversion. * - * @param definition The defining conversion. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param factory The factory to use for creating a transform from the parameters or for performing axis changes. - * @param actual An array of length 1 where to store the actual operation method used by the math transform factory. + * @param definition the defining conversion. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param factory the factory to use for creating a transform from the parameters or for performing axis changes. + * @param actual an array of length 1 where to store the actual operation method used by the math transform factory. */ DefaultPlanarProjection(final Conversion definition, final CoordinateReferenceSystem sourceCRS, @@ -92,7 +92,7 @@ final class DefaultPlanarProjection exte * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param operation The coordinate operation to copy. + * @param operation the coordinate operation to copy. */ protected DefaultPlanarProjection(final PlanarProjection operation) { super(operation); Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -63,11 +63,11 @@ class DefaultProjection extends DefaultC /** * Creates a projection from the given properties. * - * @param properties The properties to be given to the identified object. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param method The coordinate operation method. - * @param transform Transform from positions in the source CRS to positions in the target CRS. + * @param properties the properties to be given to the identified object. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param method the coordinate operation method. + * @param transform transform from positions in the source CRS to positions in the target CRS. */ public DefaultProjection(final Map<String,?> properties, final GeographicCRS sourceCRS, @@ -83,11 +83,11 @@ class DefaultProjection extends DefaultC * specified source and target CRS. While the source conversion can be an arbitrary one, it * is typically a defining conversion. * - * @param definition The defining conversion. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param factory The factory to use for creating a transform from the parameters or for performing axis changes. - * @param actual An array of length 1 where to store the actual operation method used by the math transform factory. + * @param definition the defining conversion. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param factory the factory to use for creating a transform from the parameters or for performing axis changes. + * @param actual an array of length 1 where to store the actual operation method used by the math transform factory. */ DefaultProjection(final Conversion definition, final CoordinateReferenceSystem sourceCRS, @@ -107,7 +107,7 @@ class DefaultProjection extends DefaultC * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param operation The coordinate operation to copy. + * @param operation the coordinate operation to copy. */ protected DefaultProjection(final Projection operation) { super(operation); @@ -118,7 +118,7 @@ class DefaultProjection extends DefaultC * The default implementation returns {@code Projection.class}. * Subclasses implementing a more specific GeoAPI interface shall override this method. * - * @return The conversion interface implemented by this class. + * @return the conversion interface implemented by this class. */ @Override public Class<? extends Projection> getInterface() { Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MismatchedDatumException.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MismatchedDatumException.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MismatchedDatumException.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MismatchedDatumException.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -58,7 +58,7 @@ public class MismatchedDatumException ex /** * Constructs a new exception with the specified detail message. * - * @param message The detail message, or {@code null} if none. + * @param message the detail message, or {@code null} if none. */ public MismatchedDatumException(final String message) { super(message); @@ -67,8 +67,8 @@ public class MismatchedDatumException ex /** * Constructs a new exception with the specified detail message and cause. * - * @param message The detail message, or {@code null} if none. - * @param cause The cause, or {@code null} if none. + * @param message the detail message, or {@code null} if none. + * @param cause the cause, or {@code null} if none. */ public MismatchedDatumException(final String message, final Throwable cause) { super(message, cause); Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubOperationInfo.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubOperationInfo.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubOperationInfo.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubOperationInfo.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -101,10 +101,10 @@ final class SubOperationInfo { * Searches in given list of source components for an operation capable to convert or transform coordinates * to the given target CRS. If no such operation can be found, then this method returns {@code null}. * - * @param caller the object which is inferring a coordinate operation. - * @param sourceIsUsed flags for keeping trace of which source has been used. - * @param sources all components of the source CRS. - * @param target one component of the target CRS. + * @param caller the object which is inferring a coordinate operation. + * @param sourceIsUsed flags for keeping trace of which source has been used. + * @param sources all components of the source CRS. + * @param target one component of the target CRS. * @return information about a coordinate operation from a source CRS to the given target CRS, or {@code null}. * @throws FactoryException if an error occurred while grabbing a coordinate operation. */ @@ -185,7 +185,7 @@ final class SubOperationInfo { * * @param sourceDimensions number of dimension of the source {@code CompoundCRS}. * @param selectedDimensions number of source dimensions needed by the coordinate operations. - * @param selected all {@code SourceComponent} instances needed for the target {@code CompoundCRS}. + * @param selected all {@code SourceComponent} instances needed for the target {@code CompoundCRS}. */ static Matrix sourceToSelected(final int sourceDimensions, final int selectedDimensions, final SubOperationInfo[] selected) { final Matrix select = Matrices.createZero(selectedDimensions + 1, sourceDimensions + 1); Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubTypes.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubTypes.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubTypes.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubTypes.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -127,12 +127,12 @@ final class SubTypes { * a more specific GeoAPI interface if this method has been able to infer the type from the * {@code conversion} argument. * - * @param baseType The base GeoAPI interface to be implemented by the conversion to return. - * @param definition The defining conversion. - * @param sourceCRS The source CRS. - * @param targetCRS The target CRS. - * @param factory The factory to use for creating a transform from the parameters or for performing axis changes. - * @return The conversion of the given type between the given CRS. + * @param baseType the base GeoAPI interface to be implemented by the conversion to return. + * @param definition the defining conversion. + * @param sourceCRS the source CRS. + * @param targetCRS the target CRS. + * @param factory the factory to use for creating a transform from the parameters or for performing axis changes. + * @return the conversion of the given type between the given CRS. * @throws ClassCastException if a contradiction is found between the given {@code baseType}, * the defining {@linkplain DefaultConversion#getInterface() conversion type} and * the {@linkplain DefaultOperationMethod#getOperationType() method operation type}. @@ -144,14 +144,14 @@ final class SubTypes { Class<? extends T> type = baseType; if (definition instanceof AbstractIdentifiedObject) { final Class<?> c = ((AbstractIdentifiedObject) definition).getInterface(); - if (!c.isAssignableFrom(baseType)) { // Do nothing if c is a parent type. + if (!c.isAssignableFrom(baseType)) { // Do nothing if c is a parent type. type = c.asSubclass(type); } } final OperationMethod method = definition.getMethod(); if (method instanceof DefaultOperationMethod) { final Class<? extends SingleOperation> c = ((DefaultOperationMethod) method).getOperationType(); - if (!c.isAssignableFrom(baseType)) { // Do nothing if c is a parent type. + if (!c.isAssignableFrom(baseType)) { // Do nothing if c is a parent type. type = c.asSubclass(type); } } Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -88,8 +88,8 @@ public class LinearTransformBuilder { /** * Extracts the ordinate values of the given points into separated arrays, one for each dimension. * - * @param points The points from which to extract the ordinate values. - * @param dimension The expected number of dimensions. + * @param points the points from which to extract the ordinate values. + * @param dimension the expected number of dimensions. */ private static double[][] toArrays(final DirectPosition[] points, final int dimension) { final int length = points.length; @@ -114,7 +114,7 @@ public class LinearTransformBuilder { * <p><b>Limitation:</b> in current implementation, the source points must be one or two-dimensional. * This restriction may be removed in a future SIS version.</p> * - * @param points The source points, assumed precise. + * @param points the source points, assumed precise. * @throws MismatchedDimensionException if at least one point does not have the expected number of dimensions. */ public void setSourcePoints(final DirectPosition... points) throws MismatchedDimensionException { @@ -133,7 +133,7 @@ public class LinearTransformBuilder { * Target points can have any number of dimensions (not necessarily 2), but all points shall have * the same number of dimensions. * - * @param points The target points, assumed uncertain. + * @param points the target points, assumed uncertain. * @throws MismatchedDimensionException if not all points have the same number of dimensions. */ public void setTargetPoints(final DirectPosition... points) throws MismatchedDimensionException { @@ -156,11 +156,11 @@ public class LinearTransformBuilder { * Creates a linear transform approximation from the source points to the target points. * This method assumes that source points are precise and all uncertainty is in the target points. * - * @return The fitted linear transform. + * @return the fitted linear transform. */ public LinearTransform create() { if (transform == null) { - final double[][] sources = this.sources; // Protect from changes. + final double[][] sources = this.sources; // Protect from changes. final double[][] targets = this.targets; if (sources == null || targets == null) { throw new IllegalStateException(Errors.format( @@ -174,7 +174,7 @@ public class LinearTransformBuilder { switch (sourceDim) { case 1: { final Line line = new Line(); - for (int j=0; j<targets.length; j++) { + for (int j=0; j < targets.length; j++) { correlation[j] = line.fit(sources[0], targets[j]); matrix.setElement(j, 0, line.slope()); matrix.setElement(j, 1, line.y0()); @@ -183,7 +183,7 @@ public class LinearTransformBuilder { } case 2: { final Plane plan = new Plane(); - for (int j=0; j<targets.length; j++) { + for (int j=0; j < targets.length; j++) { correlation[j] = plan.fit(sources[0], sources[1], targets[j]); matrix.setElement(j, 0, plan.slopeX()); matrix.setElement(j, 1, plan.slopeY()); @@ -191,7 +191,7 @@ public class LinearTransformBuilder { } break; } - default: throw new AssertionError(sourceDim); // Should have been verified by setSourcePoints(…) method. + default: throw new AssertionError(sourceDim); // Should have been verified by setSourcePoints(…) method. } transform = MathTransforms.linear(matrix); } @@ -203,7 +203,7 @@ public class LinearTransformBuilder { * or {@code null} if none. If non-null, the array length is equals to the number of target * dimensions. * - * @return Estimation of correlation coefficients for each target dimension, or {@code null}. + * @return estimation of correlation coefficients for each target dimension, or {@code null}. */ public double[] correlation() { return (correlation != null) ? correlation.clone() : null; @@ -212,7 +212,7 @@ public class LinearTransformBuilder { /** * Returns a string representation of this builder for debugging purpose. * - * @return A string representation of this builder. + * @return a string representation of this builder. */ @Debug @Override @@ -238,7 +238,7 @@ public class LinearTransformBuilder { try { table.flush(); } catch (IOException e) { - throw new AssertionError(e); // Should never happen since we wrote into a StringBuilder. + throw new AssertionError(e); // Should never happen since we wrote into a StringBuilder. } } return buffer.toString(); Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -97,11 +97,10 @@ public final class AffineTransforms2D ex * <li>It tries to recycle the given object if {@code overwrite} is {@code true}.</li> * </ul> * - * @param transform the affine transform to use. - * @param shape the shape to transform, or {@code null}. - * @param allowOverwrite if {@code true}, this method is allowed to overwrite {@code shape} with the - * transform result. If {@code false}, then {@code shape} is never modified. - * + * @param transform the affine transform to use. + * @param shape the shape to transform, or {@code null}. + * @param allowOverwrite if {@code true}, this method is allowed to overwrite {@code shape} with the + * transform result. If {@code false}, then {@code shape} is never modified. * @return the transform of the given shape, or {@code null} if the given shape was null. * May or may not be the same instance than the given shape. * @@ -116,16 +115,20 @@ public final class AffineTransforms2D ex if (type == TYPE_IDENTITY) { return shape; } - // If there is only scale, flip, quadrant rotation or translation, - // then we can optimize the transformation of rectangular shapes. + /* + * If there is only scale, flip, quadrant rotation or translation, + * then we can optimize the transformation of rectangular shapes. + */ if ((type & (TYPE_GENERAL_ROTATION | TYPE_GENERAL_TRANSFORM)) == 0) { // For a Rectangle input, the output should be a rectangle as well. if (shape instanceof Rectangle2D) { final Rectangle2D rect = (Rectangle2D) shape; return transform(transform, rect, allowOverwrite ? rect : null); } - // For other rectangular shapes, we restrict to cases without - // rotation or flip because we don't know if the shape is symmetric. + /* + * For other rectangular shapes, we restrict to cases without + * rotation or flip because we don't know if the shape is symmetric. + */ if ((type & (TYPE_FLIP | TYPE_MASK_ROTATION)) == 0) { if (shape instanceof RectangularShape) { RectangularShape rect = (RectangularShape) shape; @@ -171,11 +174,10 @@ public final class AffineTransforms2D ex * <strong>upper-left corner</strong> of pixels (as in Java2D usage), not the center of pixels * (OGC usage). * - * @param transform the affine transform to use. - * @param bounds the rectangle to transform, or {@code null}. - * this rectangle will not be modified except if {@code dest} references the same object. - * @param dest rectangle in which to place the result. If {@code null}, a new rectangle will be created. - * + * @param transform the affine transform to use. + * @param bounds the rectangle to transform, or {@code null}. + * this rectangle will not be modified except if {@code dest} references the same object. + * @param dest rectangle in which to place the result. If {@code null}, a new rectangle will be created. * @return the direct transform of the {@code bounds} rectangle, or {@code null} if {@code bounds} was null. * * @see org.apache.sis.geometry.Shapes2D#transform(MathTransform2D, Rectangle2D, Rectangle2D) @@ -217,11 +219,10 @@ public final class AffineTransforms2D ex * return createInverse().createTransformedShape(bounds).getBounds2D(); * } * - * @param transform the affine transform to use. - * @param bounds the rectangle to transform, or {@code null}. - * this rectangle will not be modified except if {@code dest} references the same object. - * @param dest rectangle in which to place the result. If {@code null}, a new rectangle will be created. - * + * @param transform the affine transform to use. + * @param bounds the rectangle to transform, or {@code null}. + * this rectangle will not be modified except if {@code dest} references the same object. + * @param dest rectangle in which to place the result. If {@code null}, a new rectangle will be created. * @return the inverse transform of the {@code bounds} rectangle, or {@code null} if {@code bounds} was null. * @throws NoninvertibleTransformException if the affine transform can't be inverted. */ @@ -257,11 +258,10 @@ public final class AffineTransforms2D ex * Calculates the inverse transform of a point without applying the translation components. * In other words, calculates the inverse transform of a displacement vector. * - * @param transform the affine transform to use. - * @param vector the vector to transform stored as a point. - * this point will not be modified except if {@code dest} references the same object. - * @param dest point in which to place the result. If {@code null}, a new point will be created. - * + * @param transform the affine transform to use. + * @param vector the vector to transform stored as a point. + * this point will not be modified except if {@code dest} references the same object. + * @param dest point in which to place the result. If {@code null}, a new point will be created. * @return the inverse transform of the {@code vector}, or {@code null} if {@code source} was null. * @throws NoninvertibleTransformException if the affine transform can't be inverted. */ @@ -365,7 +365,7 @@ public final class AffineTransforms2D ex * boolean flipped = (tr.getType() & TYPE_FLIP) != 0; * } * - * @param transform the affine transform to inspect. + * @param transform the affine transform to inspect. * @return -1 if an axis has been flipped, +1 if no flipping, or 0 if unknown. */ public static int getFlip(final AffineTransform transform) { Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -16,10 +16,11 @@ */ package org.apache.sis.referencing.operation.matrix; +import java.util.Objects; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; import org.opengis.referencing.cs.AxisDirection; -import org.opengis.referencing.cs.CoordinateSystem; // For javadoc +import org.opengis.referencing.cs.CoordinateSystem; // For javadoc import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; import org.opengis.geometry.MismatchedDimensionException; @@ -34,9 +35,6 @@ import org.apache.sis.internal.metadata. import org.apache.sis.internal.referencing.Resources; import org.apache.sis.internal.referencing.ExtendedPrecisionMatrix; -// Branch-dependent imports -import java.util.Objects; - /** * {@link Matrix} factory methods and utilities. @@ -96,10 +94,10 @@ public final class Matrices extends Stat * {@value org.apache.sis.referencing.operation.matrix.Matrix4#SIZE} inclusive, the matrix * is guaranteed to be an instance of one of {@link Matrix1} … {@link Matrix4} subtypes.</div> * - * @param size Numbers of row and columns. For an affine transform matrix, this is the number of + * @param size numbers of row and columns. For an affine transform matrix, this is the number of * {@linkplain MathTransform#getSourceDimensions() source} and * {@linkplain MathTransform#getTargetDimensions() target} dimensions + 1. - * @return An identity matrix of the given size. + * @return an identity matrix of the given size. */ public static MatrixSIS createIdentity(final int size) { switch (size) { @@ -271,8 +269,10 @@ public final class Matrices extends Stat */ final boolean same = srcDir.equals(dstDir); if (useEnvelopes) { - // See the comment in transform(Envelope, Envelope) for an explanation about why - // we use the lower/upper corners instead than getMinimum()/getMaximum() methods. + /* + * See the comment in transform(Envelope, Envelope) for an explanation about why + * we use the lower/upper corners instead than getMinimum()/getMaximum() methods. + */ final DoubleDouble scale = new DoubleDouble(same ? +1 : -1, 0); scale.multiply(dstEnvelope.getSpan(dstIndex)); scale.divide (srcEnvelope.getSpan(srcIndex)); @@ -544,7 +544,7 @@ public final class Matrices extends Stat * @param sourceDimensions the number of dimensions in source coordinates. * @param selectedDimensions the 0-based indices of source ordinate values to keep. * The length of this array will be the number of dimensions in target coordinates. - * @return An affine transform matrix keeping only the given source dimensions, and discarding all others. + * @return an affine transform matrix keeping only the given source dimensions, and discarding all others. * @throws IllegalArgumentException if a value of {@code selectedDimensions} is lower than 0 * or not smaller than {@code sourceDimensions}. * @@ -1075,13 +1075,13 @@ public final class Matrices extends Stat public static String toString(final Matrix matrix) { final int numRow = matrix.getNumRow(); final int numCol = matrix.getNumCol(); - final String[] elements = new String [numCol * numRow]; // String representation of matrix values. - final boolean[] noFractionDigits = new boolean[numCol * numRow]; // Whether to remove the trailing ".0" for a given number. - final boolean[] hasDecimalSeparator = new boolean[numCol]; // Whether the column has at least one number where fraction digits are shown. - final byte[] maximumFractionDigits = new byte [numCol]; // The greatest amount of fraction digits found in a column. - final byte[] maximumPaddingZeros = new byte [numCol * numRow]; // Maximal amount of zeros that we can append before to exceed the IEEE 754 accuracy. - final byte[] widthBeforeFraction = new byte [numCol]; // Number of characters before the fraction digits: spacing + ('-') + integerDigits + '.' - final byte[] columnWidth = new byte [numCol]; // Total column width. + final String[] elements = new String [numCol * numRow]; // String representation of matrix values. + final boolean[] noFractionDigits = new boolean[numCol * numRow]; // Whether to remove the trailing ".0" for a given number. + final boolean[] hasDecimalSeparator = new boolean[numCol]; // Whether the column has at least one number where fraction digits are shown. + final byte[] maximumFractionDigits = new byte [numCol]; // The greatest amount of fraction digits found in a column. + final byte[] maximumPaddingZeros = new byte [numCol * numRow]; // Maximal amount of zeros that we can append before to exceed the IEEE 754 accuracy. + final byte[] widthBeforeFraction = new byte [numCol]; // Number of characters before the fraction digits: spacing + ('-') + integerDigits + '.' + final byte[] columnWidth = new byte [numCol]; // Total column width. int totalWidth = 1; /* * Create now the string representation of all matrix elements and measure the width Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -38,6 +38,7 @@ import org.apache.sis.internal.util.Nume * @see Matrix3 * @see Matrix4 */ +@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone. public final class Matrix1 extends MatrixSIS { /** * Serial number for inter-operability with different versions. @@ -64,7 +65,7 @@ public final class Matrix1 extends Matri /** * Creates a new matrix filled with only zero values. * - * @param ignore Shall always be {@code false} in current version. + * @param ignore shall always be {@code false} in current version. */ Matrix1(final boolean ignore) { } @@ -82,8 +83,8 @@ public final class Matrix1 extends Matri * Creates a new matrix initialized to the specified values. * The length of the given array must be 1. * - * @param elements Elements of the matrix. - * @throws IllegalArgumentException If the given array does not have the expected length. + * @param elements elements of the matrix. + * @throws IllegalArgumentException if the given array does not have the expected length. * * @see #setElements(double[]) * @see Matrices#create(int, int, double[]) @@ -97,7 +98,7 @@ public final class Matrix1 extends Matri * The specified matrix size must be {@value #SIZE}×{@value #SIZE}. * This is not verified by this constructor, since it shall be verified by {@link Matrices}. * - * @param matrix The matrix to copy. + * @param matrix the matrix to copy. */ Matrix1(final Matrix matrix) { m00 = matrix.getElement(0,0); @@ -108,10 +109,10 @@ public final class Matrix1 extends Matri * is already an instance of {@code Matrix1}, then it is returned unchanged. Otherwise this method * verifies the matrix size, then copies the element in a new {@code Matrix1} object. * - * @param matrix The matrix to cast or copy, or {@code null}. - * @return The matrix argument if it can be safely casted (including {@code null} argument), + * @param matrix the matrix to cast or copy, or {@code null}. + * @return the matrix argument if it can be safely casted (including {@code null} argument), * or a copy of the given matrix otherwise. - * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. + * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. */ public static Matrix1 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException { if (matrix == null || matrix instanceof Matrix1) { @@ -133,7 +134,7 @@ public final class Matrix1 extends Matri /** * Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumRow() { @@ -143,7 +144,7 @@ public final class Matrix1 extends Matri /** * Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumCol() { @@ -156,9 +157,9 @@ public final class Matrix1 extends Matri * If the matrix is known to be an instance of {@code Matrix1}, * then the {@link #m00} field can be read directly for efficiency. * - * @param row The row index, which can only be 0. - * @param column The column index, which can only be 0. - * @return The current value. + * @param row the row index, which can only be 0. + * @param column the column index, which can only be 0. + * @return the current value. */ @Override public final double getElement(final int row, final int column) { @@ -175,9 +176,9 @@ public final class Matrix1 extends Matri * If the matrix is known to be an instance of {@code Matrix1}, * then the {@link #m00} field can be set directly for efficiency. * - * @param row The row index, which can only be 0. - * @param column The column index, which can only be 0. - * @param value The new value to set. + * @param row the row index, which can only be 0. + * @param column the column index, which can only be 0. + * @param value the new value to set. */ @Override public final void setElement(final int row, final int column, final double value) { @@ -261,7 +262,7 @@ public final class Matrix1 extends Matri * Returns {@code true} if the specified object is of type {@code Matrix1} and * all of the data members are equal to the corresponding data members in this matrix. * - * @param object The object to compare with this matrix for equality. + * @param object the object to compare with this matrix for equality. * @return {@code true} if the given object is equal to this matrix. */ @Override Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -39,6 +39,7 @@ import org.apache.sis.internal.util.Nume * @see Matrix3 * @see Matrix4 */ +@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone. public final class Matrix2 extends MatrixSIS { /** * Serial number for inter-operability with different versions. @@ -65,7 +66,7 @@ public final class Matrix2 extends Matri /** * Creates a new matrix filled with only zero values. * - * @param ignore Shall always be {@code false} in current version. + * @param ignore shall always be {@code false} in current version. */ Matrix2(final boolean ignore) { } @@ -73,10 +74,10 @@ public final class Matrix2 extends Matri /** * Creates a new matrix initialized to the specified values. * - * @param m00 The first matrix element in the first row. - * @param m01 The second matrix element in the first row. - * @param m10 The first matrix element in the second row. - * @param m11 The second matrix element in the second row. + * @param m00 the first matrix element in the first row. + * @param m01 the second matrix element in the first row. + * @param m10 the first matrix element in the second row. + * @param m11 the second matrix element in the second row. */ public Matrix2(final double m00, final double m01, final double m10, final double m11) @@ -89,8 +90,8 @@ public final class Matrix2 extends Matri * Creates a new matrix initialized to the specified values. * The length of the given array must be 4 and the values in the same order than the above constructor. * - * @param elements Elements of the matrix. Column indices vary fastest. - * @throws IllegalArgumentException If the given array does not have the expected length. + * @param elements elements of the matrix. Column indices vary fastest. + * @throws IllegalArgumentException if the given array does not have the expected length. * * @see #setElements(double[]) * @see Matrices#create(int, int, double[]) @@ -104,7 +105,7 @@ public final class Matrix2 extends Matri * The specified matrix size must be {@value #SIZE}×{@value #SIZE}. * This is not verified by this constructor, since it shall be verified by {@link Matrices}. * - * @param matrix The matrix to copy. + * @param matrix the matrix to copy. */ Matrix2(final Matrix matrix) { m00 = matrix.getElement(0,0); @@ -118,10 +119,10 @@ public final class Matrix2 extends Matri * is already an instance of {@code Matrix2}, then it is returned unchanged. Otherwise this method * verifies the matrix size, then copies all elements in a new {@code Matrix2} object. * - * @param matrix The matrix to cast or copy, or {@code null}. - * @return The matrix argument if it can be safely casted (including {@code null} argument), + * @param matrix the matrix to cast or copy, or {@code null}. + * @return the matrix argument if it can be safely casted (including {@code null} argument), * or a copy of the given matrix otherwise. - * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. + * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. */ public static Matrix2 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException { if (matrix == null || matrix instanceof Matrix2) { @@ -143,7 +144,7 @@ public final class Matrix2 extends Matri /** * Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumRow() { @@ -153,7 +154,7 @@ public final class Matrix2 extends Matri /** * Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumCol() { @@ -166,9 +167,9 @@ public final class Matrix2 extends Matri * If the matrix is known to be an instance of {@code Matrix2}, * then the {@link #m00} … {@link #m11} fields can be read directly for efficiency. * - * @param row The row index, which can only be 0 or 1. - * @param column The column index, which can only be 0 or 1. - * @return The current value at the given row and column. + * @param row the row index, which can only be 0 or 1. + * @param column the column index, which can only be 0 or 1. + * @return the current value at the given row and column. */ @Override public final double getElement(final int row, final int column) { @@ -189,9 +190,9 @@ public final class Matrix2 extends Matri * If the matrix is known to be an instance of {@code Matrix2}, * then the {@link #m00} … {@link #m11} fields can be set directly for efficiency. * - * @param row The row index, which can only be 0 or 1. - * @param column The column index, which can only be 0 or 1. - * @param value The new value to set at the given row and column. + * @param row the row index, which can only be 0 or 1. + * @param column the column index, which can only be 0 or 1. + * @param value the new value to set at the given row and column. */ @Override public final void setElement(final int row, final int column, final double value) { @@ -285,7 +286,7 @@ public final class Matrix2 extends Matri * Returns {@code true} if the specified object is of type {@code Matrix2} and * all of the data members are equal to the corresponding data members in this matrix. * - * @param object The object to compare with this matrix for equality. + * @param object the object to compare with this matrix for equality. * @return {@code true} if the given object is equal to this matrix. */ @Override Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -38,6 +38,7 @@ import org.opengis.referencing.operation * @see Matrix2 * @see Matrix4 */ +@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone. public final class Matrix3 extends MatrixSIS { /** * Serial number for inter-operability with different versions. @@ -69,7 +70,7 @@ public final class Matrix3 extends Matri /** * Creates a new matrix filled with only zero values. * - * @param ignore Shall always be {@code false} in current version. + * @param ignore shall always be {@code false} in current version. */ Matrix3(final boolean ignore) { } @@ -77,15 +78,15 @@ public final class Matrix3 extends Matri /** * Creates a new matrix initialized to the specified values. * - * @param m00 The first matrix element in the first row. - * @param m01 The second matrix element in the first row. - * @param m02 The third matrix element in the first row. - * @param m10 The first matrix element in the second row. - * @param m11 The second matrix element in the second row. - * @param m12 The third matrix element in the second row. - * @param m20 The first matrix element in the third row. - * @param m21 The second matrix element in the third row. - * @param m22 The third matrix element in the third row. + * @param m00 the first matrix element in the first row. + * @param m01 the second matrix element in the first row. + * @param m02 the third matrix element in the first row. + * @param m10 the first matrix element in the second row. + * @param m11 the second matrix element in the second row. + * @param m12 the third matrix element in the second row. + * @param m20 the first matrix element in the third row. + * @param m21 the second matrix element in the third row. + * @param m22 the third matrix element in the third row. */ public Matrix3(final double m00, final double m01, final double m02, final double m10, final double m11, final double m12, @@ -100,8 +101,8 @@ public final class Matrix3 extends Matri * Creates a new matrix initialized to the specified values. * The length of the given array must be 9 and the values in the same order than the above constructor. * - * @param elements Elements of the matrix. Column indices vary fastest. - * @throws IllegalArgumentException If the given array does not have the expected length. + * @param elements elements of the matrix. Column indices vary fastest. + * @throws IllegalArgumentException if the given array does not have the expected length. * * @see #setElements(double[]) * @see Matrices#create(int, int, double[]) @@ -115,7 +116,7 @@ public final class Matrix3 extends Matri * The specified matrix size must be {@value #SIZE}×{@value #SIZE}. * This is not verified by this constructor, since it shall be verified by {@link Matrices}. * - * @param matrix The matrix to copy. + * @param matrix the matrix to copy. */ Matrix3(final Matrix matrix) { for (int j=0; j<SIZE; j++) { @@ -130,10 +131,10 @@ public final class Matrix3 extends Matri * is already an instance of {@code Matrix3}, then it is returned unchanged. Otherwise this method * verifies the matrix size, then copies all elements in a new {@code Matrix3} object. * - * @param matrix The matrix to cast or copy, or {@code null}. - * @return The matrix argument if it can be safely casted (including {@code null} argument), + * @param matrix the matrix to cast or copy, or {@code null}. + * @return the matrix argument if it can be safely casted (including {@code null} argument), * or a copy of the given matrix otherwise. - * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. + * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. */ public static Matrix3 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException { if (matrix == null || matrix instanceof Matrix3) { @@ -155,7 +156,7 @@ public final class Matrix3 extends Matri /** * Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumRow() { @@ -165,7 +166,7 @@ public final class Matrix3 extends Matri /** * Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumCol() { @@ -178,9 +179,9 @@ public final class Matrix3 extends Matri * If the matrix is known to be an instance of {@code Matrix3}, * then the {@link #m00} … {@link #m22} fields can be read directly for efficiency. * - * @param row The row index, from 0 inclusive to {@value #SIZE} exclusive. - * @param column The column index, from 0 inclusive to {@value #SIZE} exclusive. - * @return The current value at the given row and column. + * @param row the row index, from 0 inclusive to {@value #SIZE} exclusive. + * @param column the column index, from 0 inclusive to {@value #SIZE} exclusive. + * @return the current value at the given row and column. */ @Override public final double getElement(final int row, final int column) { @@ -206,9 +207,9 @@ public final class Matrix3 extends Matri * If the matrix is known to be an instance of {@code Matrix3}, * then the {@link #m00} … {@link #m22} fields can be set directly for efficiency. * - * @param row The row index, from 0 inclusive to {@value #SIZE} exclusive. - * @param column The column index, from 0 inclusive to {@value #SIZE} exclusive. - * @param value The new value to set at the given row and column. + * @param row the row index, from 0 inclusive to {@value #SIZE} exclusive. + * @param column the column index, from 0 inclusive to {@value #SIZE} exclusive. + * @param value the new value to set at the given row and column. */ @Override public final void setElement(final int row, final int column, final double value) {
