sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1758925 - /sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
Date Fri, 02 Sep 2016 09:54:51 GMT
Author: desruisseaux
Date: Fri Sep  2 09:54:51 2016
New Revision: 1758925

URL: http://svn.apache.org/viewvc?rev=1758925&view=rev
Log:
Javadoc formatting (no code change in this commit).

Modified:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java?rev=1758925&r1=1758924&r2=1758925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
[UTF-8] Fri Sep  2 09:54:51 2016
@@ -128,8 +128,8 @@ public final class CharSequences extends
      * Since the <var>used width</var> value may be greater than expected, this
method handle negative {@code length}
      * values as if the value was zero.
      *
-     * @param  length The string length. Negative values are clamped to 0.
-     * @return A string of length {@code length} filled with white spaces.
+     * @param  length  the string length. Negative values are clamped to 0.
+     * @return a string of length {@code length} filled with white spaces.
      */
     public static CharSequence spaces(final int length) {
         /*
@@ -176,8 +176,8 @@ public final class CharSequences extends
      * Returns the {@linkplain CharSequence#length() length} of the given characters sequence,
      * or 0 if {@code null}.
      *
-     * @param  text The character sequence from which to get the length, or {@code null}.
-     * @return The length of the character sequence, or 0 if the argument is {@code null}.
+     * @param  text  the character sequence from which to get the length, or {@code null}.
+     * @return the length of the character sequence, or 0 if the argument is {@code null}.
      */
     public static int length(final CharSequence text) {
         return (text != null) ? text.length() : 0;
@@ -188,8 +188,8 @@ public final class CharSequences extends
      * or 0 if {@code null}. Unpaired surrogates within the text count as one code
      * point each.
      *
-     * @param  text The character sequence from which to get the count, or {@code null}.
-     * @return The number of Unicode code points, or 0 if the argument is {@code null}.
+     * @param  text  the character sequence from which to get the count, or {@code null}.
+     * @return the number of Unicode code points, or 0 if the argument is {@code null}.
      *
      * @see #codePointCount(CharSequence, int, int)
      */
@@ -217,10 +217,10 @@ public final class CharSequences extends
      * to delegate to the optimized methods from the {@link String}, {@link StringBuilder},
      * {@link StringBuffer} or {@link CharBuffer} classes if possible.</p>
      *
-     * @param  text      The character sequence from which to get the count, or {@code null}.
-     * @param  fromIndex The index from which to start the computation.
-     * @param  toIndex   The index after the last character to take in account.
-     * @return The number of Unicode code points, or 0 if the argument is {@code null}.
+     * @param  text       the character sequence from which to get the count, or {@code null}.
+     * @param  fromIndex  the index from which to start the computation.
+     * @param  toIndex    the index after the last character to take in account.
+     * @return the number of Unicode code points, or 0 if the argument is {@code null}.
      *
      * @see Character#codePointCount(CharSequence, int, int)
      * @see String#codePointCount(int, int)
@@ -245,13 +245,13 @@ public final class CharSequences extends
      * Returns the number of occurrences of the {@code toSearch} string in the given {@code
text}.
      * The search is case-sensitive.
      *
-     * @param  text The character sequence to count occurrences, or {@code null}.
-     * @param  toSearch The string to search in the given {@code text}.
-     *         It shall contain at least one character.
-     * @return The number of occurrences of {@code toSearch} in {@code text},
+     * @param  text      the character sequence to count occurrences, or {@code null}.
+     * @param  toSearch  the string to search in the given {@code text}.
+     *                   It shall contain at least one character.
+     * @return the number of occurrences of {@code toSearch} in {@code text},
      *         or 0 if {@code text} was null or empty.
-     * @throws NullArgumentException If the {@code toSearch} argument is null.
-     * @throws IllegalArgumentException If the {@code toSearch} argument is empty.
+     * @throws NullArgumentException if the {@code toSearch} argument is null.
+     * @throws IllegalArgumentException if the {@code toSearch} argument is empty.
      */
     public static int count(final CharSequence text, final String toSearch) {
         ArgumentChecks.ensureNonEmpty("toSearch", toSearch);
@@ -274,9 +274,9 @@ public final class CharSequences extends
     /**
      * Counts the number of occurrence of the given character in the given character sequence.
      *
-     * @param  text The character sequence to count occurrences, or {@code null}.
-     * @param  toSearch The character to count.
-     * @return The number of occurrences of the given character, or 0 if the {@code text}
is null.
+     * @param  text      the character sequence to count occurrences, or {@code null}.
+     * @param  toSearch  the character to count.
+     * @return the number of occurrences of the given character, or 0 if the {@code text}
is null.
      */
     public static int count(final CharSequence text, final char toSearch) {
         int n = 0;
@@ -313,14 +313,14 @@ public final class CharSequences extends
      * from 0 or {@code toIndex} respectively. This is consistent with the
      * {@link String#indexOf(String, int)} behavior.
      *
-     * @param  text      The string in which to perform the search.
-     * @param  toSearch  The substring for which to search.
-     * @param  fromIndex The index from which to start the search.
-     * @param  toIndex   The index after the last character where to perform the search.
-     * @return The index within the text of the first occurrence of the specified part, starting
at the specified
-     *         index, or -1 if no occurrence has been found or if the {@code text} argument
is null.
-     * @throws NullArgumentException If the {@code toSearch} argument is null.
-     * @throws IllegalArgumentException If the {@code toSearch} argument is empty.
+     * @param  text       the string in which to perform the search.
+     * @param  toSearch   the substring for which to search.
+     * @param  fromIndex  the index from which to start the search.
+     * @param  toIndex    the index after the last character where to perform the search.
+     * @return the index within the text of the first occurrence of the specified part, starting
at the specified index,
+     *         or -1 if no occurrence has been found or if the {@code text} argument is null.
+     * @throws NullArgumentException if the {@code toSearch} argument is null.
+     * @throws IllegalArgumentException if the {@code toSearch} argument is empty.
      *
      * @see String#indexOf(String, int)
      * @see StringBuilder#indexOf(String, int)
@@ -372,11 +372,11 @@ search:     for (; fromIndex <= toIndex;
      * from 0 or {@code toIndex} respectively. This is consistent with the behavior documented
      * in {@link String#indexOf(int, int)}.</p>
      *
-     * @param  text      The character sequence in which to perform the search, or {@code
null}.
-     * @param  toSearch  The Unicode code point of the character to search.
-     * @param  fromIndex The index to start the search from.
-     * @param  toIndex   The index after the last character where to perform the search.
-     * @return The index of the first occurrence of the given character in the specified
sub-sequence,
+     * @param  text       the character sequence in which to perform the search, or {@code
null}.
+     * @param  toSearch   the Unicode code point of the character to search.
+     * @param  fromIndex  the index to start the search from.
+     * @param  toIndex    the index after the last character where to perform the search.
+     * @return the index of the first occurrence of the given character in the specified
sub-sequence,
      *         or -1 if no occurrence has been found or if the {@code text} argument is null.
      *
      * @see String#indexOf(int, int)
@@ -423,11 +423,11 @@ search:     for (; fromIndex <= toIndex;
      * from {@code length} or {@code fromIndex} respectively. This is consistent with the
behavior
      * documented in {@link String#lastIndexOf(int, int)}.</p>
      *
-     * @param  text      The character sequence in which to perform the search, or {@code
null}.
-     * @param  toSearch  The Unicode code point of the character to search.
-     * @param  fromIndex The index of the first character in the range where to perform the
search.
-     * @param  toIndex   The index after the last character in the range where to perform
the search.
-     * @return The index of the last occurrence of the given character in the specified sub-sequence,
+     * @param  text       the character sequence in which to perform the search, or {@code
null}.
+     * @param  toSearch   the Unicode code point of the character to search.
+     * @param  fromIndex  the index of the first character in the range where to perform
the search.
+     * @param  toIndex    the index after the last character in the range where to perform
the search.
+     * @return the index of the last occurrence of the given character in the specified sub-sequence,
      *         or -1 if no occurrence has been found or if the {@code text} argument is null.
      *
      * @see String#lastIndexOf(int, int)
@@ -478,12 +478,12 @@ search:     for (; fromIndex <= toIndex;
      * {@code text.length()} is returned. If this method reaches the beginning of
      * {@code text} while searching backward, then 0 is returned.</p>
      *
-     * @param  text      The string in which to skip a determined amount of lines.
-     * @param  numLines  The number of lines to skip. Can be positive, zero or negative.
-     * @param  fromIndex Index at which to start the search, from 0 to {@code text.length()}
inclusive.
-     * @return Index of the first character after the last skipped line.
-     * @throws NullPointerException If the {@code text} argument is null.
-     * @throws IndexOutOfBoundsException If {@code fromIndex} is out of bounds.
+     * @param  text       the string in which to skip a determined amount of lines.
+     * @param  numLines   the number of lines to skip. Can be positive, zero or negative.
+     * @param  fromIndex  index at which to start the search, from 0 to {@code text.length()}
inclusive.
+     * @return index of the first character after the last skipped line.
+     * @throws NullPointerException if the {@code text} argument is null.
+     * @throws IndexOutOfBoundsException if {@code fromIndex} is out of bounds.
      */
     public static int indexOfLineStart(final CharSequence text, int numLines, int fromIndex)
{
         final int length = text.length();
@@ -550,10 +550,10 @@ search:     for (; fromIndex <= toIndex;
      *
      * Space characters are identified by the {@link Character#isWhitespace(int)} method.
      *
-     * @param  text      The string in which to perform the search (can not be null).
-     * @param  fromIndex The index from which to start the search (can not be negative).
-     * @param  toIndex   The index after the last character where to perform the search.
-     * @return The index within the text of the first occurrence of a non-space character,
starting
+     * @param  text       the string in which to perform the search (can not be null).
+     * @param  fromIndex  the index from which to start the search (can not be negative).
+     * @param  toIndex    the index after the last character where to perform the search.
+     * @return the index within the text of the first occurrence of a non-space character,
starting
      *         at the specified index, or a value equals or greater than {@code toIndex}
if none.
      * @throws NullPointerException if the {@code text} argument is null.
      *
@@ -587,10 +587,10 @@ search:     for (; fromIndex <= toIndex;
      *
      * Space characters are identified by the {@link Character#isWhitespace(int)} method.
      *
-     * @param  text      The string in which to perform the search (can not be null).
-     * @param  fromIndex The index from which to start the search (can not be negative).
-     * @param  toIndex   The index after the last character where to perform the search.
-     * @return The index within the text of the last occurrence of a non-space character,
starting
+     * @param  text       the string in which to perform the search (can not be null).
+     * @param  fromIndex  the index from which to start the search (can not be negative).
+     * @param  toIndex    the index after the last character where to perform the search.
+     * @return the index within the text of the last occurrence of a non-space character,
starting
      *         at the specified index, or a value equals or lower than {@code fromIndex}
if none.
      * @throws NullPointerException if the {@code text} argument is null.
      *
@@ -616,8 +616,8 @@ search:     for (; fromIndex <= toIndex;
      * <p>Note that this is a undocumented SIS features. There is currently no commitment
that this implementation
      * details will not change in future version.</p>
      *
-     * @param  text The text to be splitted.
-     * @return An array where to store the result of splitting the given {@code text}.
+     * @param  text  the text to be splitted.
+     * @return an array where to store the result of splitting the given {@code text}.
      */
     private static CharSequence[] createSplitArray(final CharSequence text) {
         return (text instanceof String ||
@@ -644,9 +644,9 @@ search:     for (; fromIndex <= toIndex;
      *   <li>The leading and trailing spaces of each subsequences are trimmed.</li>
      * </ul>
      *
-     * @param  text The text to split, or {@code null}.
-     * @param  separator The delimiting character (typically the coma).
-     * @return The array of subsequences computed by splitting the given text around the
given
+     * @param  text       the text to split, or {@code null}.
+     * @param  separator  the delimiting character (typically the coma).
+     * @return the array of subsequences computed by splitting the given text around the
given
      *         character, or an empty array if {@code toSplit} was null.
      *
      * @see String#split(String)
@@ -713,8 +713,8 @@ search:     for (; fromIndex <= toIndex;
      * However this method still useful for other {@link CharSequence} implementations providing
an efficient
      * {@code subSequence(int,int)} method.</div>
      *
-     * @param  text The multi-line text from which to get the individual lines, or {@code
null}.
-     * @return The lines in the text, or an empty array if the given text was null.
+     * @param  text  the multi-line text from which to get the individual lines, or {@code
null}.
+     * @return the lines in the text, or an empty array if the given text was null.
      *
      * @see #indexOfLineStart(CharSequence, int, int)
      */
@@ -790,11 +790,11 @@ search:     for (; fromIndex <= toIndex;
      * then {@linkplain Double#parseDouble(String) parses} each item as a {@code double}.
      * Empty sub-sequences are parsed as {@link Double#NaN}.
      *
-     * @param  values    The text containing the values to parse, or {@code null}.
-     * @param  separator The delimiting character (typically the coma).
-     * @return The array of numbers parsed from the given text,
+     * @param  values     the text containing the values to parse, or {@code null}.
+     * @param  separator  the delimiting character (typically the coma).
+     * @return the array of numbers parsed from the given text,
      *         or an empty array if {@code values} was null.
-     * @throws NumberFormatException If at least one number can not be parsed.
+     * @throws NumberFormatException if at least one number can not be parsed.
      */
     public static double[] parseDoubles(final CharSequence values, final char separator)
             throws NumberFormatException
@@ -813,11 +813,11 @@ search:     for (; fromIndex <= toIndex;
      * then {@linkplain Float#parseFloat(String) parses} each item as a {@code float}.
      * Empty sub-sequences are parsed as {@link Float#NaN}.
      *
-     * @param  values    The text containing the values to parse, or {@code null}.
-     * @param  separator The delimiting character (typically the coma).
-     * @return The array of numbers parsed from the given text,
+     * @param  values     the text containing the values to parse, or {@code null}.
+     * @param  separator  the delimiting character (typically the coma).
+     * @return the array of numbers parsed from the given text,
      *         or an empty array if {@code values} was null.
-     * @throws NumberFormatException If at least one number can not be parsed.
+     * @throws NumberFormatException if at least one number can not be parsed.
      */
     public static float[] parseFloats(final CharSequence values, final char separator)
             throws NumberFormatException
@@ -835,12 +835,12 @@ search:     for (; fromIndex <= toIndex;
      * {@linkplain #split(CharSequence, char) Splits} the given text around the given character,
      * then {@linkplain Long#parseLong(String) parses} each item as a {@code long}.
      *
-     * @param  values    The text containing the values to parse, or {@code null}.
-     * @param  separator The delimiting character (typically the coma).
-     * @param  radix     The radix to be used for parsing. This is usually 10.
-     * @return The array of numbers parsed from the given text,
+     * @param  values     the text containing the values to parse, or {@code null}.
+     * @param  separator  the delimiting character (typically the coma).
+     * @param  radix      the radix to be used for parsing. This is usually 10.
+     * @return the array of numbers parsed from the given text,
      *         or an empty array if {@code values} was null.
-     * @throws NumberFormatException If at least one number can not be parsed.
+     * @throws NumberFormatException if at least one number can not be parsed.
      */
     public static long[] parseLongs(final CharSequence values, final char separator, final
int radix)
             throws NumberFormatException
@@ -857,12 +857,12 @@ search:     for (; fromIndex <= toIndex;
      * {@linkplain #split(CharSequence, char) Splits} the given text around the given character,
      * then {@linkplain Integer#parseInt(String) parses} each item as an {@code int}.
      *
-     * @param  values    The text containing the values to parse, or {@code null}.
-     * @param  separator The delimiting character (typically the coma).
-     * @param  radix     The radix to be used for parsing. This is usually 10.
-     * @return The array of numbers parsed from the given text,
+     * @param  values     the text containing the values to parse, or {@code null}.
+     * @param  separator  the delimiting character (typically the coma).
+     * @param  radix      the radix to be used for parsing. This is usually 10.
+     * @return the array of numbers parsed from the given text,
      *         or an empty array if {@code values} was null.
-     * @throws NumberFormatException If at least one number can not be parsed.
+     * @throws NumberFormatException if at least one number can not be parsed.
      */
     public static int[] parseInts(final CharSequence values, final char separator, final
int radix)
             throws NumberFormatException
@@ -879,12 +879,12 @@ search:     for (; fromIndex <= toIndex;
      * {@linkplain #split(CharSequence, char) Splits} the given text around the given character,
      * then {@linkplain Short#parseShort(String) parses} each item as a {@code short}.
      *
-     * @param  values    The text containing the values to parse, or {@code null}.
-     * @param  separator The delimiting character (typically the coma).
-     * @param  radix     The radix to be used for parsing. This is usually 10.
-     * @return The array of numbers parsed from the given text,
+     * @param  values     the text containing the values to parse, or {@code null}.
+     * @param  separator  the delimiting character (typically the coma).
+     * @param  radix      the radix to be used for parsing. This is usually 10.
+     * @return the array of numbers parsed from the given text,
      *         or an empty array if {@code values} was null.
-     * @throws NumberFormatException If at least one number can not be parsed.
+     * @throws NumberFormatException if at least one number can not be parsed.
      */
     public static short[] parseShorts(final CharSequence values, final char separator, final
int radix)
             throws NumberFormatException
@@ -901,12 +901,12 @@ search:     for (; fromIndex <= toIndex;
      * {@linkplain #split(CharSequence, char) Splits} the given text around the given character,
      * then {@linkplain Byte#parseByte(String) parses} each item as a {@code byte}.
      *
-     * @param  values    The text containing the values to parse, or {@code null}.
-     * @param  separator The delimiting character (typically the coma).
-     * @param  radix     The radix to be used for parsing. This is usually 10.
-     * @return The array of numbers parsed from the given text,
+     * @param  values     the text containing the values to parse, or {@code null}.
+     * @param  separator  the delimiting character (typically the coma).
+     * @param  radix      the radix to be used for parsing. This is usually 10.
+     * @return the array of numbers parsed from the given text,
      *         or an empty array if {@code values} was null.
-     * @throws NumberFormatException If at least one number can not be parsed.
+     * @throws NumberFormatException if at least one number can not be parsed.
      */
     public static byte[] parseBytes(final CharSequence values, final char separator, final
int radix)
             throws NumberFormatException
@@ -932,9 +932,8 @@ search:     for (; fromIndex <= toIndex;
      * for coordinate system axes like φ and λ, then the replacements depend on the enclosing
      * coordinate system. See {@link org.apache.sis.io.wkt.Transliterator} for more information.</div>
      *
-     * @param  text The text to scan for Unicode characters to replace by ASCII characters,
-     *         or {@code null}.
-     * @return The given text with substitutions applied, or {@code text} if no replacement
+     * @param  text  the text to scan for Unicode characters to replace by ASCII characters,
or {@code null}.
+     * @return the given text with substitutions applied, or {@code text} if no replacement
      *         has been applied, or {@code null} if the given text was null.
      *
      * @see StringBuilders#toASCII(StringBuilder)
@@ -955,7 +954,7 @@ search:     for (; fromIndex <= toIndex;
      * <p>This method performs the same work than {@link #trimWhitespaces(CharSequence)},
      * 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}.
+     * @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
      *         text was null.
      */
@@ -974,8 +973,8 @@ search:     for (; fromIndex <= toIndex;
      *
      * <p>This method is the generic version of {@link #trimWhitespaces(String)}.</p>
      *
-     * @param  text The text from which to remove leading and trailing whitespaces, or {@code
null}.
-     * @return A characters sequence with leading and trailing whitespaces removed,
+     * @param  text  the text from which to remove leading and trailing whitespaces, or {@code
null}.
+     * @return a characters sequence with leading and trailing whitespaces removed,
      *         or {@code null} is the given text was null.
      *
      * @see #skipLeadingWhitespaces(CharSequence, int, int)
@@ -1000,12 +999,12 @@ search:     for (; fromIndex <= toIndex;
      *     text = trimWhitespaces(text.subSequence(lower, upper));
      * }
      *
-     * @param  text  The text from which to remove leading and trailing white spaces.
-     * @param  lower Index of the first character to consider for inclusion in the sub-sequence.
-     * @param  upper Index after the last character to consider for inclusion in the sub-sequence.
-     * @return A characters sequence with leading and trailing white spaces removed, or {@code
null}
+     * @param  text   the text from which to remove leading and trailing white spaces.
+     * @param  lower  index of the first character to consider for inclusion in the sub-sequence.
+     * @param  upper  index after the last character to consider for inclusion in the sub-sequence.
+     * @return a characters sequence with leading and trailing white spaces removed, or {@code
null}
      *         if the {@code text} argument is null.
-     * @throws IndexOutOfBoundsException If {@code lower} or {@code upper} is out of bounds.
+     * @throws IndexOutOfBoundsException if {@code lower} or {@code upper} is out of bounds.
      */
     public static CharSequence trimWhitespaces(CharSequence text, int lower, int upper) {
         final int length = length(text);
@@ -1040,8 +1039,8 @@ search:     for (; fromIndex <= toIndex;
      * if that number should preferably be parsed as an integer before attempting to parse
      * it as a floating point number.
      *
-     * @param  value The value to trim if possible, or {@code null}.
-     * @return The value without the trailing {@code ".0"} part (if any),
+     * @param  value  the value to trim if possible, or {@code null}.
+     * @return the value without the trailing {@code ".0"} part (if any),
      *         or {@code null} if the given text was null.
      *
      * @see StringBuilders#trimFractionalPart(StringBuilder)
@@ -1079,10 +1078,9 @@ search:     for (; fromIndex <= toIndex;
      *   "This sentence given (…) in a short name."
      * </blockquote>
      *
-     * @param  text The sentence to reduce if it is too long, or {@code null}.
-     * @param  maxLength The maximum length allowed for {@code text}.
-     * @return A sentence not longer than {@code maxLength}, or {@code null}
-     *         if the given text was null.
+     * @param  text       the sentence to reduce if it is too long, or {@code null}.
+     * @param  maxLength  the maximum length allowed for {@code text}.
+     * @return a sentence not longer than {@code maxLength}, or {@code null} if the given
text was null.
      */
     public static CharSequence shortSentence(CharSequence text, final int maxLength) {
         ArgumentChecks.ensureStrictlyPositive("maxLength", maxLength);
@@ -1172,8 +1170,8 @@ searchWordBreak:    while (true) {
      * <p>Note that those heuristic rules may be modified in future SIS versions,
      * depending on the practical experience gained.</p>
      *
-     * @param  identifier The name of a Java constant, or {@code null}.
-     * @return The identifier like an English sentence, or {@code null}
+     * @param  identifier  the name of a Java constant, or {@code null}.
+     * @return the identifier like an English sentence, or {@code null}
      *         if the given {@code identifier} argument was null.
      */
     public static CharSequence upperCaseToSentence(final CharSequence identifier) {
@@ -1221,8 +1219,8 @@ searchWordBreak:    while (true) {
      * <p>Note that those heuristic rules may be modified in future SIS versions,
      * depending on the practical experience gained.</p>
      *
-     * @param  identifier An identifier with no space, words begin with an upper-case character,
or {@code null}.
-     * @return The identifier with spaces inserted after what looks like words, or {@code
null}
+     * @param  identifier  an identifier with no space, words begin with an upper-case character,
or {@code null}.
+     * @return the identifier with spaces inserted after what looks like words, or {@code
null}
      *         if the given {@code identifier} argument was null.
      */
     public static CharSequence camelCaseToSentence(final CharSequence identifier) {
@@ -1267,10 +1265,10 @@ searchWordBreak:    while (true) {
      *
      * <p>The given string is usually a programmatic identifier like a class name or
a method name.</p>
      *
-     * @param  identifier An identifier with no space, words begin with an upper-case character.
-     * @param  toLowerCase {@code true} for changing the first character of words to lower
case,
+     * @param  identifier   an identifier with no space, words begin with an upper-case character.
+     * @param  toLowerCase  {@code true} for changing the first character of words to lower
case,
      *         except for the first word and acronyms.
-     * @return The identifier with spaces inserted after what looks like words, or {@code
null}
+     * @return the identifier with spaces inserted after what looks like words, or {@code
null}
      *         if the given {@code identifier} argument was null.
      */
     public static CharSequence camelCaseToWords(final CharSequence identifier, final boolean
toLowerCase) {
@@ -1334,8 +1332,8 @@ searchWordBreak:    while (true) {
      * <p><b>Examples:</b> given {@code "northEast"}, this method returns
{@code "NE"}.
      * Given {@code "Open Geospatial Consortium"}, this method returns {@code "OGC"}.</p>
      *
-     * @param  text The text for which to create an acronym, or {@code null}.
-     * @return The acronym, or {@code null} if the given text was null.
+     * @param  text  the text for which to create an acronym, or {@code null}.
+     * @return the acronym, or {@code null} if the given text was null.
      */
     public static CharSequence camelCaseToAcronym(CharSequence text) {
         text = trimWhitespaces(text);
@@ -1396,8 +1394,8 @@ searchWordBreak:    while (true) {
      *
      * If any of the given arguments is {@code null}, this method returns {@code false}.
      *
-     * @param  acronym A possible acronym of the sequence of words, or {@code null}.
-     * @param  words The sequence of words, or {@code null}.
+     * @param  acronym  a possible acronym of the sequence of words, or {@code null}.
+     * @param  words    the sequence of words, or {@code null}.
      * @return {@code true} if the first string is an acronym of the second one.
      */
     public static boolean isAcronymForWords(final CharSequence acronym, final CharSequence
words) {
@@ -1541,7 +1539,7 @@ cmp:    while (ia < lga) {
      * {@linkplain org.apache.sis.util.iso.DefaultNameSpace#DEFAULT_SEPARATOR namespace separators},
      * this exclusion is considered desirable.
      *
-     * @param  identifier The character sequence to test, or {@code null}.
+     * @param  identifier  the character sequence to test, or {@code null}.
      * @return {@code true} if the given character sequence is a legal Unicode identifier.
      *
      * @see org.apache.sis.metadata.iso.ImmutableIdentifier
@@ -1570,7 +1568,7 @@ cmp:    while (ia < lga) {
      * Returns {@code true} if the given text is non-null, contains at least one upper-case
character and
      * no lower-case character. Space and punctuation are ignored.
      *
-     * @param  text The character sequence to test (may be {@code null}).
+     * @param  text  the character sequence to test (may be {@code null}).
      * @return {@code true} if non-null, contains at least one upper-case character and no
lower-case character.
      *
      * @see String#toUpperCase()
@@ -1585,10 +1583,10 @@ cmp:    while (ia < lga) {
      * Returns {@code true} if the given sub-sequence is non-null, contains at least one
upper-case character and
      * no lower-case character. Space and punctuation are ignored.
      *
-     * @param  text  The character sequence to test.
-     * @param  lower Index of the first character to check, inclusive.
-     * @param  upper Index of the last character to check, exclusive.
-     * @param  hasUpperCase {@code true} if this method should behave as if the given text
already had
+     * @param  text          the character sequence to test.
+     * @param  lower         index of the first character to check, inclusive.
+     * @param  upper         index of the last character to check, exclusive.
+     * @param  hasUpperCase  {@code true} if this method should behave as if the given text
already had
      *         at least one upper-case character (not necessarily in the portion given by
the indices).
      * @return {@code true} if contains at least one upper-case character and no lower-case
character.
      */
@@ -1619,10 +1617,10 @@ cmp:    while (ia < lga) {
      *     assert equalsFiltered("WGS84", "WGS_84", Characters.Filter.LETTERS_AND_DIGITS,
true) == true;
      * }
      *
-     * @param  s1 The first characters sequence to compare, or {@code null}.
-     * @param  s2 The second characters sequence to compare, or {@code null}.
-     * @param  filter The subset of characters to compare, or {@code null} for comparing
all characters.
-     * @param  ignoreCase {@code true} for comparing cases, or {@code false} for requiring
exact match.
+     * @param  s1          the first characters sequence to compare, or {@code null}.
+     * @param  s2          the second characters sequence to compare, or {@code null}.
+     * @param  filter      the subset of characters to compare, or {@code null} for comparing
all characters.
+     * @param  ignoreCase  {@code true} for comparing cases, or {@code false} for requiring
exact match.
      * @return {@code true} if both arguments are {@code null} or if the two given texts
are equal,
      *         optionally ignoring case and filtered-out characters.
      */
@@ -1645,11 +1643,10 @@ cmp:    while (ia < lga) {
             int c1 = codePointAt(s1, i1);
             final int n = charCount(c1);
             if (filter.contains(c1)) {
-                // Fetch the next significant character from the second string.
-                int c2;
+                int c2;                     // Fetch the next significant character from
the second string.
                 do {
                     if (i2 >= lg2) {
-                        return false; // The first string has more significant characters
than expected.
+                        return false;       // The first string has more significant characters
than expected.
                     }
                     c2 = codePointAt(s2, i2);
                     i2 += charCount(c2);
@@ -1665,7 +1662,7 @@ cmp:    while (ia < lga) {
         while (i2 < lg2) {
             final int s = codePointAt(s2, i2);
             if (filter.contains(s)) {
-                return false; // The first string has less significant characters than expected.
+                return false;               // The first string has less significant characters
than expected.
             }
             i2 += charCount(s);
         }
@@ -1695,8 +1692,8 @@ cmp:    while (ia < lga) {
      * it works on arbitrary character sequences and compares <cite>code points</cite>
      * instead than characters.
      *
-     * @param  s1 The first string to compare, or {@code null}.
-     * @param  s2 The second string to compare, or {@code null}.
+     * @param  s1  the first string to compare, or {@code null}.
+     * @param  s2  the second string to compare, or {@code null}.
      * @return {@code true} if the two given texts are equal, ignoring case,
      *         or if both arguments are {@code null}.
      *
@@ -1731,8 +1728,8 @@ cmp:    while (ia < lga) {
      * {@link String#contentEquals(CharSequence)} if possible. This method never invoke
      * {@link CharSequence#toString()} in order to avoid a potentially large copy of data.
      *
-     * @param  s1 The first string to compare, or {@code null}.
-     * @param  s2 The second string to compare, or {@code null}.
+     * @param  s1  the first string to compare, or {@code null}.
+     * @param  s2  the second string to compare, or {@code null}.
      * @return {@code true} if the two given texts are equal, or if both arguments are {@code
null}.
      *
      * @see String#contentEquals(CharSequence)
@@ -1771,9 +1768,9 @@ cmp:    while (ia < lga) {
      * {@code fromIndex < 0} or {@code fromIndex + part.length() > text.length()},
      * then this method returns {@code false}.
      *
-     * @param text      The character sequence for which to tests for the presence of {@code
part}.
-     * @param fromIndex The offset in {@code text} where to test for the presence of {@code
part}.
-     * @param part      The part which may be present in {@code text}.
+     * @param  text       the character sequence for which to tests for the presence of {@code
part}.
+     * @param  fromIndex  the offset in {@code text} where to test for the presence of {@code
part}.
+     * @param  part       the part which may be present in {@code text}.
      * @return {@code true} if {@code text} contains {@code part} at the given {@code offset}.
      * @throws NullPointerException if any of the arguments is null.
      *
@@ -1811,10 +1808,10 @@ cmp:    while (ia < lga) {
      * {@code fromIndex < 0} or {@code fromIndex + part.length() > text.length()},
      * then this method returns {@code false}.
      *
-     * @param text       The character sequence for which to tests for the presence of {@code
part}.
-     * @param fromIndex  The offset in {@code text} where to test for the presence of {@code
part}.
-     * @param part       The part which may be present in {@code text}.
-     * @param ignoreCase {@code true} if the case should be ignored.
+     * @param  text        the character sequence for which to tests for the presence of
{@code part}.
+     * @param  fromIndex   the offset in {@code text} where to test for the presence of {@code
part}.
+     * @param  part        the part which may be present in {@code text}.
+     * @param  ignoreCase  {@code true} if the case should be ignored.
      * @return {@code true} if {@code text} contains {@code part} at the given {@code offset}.
      * @throws NullPointerException if any of the arguments is null.
      *
@@ -1830,7 +1827,7 @@ cmp:    while (ia < lga) {
         // because we compare code points while String.regionMatches(…) compares characters.
         final int limit  = text.length();
         final int length = part.length();
-        if (fromIndex < 0) { // Not checked before because we want NullPointerException
if an argument is null.
+        if (fromIndex < 0) {                // Not checked before because we want NullPointerException
if an argument is null.
             return false;
         }
         for (int i=0; i<length;) {
@@ -1851,9 +1848,9 @@ cmp:    while (ia < lga) {
     /**
      * Returns {@code true} if the given character sequence starts with the given prefix.
      *
-     * @param  text        The characters sequence to test.
-     * @param  prefix      The expected prefix.
-     * @param  ignoreCase  {@code true} if the case should be ignored.
+     * @param  text         the characters sequence to test.
+     * @param  prefix       the expected prefix.
+     * @param  ignoreCase   {@code true} if the case should be ignored.
      * @return {@code true} if the given sequence starts with the given prefix.
      * @throws NullPointerException if any of the arguments is null.
      */
@@ -1864,9 +1861,9 @@ cmp:    while (ia < lga) {
     /**
      * Returns {@code true} if the given character sequence ends with the given suffix.
      *
-     * @param  text        The characters sequence to test.
-     * @param  suffix      The expected suffix.
-     * @param  ignoreCase  {@code true} if the case should be ignored.
+     * @param  text         the characters sequence to test.
+     * @param  suffix       the expected suffix.
+     * @param  ignoreCase   {@code true} if the case should be ignored.
      * @return {@code true} if the given sequence ends with the given suffix.
      * @throws NullPointerException if any of the arguments is null.
      */
@@ -1892,9 +1889,9 @@ cmp:    while (ia < lga) {
      * Returns the longest sequence of characters which is found at the beginning of the
two
      * given texts. If one of those texts is {@code null}, then the other text is returned.
      *
-     * @param  s1 The first text,  or {@code null}.
-     * @param  s2 The second text, or {@code null}.
-     * @return The common prefix of both texts, or {@code null} if both texts are null.
+     * @param  s1  the first text,  or {@code null}.
+     * @param  s2  the second text, or {@code null}.
+     * @return the common prefix of both texts, or {@code null} if both texts are null.
      */
     public static CharSequence commonPrefix(final CharSequence s1, final CharSequence s2)
{
         if (s1 == null) return s2;
@@ -1925,9 +1922,9 @@ cmp:    while (ia < lga) {
      * Returns the longest sequence of characters which is found at the end of the two given
texts.
      * If one of those texts is {@code null}, then the other text is returned.
      *
-     * @param  s1 The first text,  or {@code null}.
-     * @param  s2 The second text, or {@code null}.
-     * @return The common suffix of both texts, or {@code null} if both texts are null.
+     * @param  s1  the first text,  or {@code null}.
+     * @param  s2  the second text, or {@code null}.
+     * @return the common suffix of both texts, or {@code null} if both texts are null.
      */
     public static CharSequence commonSuffix(final CharSequence s1, final CharSequence s2)
{
         if (s1 == null) return s2;
@@ -1972,9 +1969,9 @@ cmp:    while (ia < lga) {
      *       the same value than for <var>c</var>.</li>
      * </ul>
      *
-     * @param  text The text for which to get the token.
-     * @param  fromIndex Index of the fist character to consider in the given text.
-     * @return A sub-sequence of {@code text} starting at the given offset, or an empty string
+     * @param  text       the text for which to get the token.
+     * @param  fromIndex  index of the fist character to consider in the given text.
+     * @return a sub-sequence of {@code text} starting at the given offset, or an empty string
      *         if there is no non-blank character at or after the given offset.
      * @throws NullPointerException if the {@code text} argument is null.
      */
@@ -2022,10 +2019,10 @@ cmp:    while (ia < lga) {
      *       The {@code toSearch} value is searched verbatim.</li>
      * </ul>
      *
-     * @param  text      The character sequence in which to perform the replacements, or
{@code null}.
-     * @param  toSearch  The string to replace.
-     * @param  replaceBy The replacement for the searched string.
-     * @return The given text with replacements applied, or {@code text} if no replacement
has been applied,
+     * @param  text       the character sequence in which to perform the replacements, or
{@code null}.
+     * @param  toSearch   the string to replace.
+     * @param  replaceBy  the replacement for the searched string.
+     * @return the given text with replacements applied, or {@code text} if no replacement
has been applied,
      *         or {@code null} if the given text was null
      *
      * @see String#replace(char, char)
@@ -2057,11 +2054,11 @@ cmp:    while (ia < lga) {
     /**
      * Copies a sequence of characters in the given {@code char[]} array.
      *
-     * @param src       The characters sequence from which to copy characters.
-     * @param srcOffset Index of the first character from {@code src} to copy.
-     * @param dst       The array where to copy the characters.
-     * @param dstOffset Index where to write the first character in {@code dst}.
-     * @param length    Number of characters to copy.
+     * @param src        the characters sequence from which to copy characters.
+     * @param srcOffset  index of the first character from {@code src} to copy.
+     * @param dst        the array where to copy the characters.
+     * @param dstOffset  index where to write the first character in {@code dst}.
+     * @param length     number of characters to copy.
      *
      * @see String#getChars(int, int, char[], int)
      * @see StringBuilder#getChars(int, int, char[], int)




Mime
View raw message