Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -77,9 +77,9 @@ public final class VerticalOffset extend * Creates a transform from the specified group of parameter values. * The parameter value is unconditionally converted to metres. * - * @param factory Ignored (can be null). - * @param values The group of parameter values. - * @return The created math transform. + * @param factory ignored (can be null). + * @param values the group of parameter values. + * @return the created math transform. * @throws ParameterNotFoundException if a required parameter was not found. */ @Override @@ -105,9 +105,9 @@ public final class VerticalOffset extend * then we should make this method non-static and declare an overrideable {@code postCreate} method * in {@link AbstractProvider} instead.</div> * - * @param parameterized The transform created by {@code createMathTransform(…)}. - * @param after The matrix for the operation to be concatenated after {@code parameterized}. - * @return The transform to use instead of {@code parameterized}. + * @param parameterized the transform created by {@code createMathTransform(…)}. + * @param after the matrix for the operation to be concatenated after {@code parameterized}. + * @return the transform to use instead of {@code parameterized}. * @throws FactoryException if an error occurred while creating the new transform. */ public static MathTransform postCreate(MathTransform parameterized, final Matrix after) throws FactoryException {
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -163,11 +163,11 @@ public abstract class AbstractParameterD * </tr> * </table> * - * @param properties The properties to be given to the identified object. - * @param minimumOccurs The {@linkplain #getMinimumOccurs() minimum number of times} that values - * for this parameter group are required, or 0 if no restriction. - * @param maximumOccurs The {@linkplain #getMaximumOccurs() maximum number of times} that values - * for this parameter group are required, or {@link Integer#MAX_VALUE} if no restriction. + * @param properties the properties to be given to the identified object. + * @param minimumOccurs the {@linkplain #getMinimumOccurs() minimum number of times} that values + * for this parameter group are required, or 0 if no restriction. + * @param maximumOccurs the {@linkplain #getMaximumOccurs() maximum number of times} that values + * for this parameter group are required, or {@link Integer#MAX_VALUE} if no restriction. */ protected AbstractParameterDescriptor(final Map<String,?> properties, final int minimumOccurs, final int maximumOccurs) @@ -192,7 +192,7 @@ public abstract class AbstractParameterD * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param descriptor The object to shallow copy. + * @param descriptor the object to shallow copy. */ protected AbstractParameterDescriptor(final GeneralParameterDescriptor descriptor) { super(descriptor); @@ -216,7 +216,7 @@ public abstract class AbstractParameterD * The default implementation returns {@code GeneralParameterDescriptor.class}. * Subclasses implementing a more specific GeoAPI interface shall override this method. * - * @return The parameter descriptor interface implemented by this class. + * @return the parameter descriptor interface implemented by this class. */ @Override public Class<? extends GeneralParameterDescriptor> getInterface() { @@ -227,7 +227,7 @@ public abstract class AbstractParameterD * The minimum number of times that values for this parameter group or parameter are required. * A value of 0 means an optional parameter. * - * @return The minimum occurrence. + * @return the minimum occurrence. */ @Override public int getMinimumOccurs() { @@ -238,7 +238,7 @@ public abstract class AbstractParameterD * The maximum number of times that values for this parameter group or parameter can be included. * A value greater than 1 means a repeatable parameter. * - * @return The maximum occurrence. + * @return the maximum occurrence. */ @Override public int getMaximumOccurs() { @@ -308,7 +308,7 @@ public abstract class AbstractParameterD * {@linkplain DefaultParameterDescriptor#formatTo(Formatter) descriptors}. * The text formatted by this method is {@linkplain Formatter#setInvalidWKT flagged as invalid WKT}. * - * @param formatter The formatter where to format the inner content of this WKT element. + * @param formatter the formatter where to format the inner content of this WKT element. * @return {@code "Parameter"} or {@code "ParameterGroup"}. */ @Override Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -19,6 +19,7 @@ package org.apache.sis.parameter; import java.util.Arrays; import java.util.Set; import java.util.Map; +import java.util.Objects; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlRootElement; import javax.measure.Unit; @@ -41,9 +42,6 @@ import org.apache.sis.referencing.Identi import static org.apache.sis.util.ArgumentChecks.ensureNonNull; import static org.apache.sis.util.ArgumentChecks.ensureCanCast; -// Branch-dependent imports -import java.util.Objects; - /** * The definition of a single parameter used by an operation method. @@ -180,18 +178,18 @@ public class DefaultParameterDescriptor< * If both {@code valueDomain} and {@code validValues} are non-null, then all valid values shall be contained * in the value domain. * - * @param properties The properties to be given to the identified object. - * @param minimumOccurs The {@linkplain #getMinimumOccurs() minimum number of times} that values - * for this parameter group are required, or 0 if no restriction. - * @param maximumOccurs The {@linkplain #getMaximumOccurs() maximum number of times} that values - * for this parameter group are required, or {@link Integer#MAX_VALUE} if no restriction. - * @param valueClass The class that describes the type of the parameter value. - * @param valueDomain The minimum value, maximum value and unit of measurement, or {@code null} if none. - * @param validValues The list of valid values, or {@code null} if there is no restriction. - * This property is mostly for restricting values to a {@linkplain CodeList code list} - * or enumeration subset. It is not necessary to provide this property when all values - * from the code list or enumeration are valid. - * @param defaultValue The default value for the parameter, or {@code null} if none. + * @param properties the properties to be given to the identified object. + * @param minimumOccurs the {@linkplain #getMinimumOccurs() minimum number of times} that values + * for this parameter group are required, or 0 if no restriction. + * @param maximumOccurs the {@linkplain #getMaximumOccurs() maximum number of times} that values + * for this parameter group are required, or {@link Integer#MAX_VALUE} if no restriction. + * @param valueClass the class that describes the type of the parameter value. + * @param valueDomain the minimum value, maximum value and unit of measurement, or {@code null} if none. + * @param validValues the list of valid values, or {@code null} if there is no restriction. + * This property is mostly for restricting values to a {@linkplain CodeList code list} + * or enumeration subset. It is not necessary to provide this property when all values + * from the code list or enumeration are valid. + * @param defaultValue the default value for the parameter, or {@code null} if none. */ @SuppressWarnings("unchecked") public DefaultParameterDescriptor(final Map<String,?> properties, @@ -264,7 +262,7 @@ public class DefaultParameterDescriptor< * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param descriptor The descriptor to shallow copy. + * @param descriptor the descriptor to shallow copy. * * @see #castOrCopy(ParameterDescriptor) */ @@ -283,9 +281,9 @@ public class DefaultParameterDescriptor< * 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 values of the given object. * - * @param <T> The type of values. - * @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 <T> the type of values. + * @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 <T> DefaultParameterDescriptor<T> castOrCopy(final ParameterDescriptor<T> object) { @@ -313,7 +311,7 @@ public class DefaultParameterDescriptor< /** * Returns the class that describe the type of the parameter. * - * @return The parameter value class. + * @return the parameter value class. */ @Override public final Class<T> getValueClass() { @@ -325,13 +323,13 @@ public class DefaultParameterDescriptor< * The set of valid values is usually a {@linkplain CodeList code list} or enumeration. * This method returns {@code null} if this parameter does not limit values to a finite set. * - * @return A finite set of valid values (usually from a {@linkplain CodeList code list}), + * @return a finite set of valid values (usually from a {@linkplain CodeList code list}), * or {@code null} if it does not apply or if there is no restriction. */ @Override @SuppressWarnings("ReturnOfCollectionOrArrayField") public Set<T> getValidValues() { - return validValues; // Null or unmodifiable + return validValues; // Null or unmodifiable } /** @@ -345,7 +343,7 @@ public class DefaultParameterDescriptor< * {@code Range<T>}, or {@code Range<E>} where {@code <E>} is the {@linkplain Class#getComponentType() component * type} of {@code <T>} (using wrapper classes for primitive types).</div> * - * @return The domain of values, or {@code null}. + * @return the domain of values, or {@code null}. * * @see Parameters#getValueDomain(ParameterDescriptor) */ @@ -367,7 +365,7 @@ public class DefaultParameterDescriptor< * <code>{@linkplain #getValueDomain()}.{@linkplain Range#getMinValue() getMinValue()}</code>. * Note that this method said nothing about whether the value is {@linkplain Range#isMinIncluded() inclusive}.</p> * - * @return The minimum parameter value (often an instance of {@link Double}), or {@code null} if unbounded. + * @return the minimum parameter value (often an instance of {@link Double}), or {@code null} if unbounded. */ @Override @SuppressWarnings("unchecked") @@ -385,7 +383,7 @@ public class DefaultParameterDescriptor< * <code>{@linkplain #getValueDomain()}.{@linkplain Range#getMaxValue() getMaxValue()}</code>. * Note that this method said nothing about whether the value is {@linkplain Range#isMaxIncluded() inclusive}.</p> * - * @return The minimum parameter value (often an instance of {@link Double}), or {@code null} if unbounded. + * @return the minimum parameter value (often an instance of {@link Double}), or {@code null} if unbounded. */ @Override @SuppressWarnings("unchecked") @@ -399,7 +397,7 @@ public class DefaultParameterDescriptor< * including a {@link Number} or a {@link String}. If there is no default value, * then this method returns {@code null}. * - * @return The default value, or {@code null} in none. + * @return the default value, or {@code null} in none. */ @Override public T getDefaultValue() { @@ -416,7 +414,7 @@ public class DefaultParameterDescriptor< * <p>This is a convenience method for * <code>{@linkplain #getValueDomain()}.{@linkplain MeasurementRange#unit() unit()}</code>.</p> * - * @return The unit for numeric value, or {@code null} if it doesn't apply to the value type. + * @return the unit for numeric value, or {@code null} if it doesn't apply to the value type. */ @Override public Unit<?> getUnit() { @@ -428,7 +426,7 @@ public class DefaultParameterDescriptor< * The {@linkplain DefaultParameterDescriptor parameter descriptor} for the created parameter value will be * {@code this} object. * - * @return A parameter initialized to the default value. + * @return a parameter initialized to the default value. */ @Override public ParameterValue<T> createValue() { Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -148,14 +148,14 @@ public class DefaultParameterDescriptorG * </tr> * </table> * - * @param properties The properties to be given to the new parameter group. - * @param minimumOccurs The {@linkplain #getMinimumOccurs() minimum number of times} that values - * for this parameter group are required, or 0 if no restriction. - * @param maximumOccurs The {@linkplain #getMaximumOccurs() maximum number of times} that values - * for this parameter group are required, or {@link Integer#MAX_VALUE} if no restriction. - * @param parameters The {@linkplain #descriptors() parameter descriptors} for this group. + * @param properties the properties to be given to the new parameter group. + * @param minimumOccurs the {@linkplain #getMinimumOccurs() minimum number of times} that values + * for this parameter group are required, or 0 if no restriction. + * @param maximumOccurs the {@linkplain #getMaximumOccurs() maximum number of times} that values + * for this parameter group are required, or {@link Integer#MAX_VALUE} if no restriction. + * @param parameters the {@linkplain #descriptors() parameter descriptors} for this group. * - * @throws InvalidParameterNameException If a parameter name is duplicated. + * @throws InvalidParameterNameException if a parameter name is duplicated. */ public DefaultParameterDescriptorGroup(final Map<String,?> properties, final int minimumOccurs, final int maximumOccurs, GeneralParameterDescriptor... parameters) @@ -175,8 +175,8 @@ public class DefaultParameterDescriptorG * expect the same parameters than their <cite>"Position Vector transformation"</cite> counterpart * (EPSG codes 1033, 1037 and 9606) but perform the rotation in the opposite direction.</div> * - * @param properties The properties to be given to the new parameter group. - * @param parameters The existing group from which to copy the {@linkplain #descriptors() parameter descriptors}. + * @param properties the properties to be given to the new parameter group. + * @param parameters the existing group from which to copy the {@linkplain #descriptors() parameter descriptors}. * * @since 0.7 */ @@ -206,7 +206,7 @@ public class DefaultParameterDescriptorG /** * Ensures that the given name array does not contain duplicate values. * - * @param properties The properties given to the constructor, or {@code null} if unknown. + * @param properties the properties given to the constructor, or {@code null} if unknown. */ private static void verifyNames(final Map<String,?> properties, final GeneralParameterDescriptor[] parameters) { for (int i=0; i<parameters.length; i++) { @@ -230,7 +230,7 @@ public class DefaultParameterDescriptorG * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * - * @param descriptor The descriptor to shallow copy. + * @param descriptor the descriptor to shallow copy. * * @see #castOrCopy(ParameterDescriptorGroup) */ @@ -280,7 +280,7 @@ public class DefaultParameterDescriptorG @Override public boolean contains(final Object object) { Set<GeneralParameterDescriptor> s = asSet; if (s == null) { - asSet = s = new HashSet<>(this); // No synchronization: not a big problem if created twice. + asSet = s = new HashSet<>(this); // No synchronization: not a big problem if created twice. } return s.contains(object); } @@ -292,8 +292,8 @@ public class DefaultParameterDescriptorG * 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 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 DefaultParameterDescriptorGroup castOrCopy(final ParameterDescriptorGroup object) { @@ -320,7 +320,7 @@ public class DefaultParameterDescriptorG /** * Returns all parameters in this group. * - * @return The parameter descriptors in this group. + * @return the parameter descriptors in this group. */ @Override @SuppressWarnings("ReturnOfCollectionOrArrayField") @@ -332,8 +332,8 @@ public class DefaultParameterDescriptorG * Returns the first parameter in this group for the specified name. * This method does not search in sub-groups. * - * @param name The name of the parameter to search for. - * @return The parameter for the given identifier name. + * @param name the name of the parameter to search for. + * @return the parameter for the given identifier name. * @throws ParameterNotFoundException if there is no parameter for the given name. */ @Override @@ -373,7 +373,7 @@ public class DefaultParameterDescriptorG * The {@linkplain DefaultParameterValueGroup#getDescriptor() parameter descriptor} for the * created group will be {@code this} object. * - * @return A new parameter instance initialized to the default value. + * @return a new parameter instance initialized to the default value. */ @Override public ParameterValueGroup createValue() { @@ -387,8 +387,8 @@ public class DefaultParameterDescriptorG */ @Override public boolean equals(final Object object, final ComparisonMode mode) { - if (object == this) { // Optimization for a common case. - return true; + if (object == this) { + return true; // Optimization for a common case. } if (super.equals(object, mode)) { switch (mode) { @@ -472,9 +472,9 @@ public class DefaultParameterDescriptorG * {@code valueClass} information, so we want to use them in replacement of descriptors of step 1.</li> * </ol> * - * @param fromValues Descriptors declared in the {@code ParameterValue} instances of a {@code ParameterValueGroup}. - * @param replacements An {@code IdentityHashMap} where to store the replacements that the caller needs - * to apply in the {@code GeneralParameterValue} instances. + * @param fromValues descriptors declared in the {@code ParameterValue} instances of a {@code ParameterValueGroup}. + * @param replacements an {@code IdentityHashMap} where to store the replacements that the caller needs to apply in + * the {@code GeneralParameterValue} instances. */ final void merge(GeneralParameterDescriptor[] fromValues, final Map<GeneralParameterDescriptor,GeneralParameterDescriptor> replacements) Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -424,7 +424,7 @@ public class DefaultParameterValue<T> ex * then converts the values to the given unit of measurement.</p> * * @param unit the unit of measure for the value to be returned. - * @return The sequence of values represented by this parameter after conversion to type + * @return the sequence of values represented by this parameter after conversion to type * {@code double} and conversion to {@code unit}. * @throws IllegalArgumentException if the specified unit is invalid for this parameter. * @throws InvalidParameterTypeException if the value is not an array of {@code double}s. Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -139,7 +139,7 @@ public class DefaultParameterValueGroup * invoking <code>descriptor.{@linkplain DefaultParameterDescriptorGroup#createValue() createValue()}</code> * on a descriptor supplied by a map projection or process provider.</p> * - * @param descriptor The descriptor for this group. + * @param descriptor the descriptor for this group. */ public DefaultParameterValueGroup(final ParameterDescriptorGroup descriptor) { ArgumentChecks.ensureNonNull("descriptor", descriptor); @@ -176,7 +176,7 @@ public class DefaultParameterValueGroup /** * Returns the abstract definition of this group of parameters. * - * @return The abstract definition of this group of parameters. + * @return the abstract definition of this group of parameters. */ @Override @XmlElement(name = "group") @@ -202,7 +202,7 @@ public class DefaultParameterValueGroup * {@link org.opengis.parameter.InvalidParameterCardinalityException} or other runtime exceptions if a condition * is not meet. * - * @return The values in this group. + * @return the values in this group. */ @Override @SuppressWarnings("ReturnOfCollectionOrArrayField") @@ -241,8 +241,8 @@ public class DefaultParameterValueGroup * may exist for the same {@linkplain ParameterDescriptorGroup descriptor}. The user have to * {@linkplain #groups(String) query all subgroups} and select explicitly the appropriate one. * - * @param name The name of the parameter to search for. - * @return The parameter value for the given name. + * @param name the name of the parameter to search for. + * @return the parameter value for the given name. * @throws ParameterNotFoundException if there is no parameter value for the given name. * * @see #getValue(ParameterDescriptor) @@ -333,8 +333,8 @@ public class DefaultParameterValueGroup * <code>{@linkplain DefaultParameterDescriptor#getMinimumOccurs() minimumOccurs} == 0</code>) * and no value were defined previously, then this method returns an empty set.</p> * - * @param name The name of the parameter to search for. - * @return The set of all parameter group for the given name. + * @param name the name of the parameter to search for. + * @return the set of all parameter group for the given name. * @throws ParameterNotFoundException if no descriptor was found for the given name. */ @Override @@ -376,8 +376,8 @@ public class DefaultParameterValueGroup * {@link #values()} list, decide which occurrences to remove if there is many of them for the * same name, and whether to iterate recursively into sub-groups or not.</div> * - * @param name The name of the parameter group to create. - * @return A newly created parameter group for the given name. + * @param name the name of the parameter group to create. + * @return a newly created parameter group for the given name. * @throws ParameterNotFoundException if no descriptor was found for the given name. * @throws InvalidParameterCardinalityException if this parameter group already contains the * {@linkplain ParameterDescriptorGroup#getMaximumOccurs() maximum number of occurrences} @@ -410,8 +410,8 @@ public class DefaultParameterValueGroup * ignore the order of parameter values (but not necessarily the order of parameter descriptors).</li> * </ul> * - * @param object The object to compare to {@code this}. - * @param mode The strictness level of the comparison. + * @param object the object to compare to {@code this}. + * @param mode the strictness level of the comparison. * @return {@code true} if both objects are equal according the given comparison mode. */ @Override @@ -468,7 +468,7 @@ scan: for (final GeneralParameterValue * * Subclasses shall override {@link #equals(Object, ComparisonMode)} instead than this method. * - * @param object The object to compare to {@code this}. + * @param object the object to compare to {@code this}. * @return {@code true} if both objects are equal. */ @Override @@ -479,7 +479,7 @@ scan: for (final GeneralParameterValue /** * Returns a hash value for this parameter. * - * @return The hash code value. This value does not need to be the same + * @return the hash code value. This value does not need to be the same * in past or future versions of this class. */ @Override @@ -491,7 +491,7 @@ scan: for (final GeneralParameterValue * Returns a deep copy of this group of parameter values. * Included parameter values and subgroups are cloned recursively. * - * @return A copy of this group of parameter values. + * @return a copy of this group of parameter values. * * @see #copy(ParameterValueGroup, ParameterValueGroup) */ Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -67,8 +67,8 @@ final class MapProjectionDescriptor exte /** * Creates a new parameter descriptor from the given properties and parameters. * - * @param properties Names, aliases and identifiers of the parameter group. - * @param parameters The "real" parameters. + * @param properties names, aliases and identifiers of the parameter group. + * @param parameters the "real" parameters. */ MapProjectionDescriptor(final Map<String,?> properties, final ParameterDescriptor<?>[] parameters) { super(properties, addAxisLengths(parameters)); @@ -118,8 +118,8 @@ final class MapProjectionDescriptor exte * Returns the parameter descriptor for the given name. If the given name is one of the dynamic parameters, * returns a descriptor for that parameter without adding it to the list of parameter values. * - * @param name The case insensitive name of the parameter to search for. - * @return The parameter for the given name. + * @param name the case insensitive name of the parameter to search for. + * @return the parameter for the given name. * @throws ParameterNotFoundException if there is no parameter for the given name. */ @Override Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -18,6 +18,7 @@ package org.apache.sis.parameter; import java.util.Collections; import java.util.Map; +import java.util.Objects; import javax.measure.Unit; import org.opengis.parameter.ParameterValue; import org.opengis.parameter.ParameterDescriptor; @@ -33,9 +34,6 @@ import org.apache.sis.util.ArraysExt; import static org.opengis.referencing.IdentifiedObject.NAME_KEY; import static org.apache.sis.metadata.iso.citation.Citations.NETCDF; -// Branch-specific imports -import java.util.Objects; - /** * Map projection parameters, with special processing for alternative ways to express the ellipsoid axis length @@ -100,8 +98,8 @@ final class MapProjectionParameters exte * "invisible" parameters, returns a dynamic parameter view without adding it to the list * of real parameter values. * - * @param name The case insensitive name of the parameter to search for. - * @return The parameter value for the given name. + * @param name the case insensitive name of the parameter to search for. + * @return the parameter value for the given name. * @throws ParameterNotFoundException if there is no parameter value for the given name. */ @Override @@ -156,6 +154,7 @@ final class MapProjectionParameters exte * * @see org.apache.sis.referencing.datum.DefaultEllipsoid#getAuthalicRadius() */ + @SuppressWarnings("CloneableClassWithoutClone") static final class EarthRadius extends DefaultParameterValue<Double> { /** * For cross-version compatibility. Actually instances of this class @@ -240,6 +239,7 @@ final class MapProjectionParameters exte * * @see org.apache.sis.referencing.datum.DefaultEllipsoid#getInverseFlattening() */ + @SuppressWarnings("CloneableClassWithoutClone") static final class InverseFlattening extends DefaultParameterValue<Double> { /** * For cross-version compatibility. Actually instances of this class @@ -315,8 +315,8 @@ final class MapProjectionParameters exte */ @Override protected void setValue(final Object value, final Unit<?> unit) { - super.setValue(value, unit); // Perform argument check. - final double ivf = (Double) value; // At this point, can not be anything else than Double. + super.setValue(value, unit); // Perform argument check. + final double ivf = (Double) value; // At this point, can not be anything else than Double. final Number ca = (Number) semiMajor.getValue(); if (ca != null) { a = ca.doubleValue(); @@ -359,6 +359,7 @@ final class MapProjectionParameters exte * * @see org.apache.sis.referencing.datum.DefaultEllipsoid#isIvfDefinitive() */ + @SuppressWarnings("CloneableClassWithoutClone") static final class IsIvfDefinitive extends DefaultParameterValue<Boolean> { /** * For cross-version compatibility. Actually instances of this class @@ -391,7 +392,7 @@ final class MapProjectionParameters exte */ @Override protected void setValue(final Object value, final Unit<?> unit) { - super.setValue(value, unit); // Perform argument check. + super.setValue(value, unit); // Perform argument check. if (!(Boolean) value) { inverseFlattening.invalidate(); } @@ -422,6 +423,7 @@ final class MapProjectionParameters exte * from the {@code "standard_parallel_1"} and {@code "standard_parallel_1"} standard parameters. When this * non-standard parameter is explicitely set, the array elements are given to the above-cited standard parameters. */ + @SuppressWarnings("CloneableClassWithoutClone") static final class StandardParallel extends DefaultParameterValue<double[]> { /** * For cross-version compatibility. Actually instances of this class @@ -459,7 +461,7 @@ final class MapProjectionParameters exte @Override @SuppressWarnings("fallthrough") protected void setValue(final Object value, final Unit<?> unit) { - super.setValue(value, unit); // Perform argument check. + super.setValue(value, unit); // Perform argument check. double p1 = Double.NaN; double p2 = Double.NaN; if (value != null) { @@ -469,8 +471,8 @@ final class MapProjectionParameters exte throw new IllegalArgumentException(Errors.format( Errors.Keys.UnexpectedArrayLength_2, 2, values.length)); } - case 2: p2 = values[1]; // Fallthrough - case 1: p1 = values[0]; // Fallthrough + case 2: p2 = values[1]; // Fallthrough + case 1: p1 = values[0]; // Fallthrough case 0: break; } } @@ -495,4 +497,20 @@ final class MapProjectionParameters exte return new double[] {(p1 != null) ? p1.doubleValue() : Double.NaN, p2.doubleValue()}; } } + + /** + * Returns a deep copy of this group of parameter values. + * Included parameter values and subgroups are cloned recursively. + * + * @return a copy of this group of parameter values. + */ + @Override + public MapProjectionParameters clone() { + final MapProjectionParameters copy = (MapProjectionParameters) super.clone(); + copy.earthRadius = null; + copy.inverseFlattening = null; + copy.standardParallel = null; + copy.isIvfDefinitive = null; + return copy; + } } Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -64,8 +64,8 @@ class MatrixParameters extends TensorPar /** * Constructs a descriptors provider. * - * @param numRow The parameter for the number of rows. - * @param numCol The parameter for the number of columns. + * @param numRow the parameter for the number of rows. + * @param numCol the parameter for the number of columns. */ MatrixParameters(final ParameterDescriptor<Integer> numRow, final ParameterDescriptor<Integer> numCol) { super(Double.class, "elt_", "_", numRow, numCol); @@ -93,8 +93,8 @@ class MatrixParameters extends TensorPar * used by the EPSG database. For other row and column indices, the same pattern is still used but the * result is not an official EPSG parameter name. * - * @param indices The indices of the tensor element for which to create a parameter alias. - * @return The parameter descriptor alias for the tensor element at the given indices, or {@code null} if none. + * @param indices the indices of the tensor element for which to create a parameter alias. + * @return the parameter descriptor alias for the tensor element at the given indices, or {@code null} if none. */ static String indicesToAlias(final int[] indices) { final int row = indices[0]; Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -59,8 +59,8 @@ final class MatrixParametersAlphaNum ext /** * Constructs a descriptors provider. * - * @param numRow The parameter for the number of rows. - * @param numCol The parameter for the number of columns. + * @param numRow the parameter for the number of rows. + * @param numCol the parameter for the number of columns. */ MatrixParametersAlphaNum(final ParameterDescriptor<Integer> numRow, final ParameterDescriptor<Integer> numCol) { super(numRow, numCol); @@ -90,8 +90,10 @@ final class MatrixParametersAlphaNum ext * while the EPSG parameters are (officially) restricted to 3×3 matrices. */ if (WKT1 == this) { - // Should never happen, but still unconditionally tested - // (no 'assert' keyword) for preventing stack overflow. + /* + * Should never happen, but still unconditionally tested + * (no 'assert' keyword) for preventing stack overflow. + */ throw new AssertionError(); } final ParameterDescriptor<Double> wkt = WKT1.getElementDescriptor(indices); // Really 'WKT1', not 'super'. Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -243,7 +243,7 @@ public class ParameterFormat extends Tab /** * If the identifier should be written only for some code spaces, those code spaces. - * Otherwise {@code null}. + * Otherwise {@code null}. This set should not be modified; new set are created if needed. * * @see #getPreferredCodespaces() */ @@ -268,8 +268,8 @@ public class ParameterFormat extends Tab /** * Creates a new formatter for the given locale and timezone. * - * @param locale The locale, or {@code null} for {@code Locale.ROOT}. - * @param timezone The timezone, or {@code null} for UTC. + * @param locale the locale, or {@code null} for {@code Locale.ROOT}. + * @param timezone the timezone, or {@code null} for UTC. */ public ParameterFormat(final Locale locale, final TimeZone timezone) { super(locale, timezone); @@ -296,8 +296,8 @@ public class ParameterFormat extends Tab * <li>{@link java.util.Locale.Category#DISPLAY} specifies the locale to use for labels.</li> * </ul> * - * @param category The category for which a locale is desired. - * @return The locale for the given category (never {@code null}). + * @param category the category for which a locale is desired. + * @return the locale for the given category (never {@code null}). */ @Override public Locale getLocale(final Locale.Category category) { @@ -308,7 +308,7 @@ public class ParameterFormat extends Tab * Returns the amount of information to put in the table. * The default value is {@link ContentLevel#BRIEF}. * - * @return The table content. + * @return the table content. */ public ContentLevel getContentLevel() { return contentLevel; @@ -317,7 +317,7 @@ public class ParameterFormat extends Tab /** * Sets the amount of information to put in the table. * - * @param level The amount of information to put in the table. + * @param level the amount of information to put in the table. */ public void setContentLevel(final ContentLevel level) { ArgumentChecks.ensureNonNull("level", level); @@ -331,10 +331,11 @@ public class ParameterFormat extends Tab * * <p>The default value is {@code null}.</p> * - * @return The code spaces of names and identifiers to show, or {@code null} if no restriction. + * @return the code spaces of names and identifiers to show, or {@code null} if no restriction. */ public String[] getPreferredCodespaces() { - return (preferredCodespaces != null) ? preferredCodespaces.toArray(new String[preferredCodespaces.size()]) : null; + final Set<String> p = preferredCodespaces; + return (p != null) ? p.toArray(new String[p.size()]) : null; } /** @@ -343,7 +344,7 @@ public class ParameterFormat extends Tab * {@link ScopedName#head()} or {@link GenericName#scope()} value in the given list, unless no name or alias * matches this criterion. * - * @param codespaces The preferred code spaces of names, aliases and identifiers to format, or {@code null} + * @param codespaces the preferred code spaces of names, aliases and identifiers to format, or {@code null} * for accepting all of them. Some typical values are {@code "EPSG"}, {@code "OGC"} or {@code "GeoTIFF"}. */ public void setPreferredCodespaces(final String... codespaces) { @@ -358,14 +359,15 @@ public class ParameterFormat extends Tab * Returns {@code true} if a name, alias or identifier in the given codespace should be formatted. */ private boolean isPreferredCodespace(final String codespace) { - return (preferredCodespaces == null) || preferredCodespaces.contains(codespace); + final Set<String> p = preferredCodespaces; + return (p == null) || p.contains(codespace); } /** * Returns the colors for an output on X3.64 compatible terminal, or {@code null} if none. * The default value is {@code null}. * - * @return The colors for an output on X3.64 compatible terminal, or {@code null} if none. + * @return the colors for an output on X3.64 compatible terminal, or {@code null} if none. */ public Colors getColors() { return colors; @@ -374,7 +376,7 @@ public class ParameterFormat extends Tab /** * Sets the colors for an output on X3.64 compatible terminal. * - * @param colors The colors for an output on X3.64 compatible terminal, or {@code null} if none. + * @param colors the colors for an output on X3.64 compatible terminal, or {@code null} if none. */ public void setColors(final Colors colors) { this.colors = colors; @@ -399,7 +401,7 @@ public class ParameterFormat extends Tab * <li><code>{@linkplain IdentifiedObject}[]</code> — accepted only for {@link ContentLevel#NAME_SUMMARY}.</li> * </ul> * - * @throws IOException If an error occurred while writing to the given appendable. + * @throws IOException if an error occurred while writing to the given appendable. */ @Override public void format(final Object object, final Appendable toAppendTo) throws IOException { @@ -440,10 +442,10 @@ public class ParameterFormat extends Tab /** * Implementation of public {@code format(…)} methods for all content levels except {@code NAME_SUMMARY}. * - * @param name The group name, usually {@code descriptor.getName().getCode()}. - * @param descriptor The parameter descriptor, usually {@code values.getDescriptor()}. - * @param values The parameter values, or {@code null} if none. - * @throws IOException If an error occurred while writing to the given appendable. + * @param name the group name, usually {@code descriptor.getName().getCode()}. + * @param descriptor the parameter descriptor, usually {@code values.getDescriptor()}. + * @param values the parameter values, or {@code null} if none. + * @throws IOException if an error occurred while writing to the given appendable. */ private void format(final String name, final ParameterDescriptorGroup group, final ParameterValueGroup values, final Appendable out) throws IOException @@ -465,7 +467,7 @@ public class ParameterFormat extends Tab final Collection<?> elements = (values != null) ? values.values() : group.descriptors(); final Map<GeneralParameterDescriptor, ParameterTableRow> descriptorValues = new LinkedHashMap<>(hashMapCapacity(elements.size())); - List<Object> deferredGroups = null; // To be created only if needed (it is usually not). + List<Object> deferredGroups = null; // To be created only if needed (it is usually not). for (final Object element : elements) { final GeneralParameterValue parameter; final GeneralParameterDescriptor descriptor; @@ -769,8 +771,8 @@ public class ParameterFormat extends Tab * Transverse Mercator projections is 0.9996 (4 digits), and the scale factor of "NTF (Paris) / Lambert zone II" * projection is 0.99987742 (8 digits). * - * @param format The format to configure. - * @param m The absolute value (magnitude) of the value to write. + * @param format the format to configure. + * @param m the absolute value (magnitude) of the value to write. */ private static void configure(final NumberFormat format, final double m) { if (format.getMaximumFractionDigits() <= 9) { @@ -801,8 +803,8 @@ public class ParameterFormat extends Tab /** * Implementation of public {@code format(…)} methods for {@code NAME_SUMMARY} content level. * - * @param objects The collection of objects to format. - * @param out The stream or buffer where to write the summary. + * @param objects the collection of objects to format. + * @param out the stream or buffer where to write the summary. * @throws IOException if an error occurred will writing to the given appendable. */ private void formatSummary(final IdentifiedObject[] objects, final Appendable out) throws IOException { @@ -820,29 +822,29 @@ public class ParameterFormat extends Tab boolean hasIdentifiers = false; final List<String[]> rows = new ArrayList<>(); final Map<String,Integer> columnIndices = new LinkedHashMap<>(); - columnIndices.put(null, 0); // See above comment for the meaning of "null" here. + columnIndices.put(null, 0); // See above comment for the meaning of "null" here. if (preferredCodespaces != null) { for (final String codespace : preferredCodespaces) { columnIndices.put(codespace, columnIndices.size()); } } for (final IdentifiedObject object : objects) { - String[] row = new String[columnIndices.size()]; // Will growth later if needed. + String[] row = new String[columnIndices.size()]; // Will growth later if needed. /* * Put the first identifier in the first column. If no identifier has a codespace in the list * supplied by the user, then we will use the first identifier (any codespace) as a fallback. */ final Set<ReferenceIdentifier> identifiers = object.getIdentifiers(); - if (identifiers != null) { // Paranoiac check. + if (identifiers != null) { // Paranoiac check. Identifier identifier = null; for (final ReferenceIdentifier candidate : identifiers) { - if (candidate != null) { // Paranoiac check. + if (candidate != null) { // Paranoiac check. if (isPreferredCodespace(candidate.getCodeSpace())) { identifier = candidate; - break; // Format now. + break; // Format now. } if (identifier == null) { - identifier = candidate; // To be used as a fallback if we find nothing better. + identifier = candidate; // To be used as a fallback if we find nothing better. } } } @@ -934,10 +936,10 @@ public class ParameterFormat extends Tab * Stores a value in the given position of the given row, expanding the array if needed. * This operation is performed only if no value already exists in the cell. * - * @param row All columns in a single row. - * @param columnIndices Indices of columns for each codespace. - * @param codespace The codespace of the name or alias to add. - * @param name The code of the name or alias to add. + * @param row all columns in a single row. + * @param columnIndices indices of columns for each codespace. + * @param codespace the codespace of the name or alias to add. + * @param name the code of the name or alias to add. * @return {@code row}, or a new array if it was necessary to expand the row. */ private static String[] putIfAbsent(final Vocabulary resources, String[] row, @@ -997,7 +999,7 @@ public class ParameterFormat extends Tab try { f.format(object, out); } catch (IOException e) { - throw new AssertionError(e); // Should never happen, since we are writing to stdout. + throw new AssertionError(e); // Should never happen, since we are writing to stdout. } INSTANCE.set(f); } @@ -1005,12 +1007,25 @@ public class ParameterFormat extends Tab /** * Not yet supported. * - * @return Currently never return. - * @throws ParseException Currently always thrown. + * @return currently never return. + * @throws ParseException currently always thrown. */ @Override public Object parse(final CharSequence text, final ParsePosition pos) throws ParseException { throw new ParseException(Errors.getResources(displayLocale) .getString(Errors.Keys.UnsupportedOperation_1, "parse"), 0); } + + /** + * Returns a clone of this format. + * + * @return a clone of this format. + */ + @Override + public ParameterFormat clone() { + final ParameterFormat clone = (ParameterFormat) super.clone(); + // No need to clone 'preferredCodespaces'. + clone.colors = clone.colors.clone(); + return clone; + } } Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -123,21 +123,21 @@ final class ParameterTableRow { /** * Creates a new row in a table to be formatted by {@link ParameterFormat}. * - * @param object The object for which to get the (<var>codespace(s)</var>, <var>name(s)</var>). - * @param locale The locale for formatting the names and the remarks. - * @param remarks An initially empty map, to be filled with any remarks we may found. + * @param object the object for which to get the (<var>codespace(s)</var>, <var>name(s)</var>). + * @param locale the locale for formatting the names and the remarks. + * @param remarks an initially empty map, to be filled with any remarks we may found. */ ParameterTableRow(final IdentifiedObject object, final Locale locale, final Set<String> preferredCodespaces, final Map<String,Integer> remarks, final boolean isBrief) { - values = new ArrayList<>(2); // In the vast majority of cases, we will have only one value. + values = new ArrayList<>(2); // In the vast majority of cases, we will have only one value. units = new ArrayList<>(2); identifiers = new LinkedHashMap<>(); ReferenceIdentifier name = object.getName(); - if (name != null) { // Paranoiac check. + if (name != null) { // Paranoiac check. final String codespace = name.getCodeSpace(); if (preferredCodespaces == null || preferredCodespaces.contains(codespace)) { - addIdentifier(codespace, name.getCode()); // Value needs to be a String here. + addIdentifier(codespace, name.getCode()); // Value needs to be a String here. name = null; } } @@ -147,7 +147,7 @@ final class ParameterTableRow { */ if (!isBrief || identifiers.isEmpty()) { final Collection<GenericName> aliases = object.getAlias(); - if (aliases != null) { // Paranoiac check. + if (aliases != null) { // Paranoiac check. for (GenericName alias : aliases) { if (!isDeprecated(alias)) { final String codespace = NameToIdentifier.getCodeSpace(alias, locale); @@ -170,19 +170,19 @@ final class ParameterTableRow { * unconditionally add the name regardless its namespace. */ if (name != null) { - addIdentifier(name.getCodeSpace(), name.getCode()); // Value needs to be a String here. + addIdentifier(name.getCodeSpace(), name.getCode()); // Value needs to be a String here. } /* * Add identifiers (detailed mode only). */ if (!isBrief) { final Collection<? extends ReferenceIdentifier> ids = object.getIdentifiers(); - if (ids != null) { // Paranoiac check. + if (ids != null) { // Paranoiac check. for (final ReferenceIdentifier id : ids) { if (!isDeprecated(id)) { final String codespace = id.getCodeSpace(); if (preferredCodespaces == null || preferredCodespaces.contains(codespace)) { - addIdentifier(codespace, id); // No .getCode() here. + addIdentifier(codespace, id); // No .getCode() here. } } } @@ -243,10 +243,10 @@ final class ParameterTableRow { /** * Sets the value domain to the string representation of the given range. * - * @param range The range to format. - * @param format The format to use for formatting the {@code range}. - * @param buffer A temporary buffer to use for formatting the range. - * @return The position of a character on which to align the text in the cell. + * @param range the range to format. + * @param format the format to use for formatting the {@code range}. + * @param buffer a temporary buffer to use for formatting the range. + * @return the position of a character on which to align the text in the cell. */ final int setValueDomain(final Range<?> range, final Format format, final StringBuffer buffer) { final FieldPosition fieldPosition = new FieldPosition(RangeFormat.Field.MAX_VALUE); @@ -258,8 +258,8 @@ final class ParameterTableRow { /** * Adds a value and its unit of measurement. * - * @param value The value, or {@code null}. - * @param unit The unit of measurement, or {@code null}. + * @param value the value, or {@code null}. + * @param unit the unit of measurement, or {@code null}. */ final void addValue(final Object value, final Unit<?> unit) { values.add(value); @@ -325,18 +325,18 @@ final class ParameterTableRow { * <p><b>This method can be invoked only once per {@code ParameterTableRow} instance</b>, * as its implementation destroys the internal list of identifiers.</p> * - * @param out Where to write. - * @param writeCodespaces {@code true} for writing codespaces, or {@code false} for omitting them. - * @param colors Non null if syntax coloring should be applied for table title. - * @param colorsForRows {@code true} if syntax coloring should be applied for table rows. - * @param lineSeparator The system-dependent line separator. - * @throws IOException If an exception occurred while writing. + * @param out where to write. + * @param writeCodespaces {@code true} for writing codespaces, or {@code false} for omitting them. + * @param colors non-null if syntax coloring should be applied for table title. + * @param colorsForRows {@code true} if syntax coloring should be applied for table rows. + * @param lineSeparator the system-dependent line separator. + * @throws IOException if an exception occurred while writing. */ final void writeIdentifiers(final Appendable out, final boolean writeCodespaces, final Colors colors, final boolean colorsForRows, final String lineSeparator) throws IOException { if (codespaceWidth != 0) { - codespaceWidth += 2; // Add a colon and space between codespace and code in e.g. "OGC: Mercator". + codespaceWidth += 2; // Add a colon and space between codespace and code in e.g. "OGC: Mercator". } boolean isNewLine = false; for (final Map.Entry<String,Set<Object>> entry : identifiers.entrySet()) { Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -81,7 +81,7 @@ final class ParameterValueList extends A /** * Constructs an initially empty parameter list. * - * @param descriptor The descriptor for this list. + * @param descriptor the descriptor for this list. */ ParameterValueList(final ParameterDescriptorGroup descriptor) { this.descriptor = descriptor; @@ -179,8 +179,8 @@ final class ParameterValueList extends A * parameter would increase the number past what is allowable by {@code maximumOccurs}, * then an {@link InvalidParameterCardinalityException} will be thrown. * - * @param parameter New parameter to be added to this group. - * @return Always {@code true} since this object changes as a result of this call. + * @param parameter new parameter to be added to this group. + * @return always {@code true} since this object changes as a result of this call. * @throws IllegalArgumentException if the specified parameter is not allowable by the groups descriptor. * @throws InvalidParameterCardinalityException if adding this parameter would result in more parameters * than allowed by {@code maximumOccurs}. @@ -298,8 +298,8 @@ final class ParameterValueList extends A * Removes the value at the specified index, provided that this removal is allowed by the * parameter cardinality. * - * @param index The index of the value to remove. - * @return The value removed at the given index. + * @param index the index of the value to remove. + * @return the value removed at the given index. */ @Override public GeneralParameterValue remove(final int index) { @@ -339,8 +339,8 @@ final class ParameterValueList extends A /** * Trims the array to its capacity before to serialize. * - * @param out The output stream where to serialize this object. - * @throws IOException If an I/O error occurred while writing. + * @param out the output stream where to serialize this object. + * @throws IOException if an I/O error occurred while writing. */ private void writeObject(final ObjectOutputStream out) throws IOException { values = ArraysExt.resize(values, size); Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -34,7 +34,7 @@ public interface Parameterized { /** * Returns the parameter descriptors for this parameterized object, or {@code null} if unknown. * - * @return The parameter descriptors for this object, or {@code null}. + * @return the parameter descriptors for this object, or {@code null}. */ ParameterDescriptorGroup getParameterDescriptors(); @@ -48,7 +48,7 @@ public interface Parameterized { * then (s)he should {@linkplain DefaultParameterValueGroup#clone() clone} the parameters before to * modify them, then use the modified parameters for creating a new {@code Parameterized} object. * - * @return The parameter values for this object, or {@code null} if unknown. + * @return the parameter values for this object, or {@code null} if unknown. */ ParameterValueGroup getParameterValues(); } Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java?rev=1779709&r1=1779708&r2=1779709&view=diff ============================================================================== --- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java [UTF-8] (original) +++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java [UTF-8] Sat Jan 21 09:14:56 2017 @@ -130,8 +130,8 @@ public abstract class Parameters impleme * then it is returned as-is. Otherwise this method copies all parameter values in a new, * unmodifiable, parameter group instance. * - * @param parameters The parameters to make unmodifiable, or {@code null}. - * @return An unmodifiable group with the same parameters than the given group, + * @param parameters the parameters to make unmodifiable, or {@code null}. + * @return an unmodifiable group with the same parameters than the given group, * or {@code null} if the given argument was null. * * @since 0.7 @@ -150,8 +150,8 @@ public abstract class Parameters impleme * <p>This method provides a way to get access to the non-static {@code Parameters} methods, like * {@link #getValue(ParameterDescriptor)}, for an arbitrary {@code ParameterValueGroup} instance.</p> * - * @param parameters The object to cast or wrap, or {@code null}. - * @return The given argument as an instance of {@code Parameters} (may be the same reference), + * @param parameters the object to cast or wrap, or {@code null}. + * @return the given argument as an instance of {@code Parameters} (may be the same reference), * or {@code null} if the given argument was null. */ public static Parameters castOrWrap(final ParameterValueGroup parameters) { @@ -182,10 +182,10 @@ public abstract class Parameters impleme * An exception is thrown immediately if the parameter does not have the expected * {@linkplain DefaultParameterDescriptor#getValueClass() value class}. * - * @param <T> The expected value class. - * @param descriptor The descriptor to cast, or {@code null}. - * @param valueClass The expected value class. - * @return The descriptor casted to the given value class, or {@code null} if the given descriptor was null. + * @param <T> the expected value class. + * @param descriptor the descriptor to cast, or {@code null}. + * @param valueClass the expected value class. + * @return the descriptor casted to the given value class, or {@code null} if the given descriptor was null. * @throws ClassCastException if the given descriptor does not have the expected value class. * * @see Class#cast(Object) @@ -199,8 +199,10 @@ public abstract class Parameters impleme ArgumentChecks.ensureNonNull("valueClass", valueClass); if (descriptor != null) { final Class<?> actual = descriptor.getValueClass(); - // We require a strict equality - not type.isAssignableFrom(actual) - because in - // the later case we could have (to be strict) to return a <? extends T> type. + /* + * We require a strict equality - not type.isAssignableFrom(actual) - because in + * the later case we could have (to be strict) to return a <? extends T> type. + */ if (!valueClass.equals(actual)) { throw new ClassCastException(Resources.format(Resources.Keys.IllegalParameterType_2, Verifier.getDisplayName(descriptor), actual)); @@ -213,10 +215,10 @@ public abstract class Parameters impleme * Casts the given parameter value to the given type. * An exception is thrown immediately if the parameter does not have the expected value class. * - * @param <T> The expected value class. - * @param parameter The parameter to cast, or {@code null}. - * @param valueClass The expected value class. - * @return The value casted to the given type, or {@code null} if the given value was null. + * @param <T> the expected value class. + * @param parameter the parameter to cast, or {@code null}. + * @param valueClass the expected value class. + * @return the value casted to the given type, or {@code null} if the given value was null. * @throws ClassCastException if the given value doesn't have the expected value class. * * @see Class#cast(Object) @@ -249,8 +251,8 @@ public abstract class Parameters impleme * element of the returned array is also {@code null}.</li> * </ul> * - * @param parameters The parameter values from which to get the descriptors, or {@code null}. - * @return The descriptors of the given parameter values, or {@code null} if the {@code parameters} argument was null. + * @param parameters the parameter values from which to get the descriptors, or {@code null}. + * @return the descriptors of the given parameter values, or {@code null} if the {@code parameters} argument was null. * * @since 0.6 */ @@ -286,8 +288,8 @@ public abstract class Parameters impleme * defined by ISO 19111 (namely {@code CC_OperationParameter}) and the one * defined by ISO 19115 (namely {@code SV_Parameter}). * - * @param parameter The parameter from which to get the name (may be {@code null}). - * @return The member name, or {@code null} if none. + * @param parameter the parameter from which to get the name (may be {@code null}). + * @return the member name, or {@code null} if none. * * @see org.apache.sis.util.iso.Names#createMemberName(CharSequence, String, CharSequence, Class) * @@ -309,8 +311,8 @@ public abstract class Parameters impleme * the {@linkplain DefaultParameterDescriptor#getUnit() unit}.</li> * </ul> * - * @param descriptor The parameter descriptor, or {@code null}. - * @return The domain of valid values, or {@code null} if none. + * @param descriptor the parameter descriptor, or {@code null}. + * @return the domain of valid values, or {@code null} if none. * * @see DefaultParameterDescriptor#getValueDomain() */ @@ -347,8 +349,8 @@ public abstract class Parameters impleme * Returns the name or alias of the given parameter for the authority code space expected by this group. * If no name or alias for this group's authority can be found, then the primary name will be returned. * - * @param source The parameter for which the name is wanted. - * @return The name of the given parameter. + * @param source the parameter for which the name is wanted. + * @return the name of the given parameter. */ private String getName(final GeneralParameterDescriptor source) { final ParameterDescriptorGroup descriptor = getDescriptor(); @@ -404,8 +406,8 @@ public abstract class Parameters impleme * This method tries to do the same work than {@link #parameter(String)} but without * instantiating optional parameters if that parameter was not already instantiated. * - * @param parameter The parameter to search. - * @return The requested parameter value, or {@code null} if none. + * @param parameter the parameter to search. + * @return the requested parameter value, or {@code null} if none. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. */ private ParameterValue<?> getParameter(final ParameterDescriptor<?> parameter) throws ParameterNotFoundException { @@ -469,9 +471,9 @@ public abstract class Parameters impleme * operation method}. If the caller has no such {@code ParameterDescriptor} at hand, then the * {@link DefaultParameterValueGroup#parameter(String) parameter(String)} method is probably more convenient. * - * @param <T> The type of the parameter value. - * @param parameter The name or alias of the parameter to look for, together with the desired type and unit of value. - * @return The requested parameter value if it exists, or the {@linkplain DefaultParameterDescriptor#getDefaultValue() + * @param <T> the type of the parameter value. + * @param parameter the name or alias of the parameter to look for, together with the desired type and unit of value. + * @return the requested parameter value if it exists, or the {@linkplain DefaultParameterDescriptor#getDefaultValue() * default value} otherwise (which may be {@code null}). * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @@ -505,9 +507,9 @@ public abstract class Parameters impleme * The default implementation invokes {@link #getValue(ParameterDescriptor)} and verifies that the returned * value is non-null. * - * @param <T> The type of the parameter value. - * @param parameter The name or alias of the parameter to look for, together with the desired type and unit of value. - * @return The requested parameter value if it exists, or the {@linkplain DefaultParameterDescriptor#getDefaultValue() + * @param <T> the type of the parameter value. + * @param parameter the name or alias of the parameter to look for, together with the desired type and unit of value. + * @return the requested parameter value if it exists, or the {@linkplain DefaultParameterDescriptor#getDefaultValue() * default value} otherwise provided that it is not {@code null}. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. @@ -544,8 +546,8 @@ public abstract class Parameters impleme * See {@link #getValue(ParameterDescriptor)} for more information about how this * method uses the given {@code parameter} argument. * - * @param parameter The name or alias of the parameter to look for. - * @return The requested parameter value if it exists, or the <strong>non-null</strong> + * @param parameter the name or alias of the parameter to look for. + * @return the requested parameter value if it exists, or the <strong>non-null</strong> * {@linkplain DefaultParameterDescriptor#getDefaultValue() default value} otherwise. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. @@ -564,8 +566,8 @@ public abstract class Parameters impleme * See {@link #getValue(ParameterDescriptor)} for more information about how this * method uses the given {@code parameter} argument. * - * @param parameter The name or alias of the parameter to look for. - * @return The requested parameter value if it exists, or the <strong>non-null</strong> + * @param parameter the name or alias of the parameter to look for. + * @return the requested parameter value if it exists, or the <strong>non-null</strong> * {@linkplain DefaultParameterDescriptor#getDefaultValue() default value} otherwise. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. @@ -584,8 +586,8 @@ public abstract class Parameters impleme * See {@link #getValue(ParameterDescriptor)} for more information about how this * method uses the given {@code parameter} argument. * - * @param parameter The name or alias of the parameter to look for. - * @return The requested parameter values if they exist, or the <strong>non-null</strong> + * @param parameter the name or alias of the parameter to look for. + * @return the requested parameter values if they exist, or the <strong>non-null</strong> * {@linkplain DefaultParameterDescriptor#getDefaultValue() default value} otherwise. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. @@ -607,8 +609,8 @@ public abstract class Parameters impleme * <p>If the given descriptor supplies a {@linkplain DefaultParameterDescriptor#getUnit() * unit of measurement}, then the returned value will be converted into that unit.</p> * - * @param parameter The name or alias of the parameter to look for. - * @return The requested parameter value if it exists, or the <strong>non-null</strong> + * @param parameter the name or alias of the parameter to look for. + * @return the requested parameter value if it exists, or the <strong>non-null</strong> * {@linkplain DefaultParameterDescriptor#getDefaultValue() default value} otherwise. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. @@ -635,8 +637,8 @@ public abstract class Parameters impleme * <p>If the given descriptor supplies a {@linkplain DefaultParameterDescriptor#getUnit() * unit of measurement}, then the returned values will be converted into that unit.</p> * - * @param parameter The name or alias of the parameter to look for. - * @return The requested parameter values if they exists, or the <strong>non-null</strong> + * @param parameter the name or alias of the parameter to look for. + * @return the requested parameter values if they exists, or the <strong>non-null</strong> * {@linkplain DefaultParameterDescriptor#getDefaultValue() default value} otherwise. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. @@ -660,8 +662,8 @@ public abstract class Parameters impleme * See {@link #getValue(ParameterDescriptor)} for more information about how this * method uses the given {@code parameter} argument. * - * @param parameter The name or alias of the parameter to look for. - * @return The requested parameter value if it exists, or the <strong>non-null</strong> + * @param parameter the name or alias of the parameter to look for. + * @return the requested parameter value if it exists, or the <strong>non-null</strong> * {@linkplain DefaultParameterDescriptor#getDefaultValue() default value} otherwise. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * @throws IllegalStateException if the value is not defined and there is no default value. @@ -689,9 +691,9 @@ public abstract class Parameters impleme * or {@linkplain DefaultParameterDescriptor#getAlias() alias} chosen by the same algorithm than * {@link #getValue(ParameterDescriptor)}. * - * @param <T> The type of the parameter value. - * @param parameter The parameter to look for. - * @return The requested parameter instance. + * @param <T> the type of the parameter value. + * @param parameter the parameter to look for. + * @return the requested parameter instance. * @throws ParameterNotFoundException if the given {@code parameter} name or alias is not legal for this group. * * @see DefaultParameterValueGroup#parameter(String) @@ -707,7 +709,7 @@ public abstract class Parameters impleme * The default implementation performs a <em>shallow</em> copy, * but subclasses are encouraged to perform a <em>deep</em> copy. * - * @return A copy of this group of parameter values. + * @return a copy of this group of parameter values. * * @see #copy(ParameterValueGroup, ParameterValueGroup) */ @@ -716,7 +718,7 @@ public abstract class Parameters impleme try { return (Parameters) super.clone(); } catch (CloneNotSupportedException e) { - throw new AssertionError(e); // Should never happen since we are Cloneable + throw new AssertionError(e); // Should never happen since we are Cloneable. } } @@ -730,8 +732,8 @@ public abstract class Parameters impleme * to some specific implementation, or to a parameter group using a different but compatible * {@linkplain DefaultParameterValueGroup#getDescriptor() descriptor}.</p> * - * @param values The parameters values to copy. - * @param destination Where to copy the values. + * @param values the parameters values to copy. + * @param destination where to copy the values. * @throws InvalidParameterNameException if a {@code source} parameter name is unknown to the {@code destination}. * @throws InvalidParameterValueException if the value of a {@code source} parameter is invalid for the {@code destination}. * @@ -796,10 +798,10 @@ public abstract class Parameters impleme * (this is a SIS-specific flexibility). Current implementation is not very efficient, but it should * not be an issue if this method is rarely invoked. * - * @param values The group from which to get or create a value - * @param name The name of the parameter to fetch. An exact match will be required. - * @param n Number of occurrences to skip before to return or create the parameter. - * @return The <var>n</var>th occurrence (zero-based) of the parameter of the given name. + * @param values the group from which to get or create a value + * @param name the name of the parameter to fetch. An exact match will be required. + * @param n number of occurrences to skip before to return or create the parameter. + * @return the <var>n</var>th occurrence (zero-based) of the parameter of the given name. * @throws IndexOutOfBoundsException if {@code n} is greater than the current number of * parameters of the given name. */ @@ -816,8 +818,10 @@ public abstract class Parameters impleme values.values().add(value); return value; } else { - // We do not botter formatting a good error message for now, because - // this method is currently invoked only with increasing index values. + /* + * We do not botter formatting a good error message for now, because + * this method is currently invoked only with increasing index values. + */ throw new IndexOutOfBoundsException(name); } }
