Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Line.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Line.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Line.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Line.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -86,8 +86,8 @@ public class Line implements Cloneable,
* Constructs a line with the specified slope and offset.
* The linear equation will be <var>y</var> = <var>slope</var>⋅<var>x</var> + <var>y₀</var>.
*
- * @param slope The slope.
- * @param y0 The <var>y</var> value at <var>x</var> = 0.
+ * @param slope the slope.
+ * @param y0 the <var>y</var> value at <var>x</var> = 0.
*
* @see #setEquation(double, double)
*/
@@ -100,7 +100,7 @@ public class Line implements Cloneable,
/**
* Returns the slope.
*
- * @return The slope.
+ * @return the slope.
*
* @see #x0()
* @see #y0()
@@ -113,7 +113,7 @@ public class Line implements Cloneable,
* Returns the <var>x</var> value for <var>y</var> = 0.
* Coordinate (<var>x₀</var>, 0) is the intersection point with the <var>x</var> axis.
*
- * @return The <var>x</var> value for <var>y</var> = 0.
+ * @return the <var>x</var> value for <var>y</var> = 0.
*
* @see #y0()
* @see #slope()
@@ -126,8 +126,8 @@ public class Line implements Cloneable,
* Computes <var>x</var> = <var>f</var>⁻¹(<var>y</var>).
* If the line is horizontal, then this method returns an infinite value.
*
- * @param y The <var>y</var> value where to evaluate the inverse function.
- * @return The <var>x</var> value for the given <var>y</var> value.
+ * @param y the <var>y</var> value where to evaluate the inverse function.
+ * @return the <var>x</var> value for the given <var>y</var> value.
*
* @see #y(double)
*/
@@ -139,7 +139,7 @@ public class Line implements Cloneable,
* Returns the <var>y</var> value for <var>x</var> = 0.
* Coordinate (0, <var>y₀</var>) is the intersection point with the <var>y</var> axis.
*
- * @return The <var>y</var> value for <var>x</var> = 0.
+ * @return the <var>y</var> value for <var>x</var> = 0.
*
* @see #x0()
* @see #slope()
@@ -152,8 +152,8 @@ public class Line implements Cloneable,
* Computes <var>y</var> = <var>f</var>(<var>x</var>).
* If the line is vertical, then this method returns an infinite value.
*
- * @param x The <var>x</var> value where to evaluate the inverse function.
- * @return The <var>y</var> value for the given <var>x</var> value.
+ * @param x the <var>x</var> value where to evaluate the inverse function.
+ * @return the <var>y</var> value for the given <var>x</var> value.
*
* @see #x(double)
*/
@@ -164,8 +164,8 @@ public class Line implements Cloneable,
/**
* Translates the line. The slope stay unchanged.
*
- * @param dx The horizontal translation.
- * @param dy The vertical translation.
+ * @param dx the horizontal translation.
+ * @param dy the vertical translation.
*/
public void translate(final double dx, final double dy) {
if (slope == 0 || isInfinite(slope)) {
@@ -181,8 +181,8 @@ public class Line implements Cloneable,
* Sets this line to the specified slope and offset.
* The linear equation will be <var>y</var> = <var>slope</var>⋅<var>x</var> + <var>y₀</var>.
*
- * @param slope The slope.
- * @param y0 The <var>y</var> value at <var>x</var> = 0.
+ * @param slope the slope.
+ * @param y0 the <var>y</var> value at <var>x</var> = 0.
*
* @see #setFromPoints(double, double, double, double)
* @see #fit(double[], double[])
@@ -197,10 +197,10 @@ public class Line implements Cloneable,
* Sets a line through the specified points.
* The line will continue toward infinity after the points.
*
- * @param x1 Ordinate <var>x</var> of the first point.
- * @param y1 Ordinate <var>y</var> of the first point.
- * @param x2 Ordinate <var>x</var> of the second point.
- * @param y2 Ordinate <var>y</var> of the second point.
+ * @param x1 ordinate <var>x</var> of the first point.
+ * @param y1 ordinate <var>y</var> of the first point.
+ * @param x2 ordinate <var>x</var> of the second point.
+ * @param y2 ordinate <var>y</var> of the second point.
*/
public void setFromPoints(final double x1, final double y1, final double x2, final double y2) {
this.slope = (y2 - y1) / (x2 - x1);
@@ -222,9 +222,9 @@ public class Line implements Cloneable,
* least-squares senses. This method assume that the <var>x</var> values are precise and all uncertainty
* is in <var>y</var>.
*
- * @param x Vector of <var>x</var> values (independent variable).
- * @param y Vector of <var>y</var> values (dependent variable).
- * @return Estimation of the correlation coefficient. The closer this coefficient is to +1 or -1, the better the fit.
+ * @param x vector of <var>x</var> values (independent variable).
+ * @param y vector of <var>y</var> values (dependent variable).
+ * @return estimation of the correlation coefficient. The closer this coefficient is to +1 or -1, the better the fit.
*
* @throws IllegalArgumentException if <var>x</var> and <var>y</var> do not have the same length.
*/
@@ -241,8 +241,8 @@ public class Line implements Cloneable,
* <p>Points shall be two dimensional with ordinate values in the (<var>x</var>,<var>y</var>) order.
* {@link Double#NaN} ordinate values are ignored.</p>
*
- * @param points The two-dimensional points.
- * @return Estimation of the correlation coefficient. The closer this coefficient is to +1 or -1, the better the fit.
+ * @param points the two-dimensional points.
+ * @return estimation of the correlation coefficient. The closer this coefficient is to +1 or -1, the better the fit.
* @throws MismatchedDimensionException if a point is not two-dimensional.
*/
public double fit(final Iterable<? extends DirectPosition> points) {
@@ -264,7 +264,7 @@ public class Line implements Cloneable,
}
i++;
final double x,y;
- if (!isNaN(y = p.getOrdinate(1)) && // Test first the dimension which is most likely to contain NaN.
+ if (!isNaN(y = p.getOrdinate(1)) && // Test first the dimension which is most likely to contain NaN.
!isNaN(x = p.getOrdinate(0)))
{
mean_x.add(x);
@@ -343,7 +343,7 @@ public class Line implements Cloneable,
/**
* Returns a clone of this line.
*
- * @return A clone of this line.
+ * @return a clone of this line.
*/
@Override
public Line clone() {
@@ -357,7 +357,7 @@ public class Line implements Cloneable,
/**
* Compares this line with the specified object for equality.
*
- * @param object The object to compare with this line for equality.
+ * @param object the object to compare with this line for equality.
* @return {@code true} if both objects are equal.
*/
@Override
@@ -384,7 +384,7 @@ public class Line implements Cloneable,
* Returns a string representation of this line. This method returns the linear equation
* in the form <var>y</var> = <var>slope</var>⋅<var>x</var> + <var>y₀</var>.
*
- * @return A string representation of this line.
+ * @return a string representation of this line.
*/
@Override
public String toString() {
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -147,8 +147,8 @@ public final class MathFunctions extends
* {@link Math#floor(double)} if the value is positive, or {@link Math#ceil(double)} if
* the value is negative.
*
- * @param value The value to truncate.
- * @return The largest in magnitude (further from zero) integer value which is equals
+ * @param value the value to truncate.
+ * @return the largest in magnitude (further from zero) integer value which is equals
* or less in magnitude than the given value.
*/
public static double truncate(final double value) {
@@ -171,8 +171,8 @@ public final class MathFunctions extends
* typically aligned with the axes of a {@linkplain org.opengis.referencing.cs.CartesianCS
* Cartesian coordinate system}.
*
- * @param vector The vector for which to compute the magnitude.
- * @return The magnitude of the given vector.
+ * @param vector the vector for which to compute the magnitude.
+ * @return the magnitude of the given vector.
*
* @see Math#hypot(double, double)
*/
@@ -238,8 +238,8 @@ public final class MathFunctions extends
* <li><code>Math.floor({@linkplain #LOG10_2} * getExponent(value)) == Math.floor(Math.log10(value))</code></li>
* </ul>
*
- * @param value The value for which to get the exponent.
- * @return The unbiased exponent, corrected for sub-normal numbers if needed.
+ * @param value the value for which to get the exponent.
+ * @return the unbiased exponent, corrected for sub-normal numbers if needed.
* Values will be in the [-1075 … 1024] range, inclusive.
*
* @see Math#getExponent(double)
@@ -268,7 +268,7 @@ public final class MathFunctions extends
* <code>{@linkplain Math#pow(double, double) Math.pow}(10, x)</code>, but is slightly more accurate
* in the special case where the given argument is an integer.
*
- * @param x The exponent.
+ * @param x the exponent.
* @return 10 raised to the given exponent.
*
* @see #pow10(int)
@@ -302,7 +302,7 @@ public final class MathFunctions extends
* <li>For all other <var>x</var> values, the result is the closest IEEE 754 approximation.</li>
* </ul>
*
- * @param x The exponent.
+ * @param x the exponent.
* @return 10 raised to the given exponent.
*
* @see #pow10(double)
@@ -317,8 +317,8 @@ public final class MathFunctions extends
* Returns the inverse hyperbolic sine of the given value.
* This is the inverse of the {@link Math#sinh(double)} method.
*
- * @param x The value for which to compute the inverse hyperbolic sine.
- * @return The inverse hyperbolic sine of the given value.
+ * @param x the value for which to compute the inverse hyperbolic sine.
+ * @return the inverse hyperbolic sine of the given value.
*
* @see Math#sinh(double)
*
@@ -332,8 +332,8 @@ public final class MathFunctions extends
* Returns the inverse hyperbolic cosine of the given value.
* This is the inverse of the {@link Math#cosh(double)} method.
*
- * @param x The value for which to compute the inverse hyperbolic cosine.
- * @return The inverse hyperbolic cosine of the given value.
+ * @param x the value for which to compute the inverse hyperbolic cosine.
+ * @return the inverse hyperbolic cosine of the given value.
*
* @see Math#cosh(double)
*
@@ -355,8 +355,8 @@ public final class MathFunctions extends
* <li>For <var>x</var> = +1, this method returns {@linkplain Double#POSITIVE_INFINITY positive infinity}.</li>
* </ul>
*
- * @param x The value for which to compute the inverse hyperbolic tangent.
- * @return The inverse hyperbolic tangent of the given value.
+ * @param x the value for which to compute the inverse hyperbolic tangent.
+ * @return the inverse hyperbolic tangent of the given value.
*
* @see Math#tanh(double)
*/
@@ -384,7 +384,7 @@ public final class MathFunctions extends
* The handling of zero values is the difference between invoking {@code isPositive(double)}
* and testing if (<var>value</var> {@literal >= 0}).
*
- * @param value The value to test.
+ * @param value the value to test.
* @return {@code true} if the given value is positive, excluding negative zero.
*
* @see #isPositiveZero(double)
@@ -403,7 +403,7 @@ public final class MathFunctions extends
* return (value == 0) && isPositive(value);
* }
*
- * @param value The value to test.
+ * @param value the value to test.
* @return {@code true} if the given value is +0.0 (not -0.0).
*
* @see #isPositive(double)
@@ -429,7 +429,7 @@ public final class MathFunctions extends
* The handling of zero values is the difference between invoking {@code isNegative(double)}
* and testing if (<var>value</var> {@literal < 0}).
*
- * @param value The value to test.
+ * @param value the value to test.
* @return {@code true} if the given value is negative, including negative zero.
*
* @see #isNegativeZero(double)
@@ -448,7 +448,7 @@ public final class MathFunctions extends
* return (value == 0) && isNegative(value);
* }
*
- * @param value The value to test.
+ * @param value the value to test.
* @return {@code true} if the given value is -0.0 (not +0.0).
*
* @see #isNegative(double)
@@ -470,8 +470,8 @@ public final class MathFunctions extends
* <li>If any value is {@link Double#isNaN(double) NaN}, returns {@code false}</li>
* </ul>
*
- * @param v1 The first value.
- * @param v2 The second value, to compare the sign with the first value.
+ * @param v1 the first value.
+ * @param v2 the second value, to compare the sign with the first value.
* @return {@code true} if the given values are not NaN and have the same sign.
*
* @see Math#signum(double)
@@ -490,9 +490,9 @@ public final class MathFunctions extends
* <p>This method makes no guarantee about whether {@code NaN} values are handled as positive
* or negative numbers. This is the same policy than {@link Math#copySign(double, double)}.</p>
*
- * @param value The parameter providing the value that may need a sign change.
- * @param sign The parameter providing the sign to <cite>xor</cite> with the value.
- * @return The provided value with its sign reversed if the {@code sign} parameter is negative.
+ * @param value the parameter providing the value that may need a sign change.
+ * @param sign the parameter providing the sign to <cite>xor</cite> with the value.
+ * @return the provided value with its sign reversed if the {@code sign} parameter is negative.
*
* @see Math#copySign(double, double)
*/
@@ -514,10 +514,10 @@ public final class MathFunctions extends
* <li>Otherwise, this method returns the result of the {@code abs(v1 - v2) <= ε} comparison.</li>
* </ul>
*
- * @param v1 The first value to compare.
- * @param v2 The second value to compare.
- * @param ε The tolerance threshold, which must be positive.
- * @return {@code true} If both values are equal given the tolerance threshold.
+ * @param v1 the first value to compare.
+ * @param v2 the second value to compare.
+ * @param ε the tolerance threshold, which must be positive.
+ * @return {@code true} if both values are equal given the tolerance threshold.
*/
public static boolean epsilonEqual(final float v1, final float v2, final float ε) {
return (Math.abs(v1 - v2) <= ε) || Float.floatToIntBits(v1) == Float.floatToIntBits(v2);
@@ -536,10 +536,10 @@ public final class MathFunctions extends
* <li>Otherwise, this method returns the result of the {@code abs(v1 - v2) <= ε} comparison.</li>
* </ul>
*
- * @param v1 The first value to compare.
- * @param v2 The second value to compare.
- * @param ε The tolerance threshold, which must be positive.
- * @return {@code true} If both values are equal given the tolerance threshold.
+ * @param v1 the first value to compare.
+ * @param v2 the second value to compare.
+ * @param ε the tolerance threshold, which must be positive.
+ * @return {@code true} if both values are equal given the tolerance threshold.
*/
public static boolean epsilonEqual(final double v1, final double v2, final double ε) {
return (Math.abs(v1 - v2) <= ε) || Double.doubleToLongBits(v1) == Double.doubleToLongBits(v2);
@@ -562,8 +562,8 @@ public final class MathFunctions extends
* may change in any future version of the SIS library. The current implementation restricts the
* range of allowed ordinal values to a smaller one than the range of all possible values.</p>
*
- * @param ordinal The NaN ordinal value, from {@code -0x200000} to {@code 0x1FFFFF} inclusive.
- * @return One of the legal {@linkplain Float#isNaN(float) NaN} values as a float.
+ * @param ordinal the NaN ordinal value, from {@code -0x200000} to {@code 0x1FFFFF} inclusive.
+ * @return one of the legal {@linkplain Float#isNaN(float) NaN} values as a float.
* @throws IllegalArgumentException if the specified ordinal is out of range.
*
* @see Float#intBitsToFloat(int)
@@ -579,9 +579,9 @@ public final class MathFunctions extends
* Returns the ordinal value of the given NaN number.
* This method is the converse of {@link #toNanFloat(int)}.
*
- * @param value The value from which to get the NaN ordinal value.
- * @return The NaN ordinal value of the given floating point value.
- * @throws IllegalArgumentException If the given value is not a NaN value,
+ * @param value the value from which to get the NaN ordinal value.
+ * @return the NaN ordinal value of the given floating point value.
+ * @throws IllegalArgumentException if the given value is not a NaN value,
* or does not use a supported bits pattern.
*/
public static int toNanOrdinal(final float value) throws IllegalArgumentException {
@@ -617,8 +617,8 @@ public final class MathFunctions extends
* (this policy may be revisited in future SIS version).</li>
* </ul>
*
- * @param l0 upper part of the quadruple precision floating point number.
- * @param l1 lower part of the quadruple precision floating point number.
+ * @param l0 upper part of the quadruple precision floating point number.
+ * @param l1 lower part of the quadruple precision floating point number.
* @return double precision approximation.
*
* @see <a href="https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format">Quadruple-precision floating-point format on Wikipedia</a>
@@ -667,8 +667,8 @@ public final class MathFunctions extends
* Returns the <var>i</var><sup>th</sup> prime number.
* This method returns (2, 3, 5, 7, 11, …) for index (0, 1, 2, 3, 4, …).
*
- * @param index The prime number index, starting at index 0 for prime number 2.
- * @return The prime number at the specified index.
+ * @param index the prime number index, starting at index 0 for prime number 2.
+ * @return the prime number at the specified index.
* @throws IndexOutOfBoundsException if the specified index is too large.
*
* @see java.math.BigInteger#isProbablePrime(int)
@@ -685,7 +685,7 @@ public final class MathFunctions extends
// Compute by block of 16 values, for reducing the amount of array resize.
primes = Arrays.copyOf(primes, Math.min((index | 0xF) + 1, PRIMES_LENGTH_16_BITS));
do {
-testNextNumber: while (true) { // Simulate a "goto" statement (usually not recommanded...)
+testNextNumber: while (true) { // Simulate a "goto" statement (usually not recommanded...)
final int stopAt = (int) Math.sqrt(n += 2);
int prime;
int j = 0;
@@ -711,9 +711,9 @@ testNextNumber: while (true) { /
* Current implementation accepts only values in the
* [2 … {@value #HIGHEST_SUPPORTED_PRIME_NUMBER}] range.
*
- * @param number The number for which to find the next prime.
- * @return The given number if it is a prime number, or the next prime number otherwise.
- * @throws IllegalArgumentException If the given value is outside the supported range.
+ * @param number the number for which to find the next prime.
+ * @return the given number if it is a prime number, or the next prime number otherwise.
+ * @throws IllegalArgumentException if the given value is outside the supported range.
*
* @see java.math.BigInteger#isProbablePrime(int)
*/
@@ -744,8 +744,8 @@ testNextNumber: while (true) { /
* than {@code O} (which returns an empty array), the first element in the returned array
* is always {@code 1} and the last element is always the absolute value of {@code number}.
*
- * @param number The number for which to compute the divisors.
- * @return The divisors in strictly increasing order.
+ * @param number the number for which to compute the divisors.
+ * @return the divisors in strictly increasing order.
*/
public static int[] divisors(int number) {
if (number == 0) {
@@ -761,7 +761,7 @@ testNextNumber: while (true) { /
* values before that point, i.e. if n=p1*p2 and p2 is greater than 'sqrt', than p1
* most be lower than 'sqrt'.
*/
- final int sqrt = (int) Math.sqrt(number); // Really wants rounding toward 0.
+ final int sqrt = (int) Math.sqrt(number); // Really want rounding toward 0.
for (int p,i=0; (p=primeNumberAt(i)) <= sqrt; i++) {
if (number % p == 0) {
if (count == divisors.length) {
@@ -799,7 +799,7 @@ testNextNumber: while (true) { /
if (number % d2 == 0) {
int p = Arrays.binarySearch(divisors, j, count, d2);
if (p < 0) {
- p = ~p; // ~ operator, not minus
+ p = ~p; // tild (~) operator, not minus
if (count == divisors.length) {
divisors = Arrays.copyOf(divisors, count*2);
}
@@ -818,8 +818,8 @@ testNextNumber: while (true) { /
/**
* Returns the divisors which are common to all the specified numbers.
*
- * @param numbers The numbers for which to compute the divisors.
- * @return The divisors common to all the given numbers, in strictly increasing order.
+ * @param numbers the numbers for which to compute the divisors.
+ * @return the divisors common to all the given numbers, in strictly increasing order.
*/
public static int[] commonDivisors(final int... numbers) {
if (numbers.length == 0) {
@@ -846,7 +846,7 @@ testNextNumber: while (true) { /
for (int i=0; i<numbers.length; i++) {
final int n = Math.abs(numbers[i]);
if (n != minValue) {
- for (int j=count; --j>0;) { // Do not test j==0, since divisors[0] == 1.
+ for (int j=count; --j>0;) { // Do not test j==0, since divisors[0] == 1.
if (n % divisors[j] != 0) {
System.arraycopy(divisors, j+1, divisors, j, --count - j);
}
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -109,9 +109,9 @@ public class Plane implements Cloneable,
/**
* Constructs a new plane initialized to the given coefficients.
*
- * @param sx The slope along the <var>x</var> values.
- * @param sy The slope along the <var>y</var> values.
- * @param z0 The <var>z</var> value at (<var>x</var>,<var>y</var>) = (0,0).
+ * @param sx the slope along the <var>x</var> values.
+ * @param sy the slope along the <var>y</var> values.
+ * @param z0 the <var>z</var> value at (<var>x</var>,<var>y</var>) = (0,0).
*
* @see #setEquation(double, double, double)
*/
@@ -125,7 +125,7 @@ public class Plane implements Cloneable,
* Returns the slope along the <var>x</var> values. This coefficient appears in the plane equation
* <var><b><u>sx</u></b></var>⋅<var>x</var> + <var>sy</var>⋅<var>y</var> + <var>z₀</var>.
*
- * @return The <var>sx</var> term.
+ * @return the <var>sx</var> term.
*/
public final double slopeX() {
return sx;
@@ -135,7 +135,7 @@ public class Plane implements Cloneable,
* Returns the slope along the <var>y</var> values. This coefficient appears in the plane equation
* <var>sx</var>⋅<var>x</var> + <var><b><u>sy</u></b></var>⋅<var>y</var> + <var>z₀</var>.
*
- * @return The <var>sy</var> term.
+ * @return the <var>sy</var> term.
*/
public final double slopeY() {
return sy;
@@ -145,7 +145,7 @@ public class Plane implements Cloneable,
* Returns the <var>z</var> value at (<var>x</var>,<var>y</var>) = (0,0). This coefficient appears in the
* plane equation <var>sx</var>⋅<var>x</var> + <var>sy</var>⋅<var>y</var> + <b><var>z₀</var></b>.
*
- * @return The <var>z₀</var> term.
+ * @return the <var>z₀</var> term.
*
* @see #z(double, double)
*/
@@ -159,9 +159,9 @@ public class Plane implements Cloneable,
*
* <blockquote>x(y,z) = (z - ({@linkplain #z0() z₀} + {@linkplain #slopeY() sy}⋅y)) / {@linkplain #slopeX() sx}</blockquote>
*
- * @param y The <var>y</var> value where to compute <var>x</var>.
- * @param z The <var>z</var> value where to compute <var>x</var>.
- * @return The <var>x</var> value.
+ * @param y the <var>y</var> value where to compute <var>x</var>.
+ * @param z the <var>z</var> value where to compute <var>x</var>.
+ * @return the <var>x</var> value.
*/
public final double x(final double y, final double z) {
return (z - (z0 + sy*y)) / sx;
@@ -173,9 +173,9 @@ public class Plane implements Cloneable,
*
* <blockquote>y(x,z) = (z - ({@linkplain #z0() z₀} + {@linkplain #slopeX() sx}⋅x)) / {@linkplain #slopeY() sy}</blockquote>
*
- * @param x The <var>x</var> value where to compute <var>y</var>.
- * @param z The <var>z</var> value where to compute <var>y</var>.
- * @return The <var>y</var> value.
+ * @param x the <var>x</var> value where to compute <var>y</var>.
+ * @param z the <var>z</var> value where to compute <var>y</var>.
+ * @return the <var>y</var> value.
*/
public final double y(final double x, final double z) {
return (z - (z0 + sx*x)) / sy;
@@ -187,9 +187,9 @@ public class Plane implements Cloneable,
*
* <blockquote>z(x,y) = {@linkplain #slopeX() sx}⋅x + {@linkplain #slopeY() sy}⋅y + {@linkplain #z0() z₀}</blockquote>
*
- * @param x The <var>x</var> value where to compute <var>z</var>.
- * @param y The <var>y</var> value where to compute <var>z</var>.
- * @return The <var>z</var> value.
+ * @param x the <var>x</var> value where to compute <var>z</var>.
+ * @param y the <var>y</var> value where to compute <var>z</var>.
+ * @return the <var>z</var> value.
*
* @see #z0()
*/
@@ -200,9 +200,9 @@ public class Plane implements Cloneable,
/**
* Sets the equation of this plane to the given coefficients.
*
- * @param sx The slope along the <var>x</var> values.
- * @param sy The slope along the <var>y</var> values.
- * @param z0 The <var>z</var> value at (<var>x</var>,<var>y</var>) = (0,0).
+ * @param sx the slope along the <var>x</var> values.
+ * @param sy the slope along the <var>y</var> values.
+ * @param z0 the <var>z</var> value at (<var>x</var>,<var>y</var>) = (0,0).
*/
public void setEquation(final double sx, final double sy, final double z0) {
this.sx = sx;
@@ -219,10 +219,10 @@ public class Plane implements Cloneable,
* <p>{@link Double#NaN} values are ignored.
* The result is undetermined if all points are colinear.</p>
*
- * @param x vector of <var>x</var> coordinates.
- * @param y vector of <var>y</var> coordinates.
- * @param z vector of <var>z</var> values.
- * @return An estimation of the Pearson correlation coefficient.
+ * @param x vector of <var>x</var> coordinates.
+ * @param y vector of <var>y</var> coordinates.
+ * @param z vector of <var>z</var> values.
+ * @return an estimation of the Pearson correlation coefficient.
* @throws IllegalArgumentException if <var>x</var>, <var>y</var> and <var>z</var> do not have the same length.
*/
public double fit(final double[] x, final double[] y, final double[] z) {
@@ -240,8 +240,8 @@ public class Plane implements Cloneable,
* {@link Double#NaN} ordinate values are ignored.
* The result is undetermined if all points are colinear.</p>
*
- * @param points The three-dimensional points.
- * @return An estimation of the Pearson correlation coefficient.
+ * @param points the three-dimensional points.
+ * @return an estimation of the Pearson correlation coefficient.
* @throws MismatchedDimensionException if a point is not three-dimensional.
*/
public double fit(final Iterable<? extends DirectPosition> points) {
@@ -379,7 +379,7 @@ public class Plane implements Cloneable,
/**
* Returns a clone of this plane.
*
- * @return A clone of this plane.
+ * @return a clone of this plane.
*/
@Override
public Plane clone() {
@@ -393,7 +393,7 @@ public class Plane implements Cloneable,
/**
* Compares this plane with the specified object for equality.
*
- * @param object The object to compare with this plane for equality.
+ * @param object the object to compare with this plane for equality.
* @return {@code true} if both objects are equal.
*/
@Override
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Statistics.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Statistics.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Statistics.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/Statistics.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -16,6 +16,7 @@
*/
package org.apache.sis.math;
+import java.util.Objects;
import java.io.Serializable;
import org.opengis.util.InternationalString;
import org.apache.sis.util.ArgumentChecks;
@@ -27,7 +28,6 @@ import static java.lang.Double.isNaN;
import static java.lang.Double.doubleToLongBits;
// Branch-dependent imports
-import java.util.Objects;
import org.apache.sis.internal.jdk8.LongConsumer;
import org.apache.sis.internal.jdk8.DoubleConsumer;
@@ -157,9 +157,9 @@ public class Statistics implements Doubl
* If differences or discrete derivatives are wanted, use the {@link #forSeries forSeries(…)}
* method instead.</p>
*
- * @param name The phenomenon for which this object is collecting statistics, or {@code null}
- * if none. If non-null, then this name will be shown as column header in the table
- * formatted by {@link StatisticsFormat}.
+ * @param name the phenomenon for which this object is collecting statistics, or {@code null}
+ * if none. If non-null, then this name will be shown as column header in the table
+ * formatted by {@link StatisticsFormat}.
*/
public Statistics(final CharSequence name) {
this.name = Types.toInternationalString(name);
@@ -196,12 +196,12 @@ public class Statistics implements Doubl
*
*
*
- * @param name The phenomenon for which this object is collecting statistics, or {@code null}
+ * @param name the phenomenon for which this object is collecting statistics, or {@code null}
* if none. If non-null, then this name will be shown as column header in the table
* formatted by {@link StatisticsFormat}.
- * @param differenceNames The names of the statistics on differences.
+ * @param differenceNames the names of the statistics on differences.
* The given array can not be null, but can contain null elements.
- * @return The newly constructed, initially empty, set of statistics.
+ * @return the newly constructed, initially empty, set of statistics.
*
* @see #differences()
*/
@@ -220,7 +220,7 @@ public class Statistics implements Doubl
* If non-null, then this name will be shown as column header in the table formatted
* by {@link StatisticsFormat}.
*
- * @return The phenomenon for which this object is collecting statistics, or {@code null} if none.
+ * @return the phenomenon for which this object is collecting statistics, or {@code null} if none.
*/
public InternationalString name() {
return name;
@@ -247,7 +247,7 @@ public class Statistics implements Doubl
* {@link Double#NaN NaN} values increment the {@linkplain #countNaN() NaN count},
* but are otherwise ignored.
*
- * @param sample The sample value (may be NaN).
+ * @param sample the sample value (may be NaN).
*
* @see #accept(long)
* @see #combine(Statistics)
@@ -265,13 +265,16 @@ public class Statistics implements Doubl
* Implementation of {@link #accept(double)} for real (non-NaN) numbers.
*/
private void real(double sample) {
- // Two next lines use !(a >= b) instead than
- // (a < b) in order to take NaN in account.
+ /*
+ * Two next lines use !(a >= b) instead than
+ * (a < b) in order to take NaN in account.
+ */
if (!(minimum <= sample)) minimum = sample;
if (!(maximum >= sample)) maximum = sample;
-
- // According algebraic laws, lowBits should always been zero. But it is
- // not when using floating points with limited precision. Do not simplify!
+ /*
+ * According algebraic laws, 'lowBits' should always been zero. But it is
+ * not when using floating points with limited precision. Do not simplify!
+ */
double y = sample + lowBits;
lowBits = y + (sum - (sum += y));
@@ -287,7 +290,7 @@ public class Statistics implements Doubl
* For very large integer values (greater than 2<sup>52</sup> in magnitude),
* this method may be more accurate than the {@link #accept(double)} version.
*
- * @param sample The sample value.
+ * @param sample the sample value.
*
* @see #accept(double)
* @see #combine(Statistics)
@@ -302,7 +305,7 @@ public class Statistics implements Doubl
* Invoking this method is equivalent (except for rounding errors) to invoking
* {@link #accept(double) accept(…)} for all samples that were added to {@code stats}.
*
- * @param stats The statistics to be added to {@code this}.
+ * @param stats the statistics to be added to {@code this}.
*/
public void combine(final Statistics stats) {
ArgumentChecks.ensureNonNull("stats", stats);
@@ -331,7 +334,7 @@ public class Statistics implements Doubl
* sample values. See {@link #differences()} or {@link #forSeries forSeries(…)} for more
* information.</p>
*
- * @param factor The factor by which to multiply the statistics.
+ * @param factor the factor by which to multiply the statistics.
*/
public void scale(double factor) {
ArgumentChecks.ensureFinite("factor", factor);
@@ -356,16 +359,16 @@ public class Statistics implements Doubl
* {@code NaN} samples are ignored in all other statistical computation.
* This method count them for information purpose only.
*
- * @return The number of NaN values.
+ * @return the number of NaN values.
*/
public int countNaN() {
- return max(countNaN, 0); // The Delta subclass initializes countNaN to -1.
+ return max(countNaN, 0); // The Delta subclass initializes countNaN to -1.
}
/**
* Returns the number of samples, excluding {@link Double#NaN NaN} values.
*
- * @return The number of sample values, excluding NaN.
+ * @return the number of sample values, excluding NaN.
*/
public int count() {
return count;
@@ -374,7 +377,7 @@ public class Statistics implements Doubl
/**
* Returns the minimum sample value, or {@link Double#NaN NaN} if none.
*
- * @return The minimum sample value, or NaN if none.
+ * @return the minimum sample value, or NaN if none.
*/
public double minimum() {
return minimum;
@@ -383,7 +386,7 @@ public class Statistics implements Doubl
/**
* Returns the maximum sample value, or {@link Double#NaN NaN} if none.
*
- * @return The maximum sample value, or NaN if none.
+ * @return the maximum sample value, or NaN if none.
*/
public double maximum() {
return maximum;
@@ -393,7 +396,7 @@ public class Statistics implements Doubl
* Equivalents to <code>{@link #maximum() maximum} - {@link #minimum() minimum}</code>.
* If no samples were added, then returns {@link Double#NaN NaN}.
*
- * @return The span of sample values, or NaN if none.
+ * @return the span of sample values, or NaN if none.
*/
public double span() {
return maximum - minimum;
@@ -402,7 +405,7 @@ public class Statistics implements Doubl
/**
* Returns the sum, or 0 if none.
*
- * @return The sum, or 0 if none.
+ * @return the sum, or 0 if none.
*/
public double sum() {
return sum;
@@ -411,7 +414,7 @@ public class Statistics implements Doubl
/**
* Returns the mean value, or {@link Double#NaN NaN} if none.
*
- * @return The mean value, or NaN if none.
+ * @return the mean value, or NaN if none.
*/
public double mean() {
return sum / count;
@@ -420,7 +423,7 @@ public class Statistics implements Doubl
/**
* Returns the root mean square, or {@link Double#NaN NaN} if none.
*
- * @return The root mean square, or NaN if none.
+ * @return the root mean square, or NaN if none.
*/
public double rms() {
return sqrt(squareSum / count);
@@ -448,10 +451,9 @@ public class Statistics implements Doubl
* <tr><td>3.0</td><td>99.9%</td><td>100%</td></tr>
* </table>
*
- * @param allPopulation
- * {@code true} if sample values given to {@code accept(…)} methods were the totality
- * of the population under study, or {@code false} if they were only a sampling.
- * @return The standard deviation.
+ * @param allPopulation {@code true} if sample values given to {@code accept(…)} methods were the totality
+ * of the population under study, or {@code false} if they were only a sampling.
+ * @return the standard deviation.
*/
public double standardDeviation(final boolean allPopulation) {
return sqrt((squareSum - sum*sum/count) / (allPopulation ? count : count-1));
@@ -479,7 +481,7 @@ public class Statistics implements Doubl
* More generally, calls to this method can be chained up to {@code differenceNames.length} times for
* fetching second or higher order derivatives, as in the above example.
*
- * @return The statistics on the differences between consecutive sample values,
+ * @return the statistics on the differences between consecutive sample values,
* or {@code null} if not calculated by this object.
*
* @see #forSeries(CharSequence, CharSequence[])
@@ -502,7 +504,7 @@ public class Statistics implements Doubl
* Standard deviation: 6.489
* }
*
- * @return A string representation of this statistics object.
+ * @return a string representation of this statistics object.
*
* @see StatisticsFormat
*/
@@ -514,7 +516,7 @@ public class Statistics implements Doubl
/**
* Returns a clone of this statistics.
*
- * @return A clone of this statistics.
+ * @return a clone of this statistics.
*/
@Override
public Statistics clone() {
@@ -541,7 +543,7 @@ public class Statistics implements Doubl
/**
* Compares this statistics with the specified object for equality.
*
- * @param object The object to compare with.
+ * @param object the object to compare with.
* @return {@code true} if both objects are equal.
*/
@Override
@@ -611,13 +613,13 @@ public class Statistics implements Doubl
* consecutive sample values. Other kinds of {@link Statistics} object could be
* chained as well.
*
- * @param name The phenomenon for which this object is collecting statistics, or {@code null}.
- * @param delta The object where to stores delta statistics.
+ * @param name the phenomenon for which this object is collecting statistics, or {@code null}.
+ * @param delta the object where to stores delta statistics.
*/
WithDelta(final CharSequence name, final Statistics delta) {
super(name);
this.delta = delta;
- delta.decrementCountNaN(); // Do not count the first NaN, which will always be the first value.
+ delta.decrementCountNaN(); // Do not count the first NaN, which will always be the first value.
}
/**
@@ -627,7 +629,7 @@ public class Statistics implements Doubl
public void reset() {
super.reset();
delta.reset();
- delta.decrementCountNaN(); // Do not count the first NaN, which will always be the first value.
+ delta.decrementCountNaN(); // Do not count the first NaN, which will always be the first value.
last = NaN;
lastAsLong = 0;
}
@@ -654,12 +656,16 @@ public class Statistics implements Doubl
public void accept(final long sample) {
super.accept(sample);
if (last == (double) lastAsLong) {
- // 'lastAsLong' may have more precision than 'last' since the cast to the
- // 'double' type may loose some digits. Invoke the 'delta.accept(long)' version.
+ /*
+ * 'lastAsLong' may have more precision than 'last' since the cast to the
+ * 'double' type may loose some digits. Invoke the 'delta.accept(long)' version.
+ */
delta.accept(sample - lastAsLong);
} else {
- // The sample value is either fractional, outside 'long' range,
- // infinity or NaN. Invoke the 'delta.accept(double)' version.
+ /*
+ * The sample value is either fractional, outside 'long' range,
+ * infinity or NaN. Invoke the 'delta.accept(double)' version.
+ */
delta.accept(sample - last);
}
last = sample;
@@ -669,8 +675,7 @@ public class Statistics implements Doubl
/**
* Update statistics with all samples from the specified {@code stats}.
*
- * @throws ClassCastException If {@code stats} is not an instance of
- * {@code Statistics.Delta}.
+ * @throws ClassCastException if {@code stats} is not an instance of {@code Statistics.Delta}.
*/
@Override
public void combine(final Statistics stats) throws ClassCastException {
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -51,6 +51,7 @@ import static java.lang.Math.*;
* @version 0.3
* @module
*/
+@SuppressWarnings("CloneableClassWithoutClone") // Because this class does not contain field that need to be cloned.
public class StatisticsFormat extends TabularFormat<Statistics> {
/**
* For cross-version compatibility.
@@ -90,7 +91,7 @@ public class StatisticsFormat extends Ta
/**
* Returns an instance for the current system default locale.
*
- * @return A statistics format instance for the current default locale.
+ * @return a statistics format instance for the current default locale.
*/
public static StatisticsFormat getInstance() {
return new StatisticsFormat(
@@ -101,8 +102,8 @@ public class StatisticsFormat extends Ta
/**
* Returns an instance for the given locale.
*
- * @param locale The locale for which to get a {@code StatisticsFormat} instance.
- * @return A statistics format instance for the given locale.
+ * @param locale the locale for which to get a {@code StatisticsFormat} instance.
+ * @return a statistics format instance for the given locale.
*/
public static StatisticsFormat getInstance(final Locale locale) {
return new StatisticsFormat(locale, locale, null);
@@ -112,10 +113,10 @@ public class StatisticsFormat extends Ta
* Constructs a new format for the given numeric and header locales.
* The timezone is used only if the values added to the {@link Statistics} are dates.
*
- * @param locale The locale to use for numbers, dates and angles formatting,
- * or {@code null} for the {@linkplain Locale#ROOT root locale}.
- * @param headerLocale The locale for row and column headers. Usually same as {@code locale}.
- * @param timezone The timezone, or {@code null} for UTC.
+ * @param locale the locale to use for numbers, dates and angles formatting,
+ * or {@code null} for the {@linkplain Locale#ROOT root locale}.
+ * @param headerLocale the locale for row and column headers. Usually same as {@code locale}.
+ * @param timezone the timezone, or {@code null} for UTC.
*/
public StatisticsFormat(final Locale locale, final Locale headerLocale, final TimeZone timezone) {
super(locale, timezone);
@@ -131,8 +132,8 @@ public class StatisticsFormat extends Ta
* used for all values below the header row.</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}).
*
* @since 0.4
*/
@@ -172,8 +173,8 @@ public class StatisticsFormat extends Ta
* Sets whether this formatter shall consider that the statistics where computed using
* the totality of the populations under study. The default value is {@code false}.
*
- * @param allPopulation {@code true} if the statistics to format where computed
- * using the totality of the populations under study.
+ * @param allPopulation {@code true} if the statistics to format where computed using
+ * the totality of the populations under study.
*
* @see Statistics#standardDeviation(boolean)
*/
@@ -185,7 +186,7 @@ public class StatisticsFormat extends Ta
* Returns the "width" of the border to drawn around the table, in number of lines.
* The default width is 0, which stands for no border.
*
- * @return The border "width" in number of lines.
+ * @return the border "width" in number of lines.
*/
public int getBorderWidth() {
return borderWidth;
@@ -201,7 +202,7 @@ public class StatisticsFormat extends Ta
* <li>2 for double lines ({@code ║},{@code ═})</li>
* </ul>
*
- * @param borderWidth The border width, in number of lines.
+ * @param borderWidth the border width, in number of lines.
*/
public void setBorderWidth(final int borderWidth) {
ArgumentChecks.ensureBetween("borderWidth", 0, 2, borderWidth);
@@ -211,8 +212,8 @@ public class StatisticsFormat extends Ta
/**
* Not yet implemented.
*
- * @return Currently never return.
- * @throws ParseException Currently never thrown.
+ * @return currently never return.
+ * @throws ParseException currently never thrown.
*/
@Override
public Statistics parse(CharSequence text, ParsePosition pos) throws ParseException {
@@ -228,10 +229,10 @@ public class StatisticsFormat extends Ta
* <li>{@link #format(Statistics[], Appendable)}</li>
* </ul>
*
- * @param object The object to format.
- * @param toAppendTo Where to format the object.
- * @param pos Ignored in current implementation.
- * @return The given buffer, returned for convenience.
+ * @param object the object to format.
+ * @param toAppendTo where to format the object.
+ * @param pos ignored in current implementation.
+ * @return the given buffer, returned for convenience.
*/
@Override
public StringBuffer format(final Object object, final StringBuffer toAppendTo, final FieldPosition pos) {
@@ -251,9 +252,9 @@ public class StatisticsFormat extends Ta
* If statistics on {@linkplain Statistics#differences() differences}
* are associated to the given object, they will be formatted too.
*
- * @param stats The statistics to format.
- * @param toAppendTo Where to format the statistics.
- * @throws IOException If an error occurred while writing to the given appendable.
+ * @param stats the statistics to format.
+ * @param toAppendTo where to format the statistics.
+ * @throws IOException if an error occurred while writing to the given appendable.
*/
@Override
public void format(Statistics stats, final Appendable toAppendTo) throws IOException {
@@ -270,9 +271,9 @@ public class StatisticsFormat extends Ta
* for the statistics on {@linkplain Statistics#differences() differences} - if
* such statistics are wanted, they must be included in the given array.
*
- * @param stats The statistics to format.
- * @param toAppendTo Where to format the statistics.
- * @throws IOException If an error occurred while writing to the given appendable.
+ * @param stats the statistics to format.
+ * @param toAppendTo where to format the statistics.
+ * @throws IOException if an error occurred while writing to the given appendable.
*/
public void format(final Statistics[] stats, final Appendable toAppendTo) throws IOException {
/*
@@ -326,7 +327,7 @@ public class StatisticsFormat extends Ta
*/
final Format format = getFormat(Double.class);
if (format instanceof DecimalFormat) {
- ((DecimalFormat) format).applyPattern("#0"); // Also disable scientific notation.
+ ((DecimalFormat) format).applyPattern("#0"); // Also disable scientific notation.
} else if (format instanceof NumberFormat) {
setFractionDigits((NumberFormat) format, 0);
}
@@ -400,8 +401,8 @@ public class StatisticsFormat extends Ta
* their standard deviation. It can be used for reasonable default formatting when the user
* didn't specify an explicit one.
*
- * @param format The formatter to configure.
- * @param stats The statistics for which to configure the formatter.
+ * @param format the formatter to configure.
+ * @param stats the statistics for which to configure the formatter.
*/
private void configure(final Format format, final Statistics stats) {
final double minimum = stats.minimum();
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -432,8 +432,8 @@ public class AngleFormat extends Format
* Constructs a new {@code AngleFormat} using the specified pattern and locale.
*
* @param pattern the pattern to use for parsing and formatting angles.
- * See class description for an explanation of pattern syntax.
- * @param locale Locale to use.
+ * See class description for an explanation of pattern syntax.
+ * @param locale the locale to use.
* @throws IllegalArgumentException if the specified pattern is illegal.
*/
public AngleFormat(final String pattern, final Locale locale) throws IllegalArgumentException {
@@ -699,7 +699,7 @@ public class AngleFormat extends Format
buffer.appendCodePoint(symbols[OPTIONAL_FIELD]);
}
if (width <= 0) {
- break; // The "if" case above has been executed for writing the fractional part, so we are done.
+ break; // The "if" case above has been executed for writing the fractional part, so we are done.
}
/*
* This is the main part of the loop, before the final fractional part handled in the above "if" case.
@@ -941,9 +941,11 @@ public class AngleFormat extends Format
minutes = 0;
degrees += Math.signum(angle);
}
- // Note: a previous version was doing a unconditional addition to the 'degrees' variable,
- // in the form 'degrees += correction'. However -0.0 + 0 == +0.0, while we really need to
- // preserve the sign of negative zero. See [SIS-120].
+ /*
+ * Note: a previous version was doing a unconditional addition to the 'degrees' variable,
+ * in the form 'degrees += correction'. However -0.0 + 0 == +0.0, while we really need to
+ * preserve the sign of negative zero. See [SIS-120].
+ */
}
/*
* Avoid formatting values like 12.01°N as 12°36″N because of the risk of confusion.
@@ -1039,9 +1041,11 @@ public class AngleFormat extends Format
if (hasMore) {
userObject = JDK8.toIntExact(Math.round(value));
} else {
- // Use Float instead of Double because we don't want to give a false impression of accuracy
- // (when formatting the seconds field, at least the 10 last bits of the 'double' value are
- // non-significant).
+ /*
+ * Use Float instead of Double because we don't want to give a false impression of accuracy
+ * (when formatting the seconds field, at least the 10 last bits of the 'double' value are
+ * non-significant).
+ */
userObject = (float) value;
}
it.addFieldLimit(Field.forCode(field), userObject, startPosition);
@@ -1594,7 +1598,7 @@ BigBoss: switch (skipSuffix(source, p
double facteur = pow10(secondsFieldWidth);
if (degreesSuffix == null && minutesFieldWidth != 0 && isNaN(minutes)) {
///////////////////
- //// DDDMMSS.s ////
+ // DDDMMSS.s //
///////////////////
seconds = degrees;
minutes = truncate(degrees / facteur);
@@ -1604,7 +1608,7 @@ BigBoss: switch (skipSuffix(source, p
minutes -= degrees * facteur;
} else {
////////////////////
- //// DDD°MMSS.s ////
+ // DDD°MMSS.s //
////////////////////
seconds = minutes;
minutes = truncate(minutes / facteur);
@@ -1612,7 +1616,7 @@ BigBoss: switch (skipSuffix(source, p
}
} else if (degreesSuffix == null && minutesFieldWidth != 0 && isNaN(minutes)) {
/////////////////
- //// DDDMM.m ////
+ // DDDMM.m //
/////////////////
final double facteur = pow10(minutesFieldWidth);
minutes = degrees;
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/ElevationAngle.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/ElevationAngle.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/ElevationAngle.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/ElevationAngle.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -16,7 +16,7 @@
*/
package org.apache.sis.measure;
-import org.opengis.referencing.cs.AxisDirection; // For javadoc
+import org.opengis.referencing.cs.AxisDirection; // For javadoc
/**
@@ -60,7 +60,7 @@ public final class ElevationAngle extend
/**
* Constructs a new elevation angle with the specified angular value.
*
- * @param ε Elevation angle value in decimal degrees.
+ * @param ε elevation angle value in decimal degrees.
*/
public ElevationAngle(final double ε) {
super(ε);
@@ -71,7 +71,7 @@ public final class ElevationAngle extend
* represented by the string. The string should represent an angle in either fractional degrees
* (e.g. 45.5°) or degrees with minutes and seconds (e.g. 45°30').
*
- * @param string A string to be converted to an {@code ElevationAngle}.
+ * @param string a string to be converted to an {@code ElevationAngle}.
* @throws NumberFormatException if the string does not contain a parsable angle,
* or represents an elevation angle.
*/
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/FormatField.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/FormatField.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/FormatField.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/FormatField.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -50,8 +50,8 @@ class FormatField extends Format.Field {
/**
* Creates a new field of the given name.
*
- * @param name The name, which shall be identical to the name of the public static constant.
- * @param field The numeric identifier of this field.
+ * @param name the name, which shall be identical to the name of the public static constant.
+ * @param field the numeric identifier of this field.
*/
FormatField(final String name, final int field) {
super(name);
@@ -61,7 +61,7 @@ class FormatField extends Format.Field {
/**
* Invoked on deserialization for resolving this instance to one of the predefined constants.
*
- * @return One of the predefined constants.
+ * @return one of the predefined constants.
* @throws InvalidObjectException if this instance can not be resolved.
*/
@Override
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -51,6 +51,7 @@ import org.apache.sis.internal.simple.Si
* @version 0.3
* @module
*/
+@SuppressWarnings("CloneableClassWithoutClone") // Not needed - see comment about clone() at the end of this file.
final class FormattedCharacterIterator extends SimpleCharacterIterator implements AttributedCharacterIterator {
/**
* For cross-version compatibility.
@@ -80,7 +81,7 @@ final class FormattedCharacterIterator e
* <li>{@link #limit} is 3.</li>
* </ul>
*/
- private static final class Entry {
+ private static final class Entry implements Serializable {
/**
* For cross-version compatibility.
*/
@@ -106,6 +107,7 @@ final class FormattedCharacterIterator e
* Creates a new entry for the given value, together with the range of index where
* the field value has been formatted. See class javadoc for more information.
*/
+ @SuppressWarnings("ThisEscapedInObjectConstruction")
Entry(final Attribute field, final Object value, final int start, final int limit,
final Map<Attribute,Entry> attributes)
{
@@ -151,7 +153,7 @@ final class FormattedCharacterIterator e
/**
* Creates a new character iterator for the given character sequence.
*
- * @param text The formatted text. Can be a {@link StringBuilder} to be filled later.
+ * @param text the formatted text. Can be a {@link StringBuilder} to be filled later.
*/
FormattedCharacterIterator(final CharSequence text) {
super(text);
@@ -164,20 +166,22 @@ final class FormattedCharacterIterator e
* {@linkplain #text} length, exclusive.
*/
final void addFieldLimit(final Attribute field, final Object value, final int start) {
- // The Entry constructor adds itself to the attributes map.
- // The returned intance is used only for assertions checks.
+ /*
+ * The Entry constructor adds itself to the attributes map.
+ * The returned intance is used only for assertions checks.
+ */
Entry e = new Entry(field, value, start, upper = text.length(), attributes);
- assert ((e = e.previous) == null) || (start >= e.limit); // Check for non-overlapping fields.
+ assert ((e = e.previous) == null) || (start >= e.limit); // Check for non-overlapping fields.
}
/**
* Appends all characters and attributes from the given iterator.
*
- * @param toAppendTo Shall be the same instance than {@link #text}.
+ * @param toAppendTo shall be the same instance than {@link #text}.
*/
final void append(final AttributedCharacterIterator it, final StringBuffer toAppendTo) {
final int offset = toAppendTo.length();
- int currentRunLimit = 0; // Next index where to check for attributes.
+ int currentRunLimit = 0; // Next index where to check for attributes.
for (char c=it.first(); c!=DONE; c=it.next()) {
toAppendTo.append(c);
if (it.getIndex() == currentRunLimit) {
@@ -185,9 +189,9 @@ final class FormattedCharacterIterator e
for (final Map.Entry<Attribute,Object> entry : it.getAttributes().entrySet()) {
final Attribute attribute = entry.getKey();
if (it.getRunLimit(attribute) == currentRunLimit) {
- new Entry(attribute, entry.getValue(), // Constructeur adds itself to the map.
- offset + it.getRunStart(attribute),
- offset + currentRunLimit, attributes);
+ final Entry e = new Entry(attribute, entry.getValue(), // Constructeur adds itself to the map.
+ offset + it.getRunStart(attribute),
+ offset + currentRunLimit, attributes);
}
}
}
@@ -199,9 +203,9 @@ final class FormattedCharacterIterator e
* Ensures that the {@link #start}, {@link #limit} and {@link #attributes} fields
* are valid for the current index position and the given attribute.
*
- * @param attribute The attribute which shall have the same value in the run range.
- * @param entries The entries on which to iterate for computing the run range.
- * Mandatory if {@code attribute} is {@code null}.
+ * @param attribute the attribute which shall have the same value in the run range.
+ * @param entries the entries on which to iterate for computing the run range.
+ * Mandatory if {@code attribute} is {@code null}.
*/
private void update(final Attribute attribute, Collection<Entry> entries) {
final int index = getIndex();
@@ -405,7 +409,7 @@ final class FormattedCharacterIterator e
@Override
public Object getAttribute(final Attribute attribute) {
final int index = getIndex();
- for (Entry e=attributes.get(attribute); e!=null; e=e.previous) {
+ for (Entry e = attributes.get(attribute); e != null; e = e.previous) {
if (index >= e.start && index < e.limit) {
return e.value;
}
@@ -417,6 +421,7 @@ final class FormattedCharacterIterator e
* Returns the keys of all attributes defined in the iterator text range.
*/
@Override
+ @SuppressWarnings("ReturnOfCollectionOrArrayField") // Safe because immutable.
public Set<Attribute> getAllAttributeKeys() {
if (attributeKeys == null) {
attributeKeys = Collections.unmodifiableSet(attributes.keySet());
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -76,7 +76,7 @@ public final class Latitude extends Angl
/**
* Construct a new latitude with the specified angular value.
*
- * @param φ Latitude value in decimal degrees.
+ * @param φ latitude value in decimal degrees.
*/
public Latitude(final double φ) {
super(φ);
@@ -92,7 +92,7 @@ public final class Latitude extends Angl
* locale. Developers should consider using {@link AngleFormat} for end-user applications
* instead than this constructor.</p>
*
- * @param string A string to be converted to a {@code Latitude}.
+ * @param string a string to be converted to a {@code Latitude}.
* @throws NumberFormatException if the string does not contain a parsable angle,
* or represents a longitude angle.
*
@@ -132,8 +132,8 @@ public final class Latitude extends Angl
* <li>±0 are returned unchanged (i.e. the sign of negative and positive zero is preserved)</li>
* </ul>
*
- * @param φ The latitude value in decimal degrees.
- * @return The given value clamped to the [-90 … 90]° range, or NaN if the given value was NaN.
+ * @param φ the latitude value in decimal degrees.
+ * @return the given value clamped to the [-90 … 90]° range, or NaN if the given value was NaN.
*
* @see Longitude#normalize(double)
*
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Longitude.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Longitude.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Longitude.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Longitude.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -62,7 +62,7 @@ public final class Longitude extends Ang
* Construct a new longitude with the specified angular value.
* This constructor does <strong>not</strong> {@linkplain #normalize(double) normalize} the given value.
*
- * @param λ Longitude value in decimal degrees.
+ * @param λ longitude value in decimal degrees.
*/
public Longitude(final double λ) {
super(λ);
@@ -78,7 +78,7 @@ public final class Longitude extends Ang
* locale. Developers should consider using {@link AngleFormat} for end-user applications
* instead than this constructor.</p>
*
- * @param string A string to be converted to a {@code Longitude}.
+ * @param string a string to be converted to a {@code Longitude}.
* @throws NumberFormatException if the string does not contain a parsable angle,
* or represents a longitude angle.
*
@@ -112,8 +112,8 @@ public final class Longitude extends Ang
*
* Note that the given value should not be greater than 4×10⁸ degrees if a centimetric precision is desired.
*
- * @param λ The longitude value in decimal degrees.
- * @return The given value normalized to the [-180 … 180)° range, or NaN if the given value was NaN of infinite.
+ * @param λ the longitude value in decimal degrees.
+ * @return the given value normalized to the [-180 … 180)° range, or NaN if the given value was NaN of infinite.
*
* @see Latitude#clamp(double)
*
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -608,7 +608,7 @@ public class NumberRange<E extends Numbe
* then delegates to {@link #intersect(Range)}.
*
* @param range the range to add to this range.
- * @return The union of this range with the given 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.
*/
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -16,6 +16,7 @@
*/
package org.apache.sis.measure;
+import java.util.Objects;
import java.util.Formatter;
import java.util.Formattable;
import java.util.FormattableFlags;
@@ -27,9 +28,6 @@ import org.apache.sis.util.ArgumentCheck
import org.apache.sis.util.Emptiable;
import org.apache.sis.util.Numbers;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* A set of minimum and maximum values of a certain class, allowing
@@ -79,7 +77,7 @@ import java.util.Objects;
* and thus inherently thread-safe. Other subclasses may or may not be immutable, at implementation choice.
* But implementors are encouraged to make sure that all subclasses remain immutable for more predictable behavior.
*
- * @param <E> The type of range elements, typically a {@link Number} subclass or {@link java.util.Date}.
+ * @param <E> the type of range elements, typically a {@link Number} subclass or {@link java.util.Date}.
*
* @author Joe White
* @author Martin Desruisseaux (Geomatys)
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/ValueRange.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/ValueRange.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/ValueRange.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/ValueRange.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -83,7 +83,7 @@ public @interface ValueRange {
* {@linkplain Double#NEGATIVE_INFINITY negative infinity}, which means that
* there is no minimal value.
*
- * @return The minimal value.
+ * @return the minimal value.
*/
double minimum() default Double.NEGATIVE_INFINITY;
@@ -100,7 +100,7 @@ public @interface ValueRange {
* {@linkplain Double#POSITIVE_INFINITY positive infinity}, which means that
* there is no maximal value.
*
- * @return The maximal value.
+ * @return the maximal value.
*/
double maximum() default Double.POSITIVE_INFINITY;
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/InstallationResources.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -76,7 +76,7 @@ public abstract class InstallationResour
* This method may return an empty set if this {@code InstallationResources} instance did not find the
* resources (for example because of files not found) or does not have the permission to distribute them.
*
- * @return Identifiers of resources that this instance can distribute.
+ * @return identifiers of resources that this instance can distribute.
*/
public abstract Set<String> getAuthorities();
@@ -89,10 +89,10 @@ public abstract class InstallationResour
* <a href="http://www.epsg.org/TermsOfUse">http://www.epsg.org/TermsOfUse</a> page.
* </div>
*
- * @param authority One of the values returned by {@link #getAuthorities()}.
- * @param locale The preferred locale for the terms of use.
- * @param mimeType Either {@code "text/plain"} or {@code "text/html"}.
- * @return The terms of use in plain text or HTML, or {@code null} if none.
+ * @param authority one of the values returned by {@link #getAuthorities()}.
+ * @param locale the preferred locale for the terms of use.
+ * @param mimeType either {@code "text/plain"} or {@code "text/html"}.
+ * @return the terms of use in plain text or HTML, or {@code null} if none.
* @throws IllegalArgumentException if the given {@code authority} argument is not one of the expected values.
* @throws IOException if an error occurred while reading the license file.
*/
@@ -108,8 +108,8 @@ public abstract class InstallationResour
* followed by a script that creates foreigner keys.
* </div>
*
- * @param authority One of the values returned by {@link #getAuthorities()}.
- * @return The names of all resources of the given authority that are distributed by this instance.
+ * @param authority one of the values returned by {@link #getAuthorities()}.
+ * @return the names of all resources of the given authority that are distributed by this instance.
* @throws IllegalArgumentException if the given {@code authority} argument is not one of the expected values.
* @throws IOException if fetching the resource names required an I/O operation and that operation failed.
*/
@@ -120,10 +120,10 @@ public abstract class InstallationResour
* The resource may be a SQL script or any other resources readable as a text.
* The returned {@link BufferedReader} instance shall be closed by the caller.
*
- * @param authority One of the values returned by {@link #getAuthorities()}.
- * @param resource Index of the script to open, from 0 inclusive to
+ * @param authority one of the values returned by {@link #getAuthorities()}.
+ * @param resource index of the script to open, from 0 inclusive to
* <code>{@linkplain #getResourceNames(String) getResourceNames}(authority).length</code> exclusive.
- * @return A reader for the installation script content.
+ * @return a reader for the installation script content.
* @throws IllegalArgumentException if the given {@code authority} argument is not one of the expected values.
* @throws IndexOutOfBoundsException if the given {@code resource} argument is out of bounds.
* @throws IOException if an error occurred while creating the reader.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -16,7 +16,7 @@
*/
package org.apache.sis.util;
-import java.util.Map; // For javadoc
+import java.util.Map; // For javadoc
import org.opengis.referencing.cs.CoordinateSystem;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.geometry.Envelope;
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -17,12 +17,10 @@
package org.apache.sis.util;
import java.util.Arrays;
+import java.util.Objects;
import java.util.Comparator;
import java.lang.reflect.Array;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* Static methods for simple operations on arrays and array elements.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -91,16 +91,6 @@ public final class CharSequences extends
* of length 4. Strings are constructed only when first needed.
*/
private static final String[] SPACES = new String[10];
- static {
- // Our 'spaces(int)' method will invoke 'substring' on the longuest string in an attempt
- // to share the same char[] array. Note however that array sharing has been removed from
- // JDK8, which copy every char[] arrays anyway. Consequently the JDK8 branch will abandon
- // this strategy and build the char[] array on the fly.
- final int last = SPACES.length - 1;
- final char[] spaces = new char[last+1];
- Arrays.fill(spaces, ' ');
- SPACES[last] = new String(spaces).intern();
- }
/**
* Do not allow instantiation of this class.
@@ -141,10 +131,12 @@ public final class CharSequences extends
return "";
}
if (length < SPACES.length) {
- String s = SPACES[length-1];
+ String s = SPACES[length - 1];
if (s == null) {
- s = SPACES[SPACES.length - 1].substring(0, length).intern();
- SPACES[length-1] = s;
+ final char[] spaces = new char[length];
+ Arrays.fill(spaces, ' ');
+ s = new String(spaces).intern();
+ SPACES[length - 1] = s;
}
return s;
}
@@ -956,7 +948,7 @@ search: for (; fromIndex <= toIndex;
* but is overloaded for the {@code String} type because of its frequent use.</p>
*
* @param text the text from which to remove leading and trailing whitespaces, or {@code null}.
- * @return A string with leading and trailing whitespaces removed, or {@code null} is the given
+ * @return a string with leading and trailing whitespaces removed, or {@code null} is the given
* text was null.
*/
public static String trimWhitespaces(String text) {
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -212,8 +212,10 @@ public final class Classes extends Stati
* Check if we have an array, then check the (component) class.
*/
if (type instanceof ParameterizedType) {
- // Example: replace ParameterDescriptor<?> by ParameterDescriptor
- // before we test if (type instanceof Class<?>).
+ /*
+ * Example: replace ParameterDescriptor<?> by ParameterDescriptor
+ * before we test if (type instanceof Class<?>).
+ */
type = ((ParameterizedType) type).getRawType();
}
int dimension = 0;
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CorruptedObjectException.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CorruptedObjectException.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CorruptedObjectException.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CorruptedObjectException.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -78,7 +78,7 @@ public class CorruptedObjectException ex
/**
* Constructs a new exception with the specified detail message.
*
- * @param message The detail message, or {@code null} if none.
+ * @param message the detail message, or {@code null} if none.
*/
public CorruptedObjectException(final String message) {
super(message);
@@ -87,7 +87,7 @@ public class CorruptedObjectException ex
/**
* Constructs a new exception with the name of the given object.
*
- * @param object The corrupted object, or {@code null} if unknown.
+ * @param object the corrupted object, or {@code null} if unknown.
*
* @since 0.6
*/
|