sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1763106 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/metadata/ sis-referencing/src/main/java/org/apache/sis/internal/referencing/ sis-utility/src/main/java/org/apache/sis/measure/
Date Sun, 02 Oct 2016 22:52:07 GMT
Author: desruisseaux
Date: Sun Oct  2 22:52:07 2016
New Revision: 1763106

URL: http://svn.apache.org/viewvc?rev=1763106&view=rev
Log:
Javadoc formatting. No significant code change in this commit except a check for empty ranges in Range.union(Range) and Range.intersect(Range).

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/DomainRange.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGParameterDomain.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/DomainRange.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/DomainRange.java?rev=1763106&r1=1763105&r2=1763106&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/DomainRange.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/DomainRange.java [UTF-8] Sun Oct  2 22:52:07 2016
@@ -58,11 +58,10 @@ final class DomainRange<E extends Number
      * the given type is not wide enough, then the values are truncated in the same way
      * than the Java language casts primitive types.
      *
-     * @param  type  The element type, restricted to one of {@link Byte}, {@link Short},
-     *               {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @param  range The range of values.
-     * @throws IllegalArgumentException If the given type is not one of the primitive
-     *         wrappers for numeric types.
+     * @param  type   the element type, restricted to one of {@link Byte}, {@link Short},
+     *                {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @param  range  the range of values.
+     * @throws IllegalArgumentException if the given type is not one of the primitive wrappers for numeric types.
      */
     DomainRange(final Class<E> type, final ValueRange range) throws IllegalArgumentException {
         super(type, range);

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGParameterDomain.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGParameterDomain.java?rev=1763106&r1=1763105&r2=1763106&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGParameterDomain.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGParameterDomain.java [UTF-8] Sun Oct  2 22:52:07 2016
@@ -46,7 +46,7 @@ public final class EPSGParameterDomain e
     /**
      * Creates a new parameter descriptor for the given units.
      *
-     * @param units The units.
+     * @param  units  the units.
      */
     public EPSGParameterDomain(final Set<Unit<?>> units) {
         super(Double.class, null, false, null, false);

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties?rev=1763106&r1=1763105&r2=1763106&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties [ISO-8859-1] Sun Oct  2 22:52:07 2016
@@ -88,7 +88,7 @@ NonUniformScale                   = L\u2
 NotAnAffineTransform              = La transformation n\u2019est pas affine.
 NotASkewSymmetricMatrix           = La matrice n\u2019est pas antisym\u00e9trique.
 NoSuchAuthorityCode_3             = Aucun objet de type \u2018{1}\u2019 n\u2019a \u00e9t\u00e9 trouv\u00e9 pour le code \u00ab\u202f{2}\u202f\u00bb dans la base de donn\u00e9es g\u00e9od\u00e9siques \u00ab\u202f{0}\u202f\u00bb.
-NoSuchAuthorityCodeInSubset_4     = Aucun objet de type \u2018{1}\u2019 n\u2019a \u00e9t\u00e9 trouv\u00e9 pour le code \u00ab\u202f{2}\u202f\u00bb. Toutefois seul un sous-ensemble de la base de donn\u00e9es g\u00e9od\u00e9siques {0} a \u00e9t\u00e9 interrog\u00e9. Voir {3} pour des instructions d'installation de la base de donn\u00e9es {0} compl\u00e8te.
+NoSuchAuthorityCodeInSubset_4     = Aucun objet de type \u2018{1}\u2019 n\u2019a \u00e9t\u00e9 trouv\u00e9 pour le code \u00ab\u202f{2}\u202f\u00bb. Toutefois seul un sous-ensemble de la base de donn\u00e9es g\u00e9od\u00e9siques {0} a \u00e9t\u00e9 interrog\u00e9. Voir {3} pour des instructions d\u2019installation de la base de donn\u00e9es {0} compl\u00e8te.
 NoSuchOperationMethod_1           = Aucune m\u00e9thode n\u2019a \u00e9t\u00e9 trouv\u00e9e pour le nom ou l\u2019identifiant \u00ab\u202f{0}\u202f\u00bb.
 ParameterNotFound_2               = Aucun param\u00e8tre nomm\u00e9 \u00ab\u202f{1}\u202f\u00bb n\u2019a \u00e9t\u00e9 trouv\u00e9 dans \u00ab\u202f{0}\u202f\u00bb.
 RecursiveCreateCallForCode_2      = Appels r\u00e9cursifs lors de la cr\u00e9ation d\u2019un objet de type \u2018{0}\u2019 pour le code \u00ab\u202f{1}\u202f\u00bb.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java?rev=1763106&r1=1763105&r2=1763106&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java [UTF-8] Sun Oct  2 22:52:07 2016
@@ -74,12 +74,12 @@ public class MeasurementRange<E extends
      * Constructs a range of {@code float} values.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value, or {@link Float#NEGATIVE_INFINITY} if none.
+     * @param  minValue       the minimal value, or {@link Float#NEGATIVE_INFINITY} if none.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value, or {@link Float#POSITIVE_INFINITY} if none.
+     * @param  maxValue       the maximal value, or {@link Float#POSITIVE_INFINITY} if none.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @param  unit           The unit of measurement, or {@code null} if unknown.
-     * @return The new range of numeric values for the given endpoints and unit of measurement.
+     * @param  unit           the unit of measurement, or {@code null} if unknown.
+     * @return the new range of numeric values for the given endpoints and unit of measurement.
      */
     public static MeasurementRange<Float> create(float minValue, boolean isMinIncluded,
                                                  float maxValue, boolean isMaxIncluded, Unit<?> unit)
@@ -93,12 +93,12 @@ public class MeasurementRange<E extends
      * Constructs a range of {@code double} values.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value, or {@link Double#NEGATIVE_INFINITY} if none.
+     * @param  minValue       the minimal value, or {@link Double#NEGATIVE_INFINITY} if none.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value, or {@link Double#POSITIVE_INFINITY} if none.
+     * @param  maxValue       the maximal value, or {@link Double#POSITIVE_INFINITY} if none.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @param  unit           The unit of measurement, or {@code null} if unknown.
-     * @return The new range of numeric values for the given endpoints and unit of measurement.
+     * @param  unit           the unit of measurement, or {@code null} if unknown.
+     * @return the new range of numeric values for the given endpoints and unit of measurement.
      */
     public static MeasurementRange<Double> create(double minValue, boolean isMinIncluded,
                                                   double maxValue, boolean isMaxIncluded, Unit<?> unit)
@@ -113,9 +113,9 @@ public class MeasurementRange<E extends
      * The {@code minValue} is often zero for creating a range of strictly positive values.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue The minimal value (exclusive), or {@link Double#NEGATIVE_INFINITY} if none.
-     * @param  unit The unit of measurement, or {@code null} if unknown.
-     * @return The new range of numeric values greater than the given value.
+     * @param  minValue  the minimal value (exclusive), or {@link Double#NEGATIVE_INFINITY} if none.
+     * @param  unit      the unit of measurement, or {@code null} if unknown.
+     * @return the new range of numeric values greater than the given value.
      *
      * @since 0.6
      */
@@ -131,12 +131,12 @@ public class MeasurementRange<E extends
      *
      * <p>This method may return a shared instance, at implementation choice.</p>
      *
-     * @param  minValue       The minimal value, or {@code null} if none.
+     * @param  minValue       the minimal value, or {@code null} if none.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value, or {@code null} if none.
+     * @param  maxValue       the maximal value, or {@code null} if none.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @param  unit           The unit of measurement, or {@code null} if unknown.
-     * @return The new range, or {@code null} if both {@code minValue} and {@code maxValue} are {@code null}.
+     * @param  unit           the unit of measurement, or {@code null} if unknown.
+     * @return the new range, or {@code null} if both {@code minValue} and {@code maxValue} are {@code null}.
      *
      * @see NumberRange#createBestFit(Number, boolean, Number, boolean)
      */
@@ -158,8 +158,8 @@ public class MeasurementRange<E extends
      * Constructs a range with the same values than the specified range and the given unit.
      * This is a copy constructor, with the addition of a unit of measurement.
      *
-     * @param range The range to copy. The elements must be {@link Number} instances.
-     * @param unit  The unit of measurement, or {@code null} if unknown.
+     * @param  range  the range to copy. The elements must be {@link Number} instances.
+     * @param  unit   the unit of measurement, or {@code null} if unknown.
      */
     public MeasurementRange(final Range<E> range, final Unit<?> unit) {
         super(range);
@@ -173,12 +173,11 @@ public class MeasurementRange<E extends
      * the given type is not wide enough, then the values are truncated in the same way
      * than the Java language casts primitive types.
      *
-     * @param  type  The element type, restricted to one of {@link Byte}, {@link Short},
-     *               {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @param  range The range of values.
-     * @param  unit  The unit of measurement, or {@code null} if unknown.
-     * @throws IllegalArgumentException If the given type is not one of the primitive
-     *         wrappers for numeric types.
+     * @param  type   the element type, restricted to one of {@link Byte}, {@link Short},
+     *                {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @param  range  the range of values.
+     * @param  unit   the unit of measurement, or {@code null} if unknown.
+     * @throws IllegalArgumentException if the given type is not one of the primitive wrappers for numeric types.
      */
     public MeasurementRange(final Class<E> type, final ValueRange range, final Unit<?> unit) throws IllegalArgumentException {
         super(type, range);
@@ -188,12 +187,12 @@ public class MeasurementRange<E extends
     /**
      * Constructs a range of {@link Number} objects.
      *
-     * @param type          The element type, usually one of {@link Float} or {@link Double}.
-     * @param minValue      The minimal value, or {@code null} if none.
-     * @param isMinIncluded {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param maxValue      The maximal value, or {@code null} if none.
-     * @param isMaxIncluded {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @param unit          The unit of measurement, or {@code null} if unknown.
+     * @param type           the element type, usually one of {@link Float} or {@link Double}.
+     * @param minValue       the minimal value, or {@code null} if none.
+     * @param isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
+     * @param maxValue       the maximal value, or {@code null} if none.
+     * @param isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
+     * @param unit           the unit of measurement, or {@code null} if unknown.
      */
     public MeasurementRange(final Class<E> type,
                             final E minValue, final boolean isMinIncluded,
@@ -205,13 +204,12 @@ public class MeasurementRange<E extends
     }
 
     /**
-     * Constructs a range with the same values than the specified range,
-     * casted to the specified type.
+     * Constructs a range with the same values than the specified range, casted to the specified type.
      *
-     * @param type  The element type, usually one of {@link Byte}, {@link Short},
-     *              {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @param range The range to copy. The elements must be {@link Number} instances.
-     * @param unit  The unit of measurement, or {@code null} if unknown.
+     * @param  type   the element type, usually one of {@link Byte}, {@link Short},
+     *                {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @param  range  the range to copy. The elements must be {@link Number} instances.
+     * @param  unit   the unit of measurement, or {@code null} if unknown.
      */
     private MeasurementRange(final Class<E> type, final Range<? extends Number> range, final Unit<?> unit) {
         super(type, range);
@@ -231,7 +229,7 @@ public class MeasurementRange<E extends
     /**
      * Returns the unit of measurement, or {@code null} if unknown.
      *
-     * @return The unit of measurement, or {@code null}.
+     * @return the unit of measurement, or {@code null}.
      */
     @Override
     public Unit<?> unit() {
@@ -243,10 +241,9 @@ public class MeasurementRange<E extends
      * then the specified target unit are simply assigned to the returned range with no
      * other changes.
      *
-     * @param  targetUnit the target unit, or {@code null} for keeping the unit unchanged.
-     * @return The converted range, or {@code this} if no conversion is needed.
-     * @throws ConversionException if the target unit are not compatible with
-     *         this {@linkplain #unit() range unit}.
+     * @param  targetUnit  the target unit, or {@code null} for keeping the unit unchanged.
+     * @return the converted range, or {@code this} if no conversion is needed.
+     * @throws ConversionException if the target unit are not compatible with this {@linkplain #unit() range unit}.
      */
     public MeasurementRange<E> convertTo(final Unit<?> targetUnit) throws ConversionException {
         return convertAndCast(elementType, targetUnit);
@@ -271,10 +268,9 @@ public class MeasurementRange<E extends
      * If the given range is an instance of {@code MeasurementRange}, converts that
      * range to the unit of this range. Otherwise returns the given range unchanged.
      *
-     * @param  range The range to convert.
-     * @return The converted range.
-     * @throws IllegalArgumentException if the given target unit is not compatible with
-     *         the unit of this range.
+     * @param  range  the range to convert.
+     * @return the converted range.
+     * @throws IllegalArgumentException if the given target unit is not compatible with the unit of this range.
      */
     private <N extends E> Range<N> convert(final Range<N> range) throws IllegalArgumentException {
         if (range instanceof MeasurementRange<?>) try {
@@ -291,9 +287,9 @@ public class MeasurementRange<E extends
      * measurement, then this method convert the {@code range} unit to the same unit than this
      * instance.
      *
-     * @param type The class to cast to. Must be one of {@link Byte}, {@link Short},
-     *             {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @return The casted range, or {@code range} if no cast is needed.
+     * @param  type  the class to cast to. Must be one of {@link Byte}, {@link Short},
+     *               {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @return the casted range, or {@code range} if no cast is needed.
      */
     @Override
     <N extends Number & Comparable<? super N>>
@@ -314,12 +310,11 @@ public class MeasurementRange<E extends
      * This method is invoked on the {@code other} instance in expressions like
      * {@code this.operation(other)}.
      *
-     * @param  type The class to cast to. Must be one of {@link Byte}, {@link Short},
-     *             {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @param  type  the class to cast to. Must be one of {@link Byte}, {@link Short},
+     *               {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
      * @param  targetUnit the target unit, or {@code null} for no change.
-     * @return The casted range, or {@code this}.
-     * @throws ConversionException if the given target unit is not compatible with
-     *         the unit of this range.
+     * @return the casted range, or {@code this}.
+     * @throws ConversionException if the given target unit is not compatible with the unit of this range.
      */
     @SuppressWarnings("unchecked")
     private <N extends Number & Comparable<? super N>> MeasurementRange<N>
@@ -369,7 +364,7 @@ public class MeasurementRange<E extends
      * the operation.
      *
      * @return {@inheritDoc}
-     * @throws IllegalArgumentException is the given range is an instance of
+     * @throws IllegalArgumentException if the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
     @Override
@@ -384,7 +379,7 @@ public class MeasurementRange<E extends
      * the operation.
      *
      * @return {@inheritDoc}
-     * @throws IllegalArgumentException is the given range is an instance of
+     * @throws IllegalArgumentException if the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
     @Override
@@ -399,7 +394,7 @@ public class MeasurementRange<E extends
      * the operation.
      *
      * @return {@inheritDoc}
-     * @throws IllegalArgumentException is the given range is an instance of
+     * @throws IllegalArgumentException if the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
     @Override
@@ -414,7 +409,7 @@ public class MeasurementRange<E extends
      * the operation.
      *
      * @return {@inheritDoc}
-     * @throws IllegalArgumentException is the given range is an instance of
+     * @throws IllegalArgumentException if the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
     @Override
@@ -429,7 +424,7 @@ public class MeasurementRange<E extends
      * the operation.
      *
      * @return {@inheritDoc}
-     * @throws IllegalArgumentException is the given range is an instance of
+     * @throws IllegalArgumentException if the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
     @Override

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java?rev=1763106&r1=1763105&r2=1763106&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java [UTF-8] Sun Oct  2 22:52:07 2016
@@ -120,11 +120,11 @@ public class NumberRange<E extends Numbe
      * Constructs a range of {@code byte} values.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value.
+     * @param  minValue       the minimal value.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value.
+     * @param  maxValue       the maximal value.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @return The new range of numeric values for the given endpoints.
+     * @return the new range of numeric values for the given endpoints.
      */
     public static NumberRange<Byte> create(final byte minValue, final boolean isMinIncluded,
                                            final byte maxValue, final boolean isMaxIncluded)
@@ -138,11 +138,11 @@ public class NumberRange<E extends Numbe
      * Constructs a range of {@code short} values.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value.
+     * @param  minValue       the minimal value.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value.
+     * @param  maxValue       the maximal value.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @return The new range of numeric values for the given endpoints.
+     * @return the new range of numeric values for the given endpoints.
      */
     public static NumberRange<Short> create(final short minValue, final boolean isMinIncluded,
                                             final short maxValue, final boolean isMaxIncluded)
@@ -156,11 +156,11 @@ public class NumberRange<E extends Numbe
      * Constructs a range of {@code int} values.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value.
+     * @param  minValue       the minimal value.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value.
+     * @param  maxValue       the maximal value.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @return The new range of numeric values for the given endpoints.
+     * @return the new range of numeric values for the given endpoints.
      *
      * @see #createLeftBounded(int, boolean)
      */
@@ -176,11 +176,11 @@ public class NumberRange<E extends Numbe
      * Constructs a range of {@code long} values.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value.
+     * @param  minValue       the minimal value.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value.
+     * @param  maxValue       the maximal value.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @return The new range of numeric values for the given endpoints.
+     * @return the new range of numeric values for the given endpoints.
      */
     public static NumberRange<Long> create(final long minValue, final boolean isMinIncluded,
                                            final long maxValue, final boolean isMaxIncluded)
@@ -195,11 +195,11 @@ public class NumberRange<E extends Numbe
      * The values can not be {@link Float#NaN}.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value, or {@link Float#NEGATIVE_INFINITY} if none.
+     * @param  minValue       the minimal value, or {@link Float#NEGATIVE_INFINITY} if none.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value, or {@link Float#POSITIVE_INFINITY} if none.
+     * @param  maxValue       the maximal value, or {@link Float#POSITIVE_INFINITY} if none.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @return The new range of numeric values for the given endpoints.
+     * @return the new range of numeric values for the given endpoints.
      */
     public static NumberRange<Float> create(final float minValue, final boolean isMinIncluded,
                                             final float maxValue, final boolean isMaxIncluded)
@@ -225,11 +225,11 @@ public class NumberRange<E extends Numbe
      * The values can not be {@link Double#NaN}.
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value, or {@link Double#NEGATIVE_INFINITY} if none.
+     * @param  minValue       the minimal value, or {@link Double#NEGATIVE_INFINITY} if none.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value, or {@link Double#POSITIVE_INFINITY} if none.
+     * @param  maxValue       the maximal value, or {@link Double#POSITIVE_INFINITY} if none.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @return The new range of numeric values for the given endpoints.
+     * @return the new range of numeric values for the given endpoints.
      */
     public static NumberRange<Double> create(final double minValue, final boolean isMinIncluded,
                                              final double maxValue, final boolean isMaxIncluded)
@@ -259,9 +259,9 @@ public class NumberRange<E extends Numbe
      * We do not provide variants for other integer types because this method is typically invoked for
      * defining the {@linkplain org.apache.sis.feature.DefaultFeatureType cardinality of an attribute}.</div>
      *
-     * @param  minValue       The minimal value.
+     * @param  minValue       the minimal value.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @return The new range of numeric values from {@code minValue} to positive infinity.
+     * @return the new range of numeric values from {@code minValue} to positive infinity.
      *
      * @see #create(int, boolean, int, boolean)
      *
@@ -272,10 +272,10 @@ public class NumberRange<E extends Numbe
     }
 
     /**
-     * Constructs a range using the smallest type of {@link Number} that can hold the
-     * given values. The given numbers don't need to be of the same type since they will
-     * be {@linkplain Numbers#cast(Number, Class) casted} as needed. More specifically
-     * this method returns:
+     * Constructs a range using the smallest type of {@link Number} that can hold the given values.
+     * The given numbers don't need to be of the same type since they will
+     * be {@linkplain Numbers#cast(Number, Class) casted} as needed.
+     * More specifically this method returns:
      *
      * <ul>
      *   <li>{@code NumberRange<Byte>} if the given values are integers between
@@ -291,11 +291,11 @@ public class NumberRange<E extends Numbe
      *
      * This method may return a shared instance, at implementation choice.
      *
-     * @param  minValue       The minimal value, or {@code null} if none.
+     * @param  minValue       the minimal value, or {@code null} if none.
      * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param  maxValue       The maximal value, or {@code null} if none.
+     * @param  maxValue       the maximal value, or {@code null} if none.
      * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
-     * @return The new range, or {@code null} if both {@code minValue} and {@code maxValue} are {@code null}.
+     * @return the new range, or {@code null} if both {@code minValue} and {@code maxValue} are {@code null}.
      */
     @SuppressWarnings({"rawtypes","unchecked"})
     public static NumberRange<?> createBestFit(final Number minValue, final boolean isMinIncluded,
@@ -309,14 +309,13 @@ public class NumberRange<E extends Numbe
     }
 
     /**
-     * Returns the specified {@link Range} as a {@code NumberRange} object. If the specified
-     * range is already an instance of {@code NumberRange}, then it is returned unchanged.
-     * Otherwise a new number range is created using the {@linkplain #NumberRange(Range)
-     * copy constructor}.
-     *
-     * @param  <N> The type of elements in the given range.
-     * @param  range The range to cast or copy.
-     * @return The same range than {@code range} as a {@code NumberRange} object.
+     * Returns the specified {@link Range} as a {@code NumberRange} object.
+     * If the specified range is already an instance of {@code NumberRange}, then it is returned unchanged.
+     * Otherwise a new number range is created using the {@linkplain #NumberRange(Range) copy constructor}.
+     *
+     * @param  <N>    the type of elements in the given range.
+     * @param  range  the range to cast or copy.
+     * @return the same range than {@code range} as a {@code NumberRange} object.
      */
     public static <N extends Number & Comparable<? super N>> NumberRange<N> castOrCopy(final Range<N> range) {
         if (range instanceof NumberRange<?>) {
@@ -331,7 +330,7 @@ public class NumberRange<E extends Numbe
      * Constructs a range with the same type and the same values than the specified range.
      * This is a copy constructor.
      *
-     * @param range The range to copy. The elements must be {@link Number} instances.
+     * @param range the range to copy. The elements must be {@link Number} instances.
      */
     public NumberRange(final Range<E> range) {
         super(range);
@@ -344,11 +343,10 @@ public class NumberRange<E extends Numbe
      * the given type is not wide enough, then the values are truncated in the same way
      * than the Java language casts primitive types.
      *
-     * @param  type  The element type, restricted to one of {@link Byte}, {@link Short},
-     *               {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @param  range The range of values.
-     * @throws IllegalArgumentException If the given type is not one of the primitive
-     *         wrappers for numeric types.
+     * @param  type   the element type, restricted to one of {@link Byte}, {@link Short},
+     *                {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @param  range  the range of values.
+     * @throws IllegalArgumentException if the given type is not one of the primitive wrappers for numeric types.
      */
     public NumberRange(final Class<E> type, final ValueRange range) throws IllegalArgumentException {
         super(type, Numbers.cast(valueOf("minimum", range.minimum(), Double.NEGATIVE_INFINITY), type), range.isMinIncluded(),
@@ -358,12 +356,12 @@ public class NumberRange<E extends Numbe
     /**
      * Constructs a range of {@link Number} objects.
      *
-     * @param type           The element type, usually one of {@link Byte}, {@link Short},
-     *                       {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @param minValue       The minimal value, or {@code null} if none.
-     * @param isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param maxValue       The maximal value, or {@code null} if none.
-     * @param isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
+     * @param  type           the element type, usually one of {@link Byte}, {@link Short},
+     *                        {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @param  minValue       the minimal value, or {@code null} if none.
+     * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
+     * @param  maxValue       the maximal value, or {@code null} if none.
+     * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
      */
     public NumberRange(final Class<E> type,
                        final E minValue, final boolean isMinIncluded,
@@ -373,14 +371,12 @@ public class NumberRange<E extends Numbe
     }
 
     /**
-     * Constructs a range with the same values than the specified range,
-     * casted to the specified type.
+     * Constructs a range with the same values than the specified range, casted to the specified type.
      *
-     * @param  type  The element type, usually one of {@link Byte}, {@link Short},
-     *               {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @param  range The range to copy. The elements must be {@link Number} instances.
-     * @throws IllegalArgumentException If the given type is not one of the primitive
-     *         wrappers for numeric types.
+     * @param  type   the element type, usually one of {@link Byte}, {@link Short},
+     *                {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @param  range  the range to copy. The elements must be {@link Number} instances.
+     * @throws IllegalArgumentException if the given type is not one of the primitive wrappers for numeric types.
      */
     NumberRange(final Class<E> type, final Range<? extends Number> range)
             throws IllegalArgumentException
@@ -401,16 +397,14 @@ public class NumberRange<E extends Numbe
     }
 
     /**
-     * Casts the specified range to the specified type.  If this class is associated to a unit of
-     * measurement, then this method converts the {@code range} unit to the same unit than this
-     * instance. This method is overridden by {@link MeasurementRange} only in the way described
-     * above.
-     *
-     * @param  type The class to cast to. Must be one of {@link Byte}, {@link Short},
-     *              {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @return The casted range, or {@code range} if no cast is needed.
-     * @throws IllegalArgumentException If the given type is not one of the primitive
-     *         wrappers for numeric types.
+     * Casts the specified range to the specified type.  If this class is associated to a unit of measurement,
+     * then this method converts the {@code range} unit to the same unit than this instance.
+     * This method is overridden by {@link MeasurementRange} only in the way described above.
+     *
+     * @param  type  the class to cast to. Must be one of {@link Byte}, {@link Short},
+     *               {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
+     * @return the casted range, or {@code range} if no cast is needed.
+     * @throws IllegalArgumentException if the given type is not one of the primitive wrappers for numeric types.
      */
     @SuppressWarnings("unchecked")
     <N extends Number & Comparable<? super N>>
@@ -428,12 +422,11 @@ public class NumberRange<E extends Numbe
      * type is a narrowing conversion, then the cast is performed according the rules of the
      * Java language: the high-order bytes are silently dropped.
      *
-     * @param  <N>   The class to cast to.
-     * @param  type  The class to cast to. Must be one of {@link Byte}, {@link Short},
+     * @param  <N>   the class to cast to.
+     * @param  type  the class to cast to. Must be one of {@link Byte}, {@link Short},
      *               {@link Integer}, {@link Long}, {@link Float} or {@link Double}.
-     * @return The casted range, or {@code this} if this range already uses the specified type.
-     * @throws IllegalArgumentException If the given type is not one of the primitive
-     *         wrappers for numeric types.
+     * @return the casted range, or {@code this} if this range already uses the specified type.
+     * @throws IllegalArgumentException if the given type is not one of the primitive wrappers for numeric types.
      */
     @SuppressWarnings("unchecked")
     public <N extends Number & Comparable<? super N>> NumberRange<N> castTo(final Class<N> type)
@@ -458,22 +451,21 @@ public class NumberRange<E extends Numbe
      * Returns the {@linkplain #getMinValue() minimum value} as a {@code double}.
      * If this range is unbounded, then {@link Double#NEGATIVE_INFINITY} is returned.
      *
-     * @return The minimum value.
+     * @return the minimum value.
      */
     @SuppressWarnings("unchecked")
     public double getMinDouble() {
-        final Number value = (Number) getMinValue();
+        final Number value = getMinValue();
         return (value != null) ? value.doubleValue() : Double.NEGATIVE_INFINITY;
     }
 
     /**
-     * Returns the {@linkplain #getMinDouble() minimum value} with the specified inclusive or
-     * exclusive state. If this range is unbounded, then {@link Double#NEGATIVE_INFINITY} is
-     * returned.
-     *
-     * @param  inclusive {@code true} for the minimum value inclusive,
-     *         or {@code false} for the minimum value exclusive.
-     * @return The minimum value, inclusive or exclusive as requested.
+     * Returns the {@linkplain #getMinDouble() minimum value} with the specified inclusive or exclusive state.
+     * If this range is unbounded, then {@link Double#NEGATIVE_INFINITY} is returned.
+     *
+     * @param  inclusive  {@code true} for the minimum value inclusive, or
+     *                    {@code false} for the minimum value exclusive.
+     * @return the minimum value, inclusive or exclusive as requested.
      */
     public double getMinDouble(final boolean inclusive) {
         double value = getMinDouble();
@@ -487,22 +479,21 @@ public class NumberRange<E extends Numbe
      * Returns the {@linkplain #getMaxValue() maximum value} as a {@code double}.
      * If this range is unbounded, then {@link Double#POSITIVE_INFINITY} is returned.
      *
-     * @return The maximum value.
+     * @return the maximum value.
      */
     @SuppressWarnings("unchecked")
     public double getMaxDouble() {
-        final Number value = (Number) getMaxValue();
+        final Number value = getMaxValue();
         return (value != null) ? value.doubleValue() : Double.POSITIVE_INFINITY;
     }
 
     /**
-     * Returns the {@linkplain #getMaxDouble() maximum value} with the specified inclusive or
-     * exclusive state. If this range is unbounded, then {@link Double#POSITIVE_INFINITY} is
-     * returned.
-     *
-     * @param  inclusive {@code true} for the maximum value inclusive,
-     *         or {@code false} for the maximum value exclusive.
-     * @return The maximum value, inclusive or exclusive as requested.
+     * Returns the {@linkplain #getMaxDouble() maximum value} with the specified inclusive or exclusive state.
+     * If this range is unbounded, then {@link Double#POSITIVE_INFINITY} is returned.
+     *
+     * @param  inclusive  {@code true} for the maximum value inclusive, or
+     *                    {@code false} for the maximum value exclusive.
+     * @return the maximum value, inclusive or exclusive as requested.
      */
     public double getMaxDouble(final boolean inclusive) {
         double value = getMaxDouble();
@@ -515,10 +506,10 @@ public class NumberRange<E extends Numbe
     /**
      * Returns the next value for the given type.
      *
-     * @param  type  The element type.
-     * @param  value The value to increment or decrement.
-     * @param  up    {@code true} for incrementing, or {@code false} for decrementing.
-     * @return The adjacent value.
+     * @param  type   the element type.
+     * @param  value  the value to increment or decrement.
+     * @param  up     {@code true} for incrementing, or {@code false} for decrementing.
+     * @return the adjacent value.
      */
     private static double next(final Class<?> type, double value, final boolean up) {
         if (!up) {
@@ -546,7 +537,7 @@ public class NumberRange<E extends Numbe
      * This method converts {@code this} or the given argument to the widest numeric type,
      * then performs the same work than {@link #contains(Comparable)}.
      *
-     * @param  value The value to check for inclusion in this range.
+     * @param  value  the value to check for inclusion in this range.
      * @return {@code true} if the given value is included in this range.
      * @throws IllegalArgumentException if the given range can not be converted to a valid type
      *         through widening conversion.
@@ -579,7 +570,7 @@ public class NumberRange<E extends Numbe
      * This method converts {@code this} or the given argument to the widest numeric type,
      * then delegates to {@link #contains(Range)}.
      *
-     * @param  range The range to check for inclusion in this range.
+     * @param  range  the range to check for inclusion in this range.
      * @return {@code true} if the given range is included in this range.
      * @throws IllegalArgumentException if the given range can not be converted to a valid type
      *         through widening conversion, or if the units of measurement are not convertible.
@@ -600,7 +591,7 @@ public class NumberRange<E extends Numbe
      * This method converts {@code this} or the given argument to the widest numeric type,
      * then delegates to {@link #intersects(Range)}.
      *
-     * @param  range The range to check for inclusion in this range.
+     * @param  range  the range to check for inclusion in this range.
      * @return {@code true} if the given range is included in this range.
      * @throws IllegalArgumentException if the given range can not be converted to a valid type
      *         through widening conversion, or if the units of measurement are not convertible.
@@ -616,7 +607,7 @@ public class NumberRange<E extends Numbe
      * This method converts {@code this} or the given argument to the widest numeric type,
      * then delegates to {@link #intersect(Range)}.
      *
-     * @param  range The range to add to this range.
+     * @param  range  the range to add to this range.
      * @return The union of this range with the given range.
      * @throws IllegalArgumentException if the given range can not be converted to a valid type
      *         through widening conversion, or if the units of measurement are not convertible.
@@ -641,8 +632,8 @@ public class NumberRange<E extends Numbe
      * This method converts {@code this} or the given argument to the widest numeric type,
      * then delegates to {@link #union(Range)}.
      *
-     * @param  range The range to add to this range.
-     * @return The union of this range with the given range.
+     * @param  range  the range to add to this range.
+     * @return the union of this range with the given range.
      * @throws IllegalArgumentException if the given range can not be converted to a valid type
      *         through widening conversion, or if the units of measurement are not convertible.
      */
@@ -657,8 +648,8 @@ public class NumberRange<E extends Numbe
      * This method converts {@code this} or the given argument to the widest numeric type,
      * then delegates to {@link #subtract(Range)}.
      *
-     * @param  range The range to subtract.
-     * @return This range without the given range, as an array of length 0, 1 or 2.
+     * @param  range  the range to subtract.
+     * @return this range without the given range, as an array of length 0, 1 or 2.
      * @throws IllegalArgumentException if the given range can not be converted to a valid type
      *         through widening conversion, or if the units of measurement are not convertible.
      */

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java?rev=1763106&r1=1763105&r2=1763106&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java [UTF-8] Sun Oct  2 22:52:07 2016
@@ -119,7 +119,7 @@ public class Range<E extends Comparable<
      * Constructs a range with the same type and the same values than the specified range.
      * This is a copy constructor.
      *
-     * @param range The range to copy.
+     * @param  range  the range to copy.
      */
     public Range(final Range<E> range) {
         elementType   = range.elementType;
@@ -138,11 +138,11 @@ public class Range<E extends Comparable<
      * are enabled. This verification is not performed in normal execution because theoretically unnecessary
      * unless Java generic types have been tricked.</div>
      *
-     * @param elementType    The base type of the range elements.
-     * @param minValue       The minimal value, or {@code null} if none.
-     * @param isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
-     * @param maxValue       The maximal value, or {@code null} if none.
-     * @param isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
+     * @param  elementType    the base type of the range elements.
+     * @param  minValue       the minimal value, or {@code null} if none.
+     * @param  isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
+     * @param  maxValue       the maximal value, or {@code null} if none.
+     * @param  isMaxIncluded  {@code true} if the maximal value is inclusive, or {@code false} if exclusive.
      */
     public Range(final Class<E> elementType,
             final E minValue, final boolean isMinIncluded,
@@ -193,7 +193,7 @@ public class Range<E extends Comparable<
     /**
      * To be overridden by {@link MeasurementRange} only.
      *
-     * @return The unit of measurement, or {@code null}.
+     * @return the unit of measurement, or {@code null}.
      */
     Unit<?> unit() {
         return null;
@@ -224,7 +224,7 @@ public class Range<E extends Comparable<
      * If non-null, the returned value is either inclusive or exclusive depending on
      * the boolean returned by {@link #isMinIncluded()}.
      *
-     * @return The minimal value, or {@code null} if this range is unbounded on the lower side.
+     * @return the minimal value, or {@code null} if this range is unbounded on the lower side.
      */
     public E getMinValue() {
         return minValue;
@@ -246,7 +246,7 @@ public class Range<E extends Comparable<
      * If non-null, the returned value is either inclusive or exclusive depending on
      * the boolean returned by {@link #isMaxIncluded()}.
      *
-     * @return The maximal value, or {@code null} if this range is unbounded on the upper side.
+     * @return the maximal value, or {@code null} if this range is unbounded on the upper side.
      */
     public E getMaxValue() {
         return maxValue;
@@ -278,11 +278,11 @@ public class Range<E extends Comparable<
     @Override
     public final boolean isEmpty() {
         if (minValue == null || maxValue == null) {
-            return false; // Unbounded: can not be empty.
+            return false;                               // Unbounded: can not be empty.
         }
         final int c = minValue.compareTo(maxValue);
         if (c < 0) {
-            return false; // Minimum is smaller than maximum.
+            return false;                               // Minimum is smaller than maximum.
         }
         // If min and max are equal, then the range is empty if at least one of them is exclusive.
         return (c != 0) || !isMinIncluded || !isMaxIncluded;
@@ -294,7 +294,7 @@ public class Range<E extends Comparable<
      * stating that null {@linkplain #getMinValue() minimum} or {@linkplain #getMaxValue() maximum}
      * values are exclusive.
      *
-     * @param  value The value to check for inclusion in this range.
+     * @param  value  the value to check for inclusion in this range.
      * @return {@code true} if the given value is included in this range.
      */
     public boolean contains(final E value) {
@@ -332,9 +332,9 @@ public class Range<E extends Comparable<
     /**
      * Returns {@code true} if the supplied range is fully contained within this range.
      *
-     * @param  range The range to check for inclusion in this range.
+     * @param  range  the range to check for inclusion in this range.
      * @return {@code true} if the given range is included in this range.
-     * @throws IllegalArgumentException is the given range is incompatible,
+     * @throws IllegalArgumentException if the given range is incompatible,
      *         for example because of incommensurable units of measurement.
      */
     public boolean contains(final Range<? extends E> range) {
@@ -366,9 +366,9 @@ public class Range<E extends Comparable<
     /**
      * Returns {@code true} if this range intersects the given range.
      *
-     * @param  range The range to check for intersection with this range.
+     * @param  range  the range to check for intersection with this range.
      * @return {@code true} if the given range intersects this range.
-     * @throws IllegalArgumentException is the given range is incompatible,
+     * @throws IllegalArgumentException if the given range is incompatible,
      *         for example because of incommensurable units of measurement.
      */
     public boolean intersects(final Range<? extends E> range) {
@@ -379,12 +379,14 @@ public class Range<E extends Comparable<
     /**
      * Returns the intersection between this range and the given range.
      *
-     * @param  range The range to intersect.
-     * @return The intersection of this range with the given range.
-     * @throws IllegalArgumentException is the given range is incompatible,
+     * @param  range  the range to intersect.
+     * @return the intersection of this range with the given range.
+     * @throws IllegalArgumentException if the given range is incompatible,
      *         for example because of incommensurable units of measurement.
      */
     public Range<E> intersect(final Range<E> range) {
+        if (range.isEmpty()) return range;
+        if (this .isEmpty()) return this;
         /*
          * For two ranges [L₁ … H₁] and [L₂ … H₂], the intersection is given by
          * ([max(L₁, L₂) … min(H₁, H₂)]). Only two comparisons is needed.
@@ -411,12 +413,15 @@ public class Range<E extends Comparable<
     /**
      * Returns the union of this range with the given range.
      *
-     * @param  range The range to add to this range.
-     * @return The union of this range with the given range.
-     * @throws IllegalArgumentException is the given range is incompatible,
+     * @param  range  the range to add to this range.
+     * @return the union of this range with the given range.
+     * @throws IllegalArgumentException if the given range is incompatible,
      *         for example because of incommensurable units of measurement.
      */
     public Range<E> union(final Range<E> range) {
+        if (range.isEmpty()) return this;
+        if (this .isEmpty()) return range;
+
         final Range<E> union, min, max;
         min = compareMinTo(range.minValue, range.isMinIncluded ? 0 : -1) > 0 ? range : this;
         max = compareMaxTo(range.maxValue, range.isMaxIncluded ? 0 : +1) < 0 ? range : this;
@@ -441,9 +446,9 @@ public class Range<E extends Comparable<
      *   <li>Otherwise returns an array of length 1.</li>
      * </ul>
      *
-     * @param  range The range to subtract.
-     * @return This range without the given range, as an array of length 0, 1 or 2.
-     * @throws IllegalArgumentException is the given range is incompatible,
+     * @param  range  the range to subtract.
+     * @return this range without the given range, as an array of length 0, 1 or 2.
+     * @throws IllegalArgumentException if the given range is incompatible,
      *         for example because of incommensurable units of measurement.
      */
     public Range<E>[] subtract(final Range<E> range) {
@@ -494,9 +499,9 @@ public class Range<E extends Comparable<
      *
      * Note that the non-zero position shall be exactly -1 or +1, not arbitrary negative or positive.
      *
-     * @param  value    An endpoint value of the other range to be compared to the minimal value of this range.
-     * @param  position The position of {@code value} relative to the inclusive values of the other range.
-     * @return Position (-, + or 0) of the inclusive values of this range compared to the other range.
+     * @param  value     an endpoint value of the other range to be compared to the minimal value of this range.
+     * @param  position  the position of {@code value} relative to the inclusive values of the other range.
+     * @return position (-, + or 0) of the inclusive values of this range compared to the other range.
      *
      * @see #contains(Range)
      */
@@ -572,7 +577,7 @@ public class Range<E extends Comparable<
      *
      * Note that subclasses may add other requirements, for example on units of measurement.
      *
-     * @param  object The object to compare with this range for equality.
+     * @param  object  the object to compare with this range for equality.
      * @return {@code true} if the given object is equal to this range.
      */
     @Override
@@ -696,10 +701,10 @@ public class Range<E extends Comparable<
      * be formatted using the {@linkplain RangeFormat#isAlternateForm() alternate form}
      * for exclusive bounds.</p>
      *
-     * @param formatter The formatter in which to format this angle.
-     * @param flags     {@link FormattableFlags#LEFT_JUSTIFY} for left alignment, or 0 for right alignment.
-     * @param width     Minimal number of characters to write, padding with {@code ' '} if necessary.
-     * @param precision Maximal number of characters to write, or -1 if no limit.
+     * @param  formatter  the formatter in which to format this angle.
+     * @param  flags      {@link FormattableFlags#LEFT_JUSTIFY} for left alignment, or 0 for right alignment.
+     * @param  width      minimal number of characters to write, padding with {@code ' '} if necessary.
+     * @param  precision  maximal number of characters to write, or -1 if no limit.
      */
     @Override
     public void formatTo(final Formatter formatter, final int flags, final int width, int precision) {



Mime
View raw message