Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java [UTF-8] Sat Jan 21 08:49:49 2017
@@ -130,7 +130,7 @@ public final class TransverseMercator ex
/**
* {@inheritDoc}
*
- * @return The map projection created from the given parameter values.
+ * @return the map projection created from the given parameter values.
*/
@Override
protected NormalizedProjection createProjection(final Parameters parameters) {
@@ -150,11 +150,11 @@ public final class TransverseMercator ex
* <tr><td>False northing</td> <td>0 (North hemisphere) or 10000000 (South hemisphere) metres</td></tr>
* </table></blockquote>
*
- * @param group The parameters for which to set the values.
+ * @param group the parameters for which to set the values.
* @param isUTM {@code true} for Universal Transverse Mercator (UTM) projection.
- * @param latitude The latitude in the center of the desired projection.
- * @param longitude The longitude in the center of the desired projection.
- * @return A name like <cite>"Transverse Mercator"</cite> or <cite>"UTM zone 10N"</cite>,
+ * @param latitude the latitude in the center of the desired projection.
+ * @param longitude the longitude in the center of the desired projection.
+ * @return a name like <cite>"Transverse Mercator"</cite> or <cite>"UTM zone 10N"</cite>,
* depending on the arguments given to this method.
*
* @since 0.7
@@ -185,9 +185,9 @@ public final class TransverseMercator ex
/**
* Computes the UTM zone from a meridian in the zone.
*
- * @param longitude A meridian inside the desired zone, in degrees relative to Greenwich.
- * Positive longitudes are toward east, and negative longitudes toward west.
- * @return The UTM zone number numbered from 1 to 60 inclusive, or 0 if the given central meridian was NaN.
+ * @param longitude a meridian inside the desired zone, in degrees relative to Greenwich.
+ * Positive longitudes are toward east, and negative longitudes toward west.
+ * @return the UTM zone number numbered from 1 to 60 inclusive, or 0 if the given central meridian was NaN.
*
* @since 0.7
*/
@@ -205,8 +205,8 @@ public final class TransverseMercator ex
/**
* Computes the central meridian of a given UTM zone.
*
- * @param zone The UTM zone as a number in the [1 … 60] range.
- * @return The central meridian of the given UTM zone.
+ * @param zone the UTM zone as a number in the [1 … 60] range.
+ * @return the central meridian of the given UTM zone.
*
* @since 0.7
*/
Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java [UTF-8] Sat Jan 21 08:49:49 2017
@@ -85,7 +85,7 @@ public final class TransverseMercatorSou
/**
* {@inheritDoc}
*
- * @return The map projection created from the given parameter values.
+ * @return the map projection created from the given parameter values.
*/
@Override
protected NormalizedProjection createProjection(final Parameters parameters) {
Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/VerticalOffset.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java [UTF-8] Sat Jan 21 08:49:49 2017
@@ -17,6 +17,7 @@
package org.apache.sis.parameter;
import java.util.Map;
+import java.util.Objects;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
@@ -36,9 +37,6 @@ import org.apache.sis.util.Debug;
import static org.apache.sis.util.Utilities.deepEquals;
import static org.apache.sis.internal.jaxb.referencing.CC_GeneralOperationParameter.DEFAULT_OCCURRENCE;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* Abstract definition of a parameter or group of parameters used by a coordinate operation or a process.
@@ -168,11 +166,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)
@@ -197,7 +195,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);
@@ -221,7 +219,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() {
@@ -232,7 +230,7 @@ public abstract class AbstractParameterD
* Returns an indication if the parameter is an input to the service, an output or both.
* The default implementation returns {@link ParameterDirection#IN}.
*
- * @return Indication if the parameter is an input or output to the service, or {@code null} if unspecified.
+ * @return indication if the parameter is an input or output to the service, or {@code null} if unspecified.
*/
@Override
public ParameterDirection getDirection() {
@@ -243,7 +241,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() {
@@ -254,7 +252,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() {
@@ -326,7 +324,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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] Sat Jan 21 08:49:49 2017
@@ -149,14 +149,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)
@@ -176,8 +176,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
*/
@@ -207,7 +207,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++) {
@@ -231,7 +231,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)
*/
@@ -281,7 +281,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);
}
@@ -293,8 +293,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) {
@@ -322,7 +322,7 @@ public class DefaultParameterDescriptorG
* Returns an indication if all parameters in this group are inputs to the service, outputs or both.
* If this group contains parameters with different direction, then this method returns {@code null}.
*
- * @return Indication if all parameters are inputs or outputs to the service, or {@code null} if undetermined.
+ * @return indication if all parameters are inputs or outputs to the service, or {@code null} if undetermined.
*/
@Override
public ParameterDirection getDirection() {
@@ -346,7 +346,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")
@@ -358,8 +358,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
@@ -399,7 +399,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() {
@@ -413,8 +413,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) {
@@ -498,9 +498,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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] Sat Jan 21 08:49:49 2017
@@ -242,7 +242,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()
*/
@@ -267,8 +267,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);
@@ -295,8 +295,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) {
@@ -307,7 +307,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;
@@ -316,7 +316,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);
@@ -330,10 +330,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;
}
/**
@@ -342,7 +343,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) {
@@ -357,14 +358,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;
@@ -373,7 +375,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;
@@ -398,7 +400,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 {
@@ -439,10 +441,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
@@ -464,7 +466,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;
@@ -768,8 +770,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) {
@@ -800,8 +802,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 {
@@ -819,29 +821,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<Identifier> identifiers = object.getIdentifiers();
- if (identifiers != null) { // Paranoiac check.
+ if (identifiers != null) { // Paranoiac check.
Identifier identifier = null;
for (final Identifier 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.
}
}
}
@@ -933,10 +935,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,
@@ -996,7 +998,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);
}
@@ -1004,12 +1006,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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java [UTF-8] Sat Jan 21 08:49:49 2017
@@ -119,21 +119,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<>();
Identifier 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;
}
}
@@ -143,7 +143,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);
@@ -166,19 +166,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 Identifier> ids = object.getIdentifiers();
- if (ids != null) { // Paranoiac check.
+ if (ids != null) { // Paranoiac check.
for (final Identifier 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.
}
}
}
@@ -239,10 +239,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);
@@ -254,8 +254,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);
@@ -321,18 +321,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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java [UTF-8] Sat Jan 21 08:49:49 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/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java?rev=1779702&r1=1779701&r2=1779702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java [UTF-8] Sat Jan 21 08:49:49 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();
}
|