Made a Javadoc review.

This commit is contained in:
Christian P. MOMON 2018-06-04 09:34:35 +02:00
parent 39f6c62c96
commit 47a626b940
3 changed files with 79 additions and 59 deletions

View file

@ -71,8 +71,8 @@ public class StringLengthComparator implements Comparator<String>
* *
* <pre> * <pre>
* compare(null, null) = 0 * compare(null, null) = 0
* compare(null, bravo) < 0 * compare(null, bravo) &lt; 0
* compare(alpha, null) > 0 * compare(alpha, null) &gt; 0
* compare(alpha, bravo) = alpha.compareTo(bravo) * compare(alpha, bravo) = alpha.compareTo(bravo)
* </pre> * </pre>
* *

View file

@ -97,6 +97,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* are returned by the collection's iterator. * are returned by the collection's iterator.
* *
* @param source * @param source
* the source
*/ */
public StringList(final Collection<String> source) public StringList(final Collection<String> source)
{ {
@ -159,6 +160,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Constructs an empty list with the specified initial capacity. * Constructs an empty list with the specified initial capacity.
* *
* @param initialCapacity * @param initialCapacity
* the initial capacity
*/ */
public StringList(final int initialCapacity) public StringList(final int initialCapacity)
{ {
@ -211,6 +213,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Constructs a list of string from an Object array. * Constructs a list of string from an Object array.
* *
* @param source * @param source
* the source
*/ */
public StringList(final Object... source) public StringList(final Object... source)
{ {
@ -259,6 +262,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Constructs a list of string from a string array. * Constructs a list of string from a string array.
* *
* @param source * @param source
* the source
*/ */
public StringList(final String... source) public StringList(final String... source)
{ {
@ -280,8 +284,9 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
/** /**
* Appends the string of the array argument to this string list. * Appends the string of the array argument to this string list.
* *
* @param strings * @param values
* @return * the values
* @return the string list
*/ */
public StringList append(final boolean... values) public StringList append(final boolean... values)
{ {
@ -301,11 +306,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
return result; return result;
} }
/** /* (non-Javadoc)
* Appends the string representation of the char argument to this string list. * @see java.lang.Appendable#append(char)
*
* @param character
* @return
*/ */
@Override @Override
public StringList append(final char character) public StringList append(final char character)
@ -363,7 +365,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* returned by the collection's iterator. * returned by the collection's iterator.
* *
* @param strings * @param strings
* @return * the strings
* @return the string list
*/ */
public StringList append(final Collection<String> strings) public StringList append(final Collection<String> strings)
{ {
@ -387,7 +390,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Appends the string representation of the double argument to this string list. * Appends the string representation of the double argument to this string list.
* *
* @param value * @param value
* @return * the value
* @return the string list
*/ */
public StringList append(final double value) public StringList append(final double value)
{ {
@ -403,7 +407,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Appends the string representation of the int argument to this string list. * Appends the string representation of the int argument to this string list.
* *
* @param value * @param value
* @return * the value
* @return the string list
*/ */
public StringList append(final int value) public StringList append(final int value)
{ {
@ -419,7 +424,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Appends the string representation of the long argument to this string list. * Appends the string representation of the long argument to this string list.
* *
* @param value * @param value
* @return * the value
* @return the string list
*/ */
public StringList append(final long value) public StringList append(final long value)
{ {
@ -435,7 +441,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Appends the string representation of the int argument to this string list. * Appends the string representation of the int argument to this string list.
* *
* @param value * @param value
* @return * the value
* @return the string list
*/ */
public StringList append(final Object value) public StringList append(final Object value)
{ {
@ -455,8 +462,9 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
/** /**
* Appends the string of the array argument to this string list. * Appends the string of the array argument to this string list.
* *
* @param strings * @param values
* @return * the values
* @return the string list
*/ */
public StringList append(final Object... values) public StringList append(final Object... values)
{ {
@ -480,7 +488,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Appends the string representation of the long argument to this string list. * Appends the string representation of the long argument to this string list.
* *
* @param value * @param value
* @return * the value
* @return the string list
*/ */
public StringList append(final short value) public StringList append(final short value)
{ {
@ -495,10 +504,9 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
/** /**
* Appends the string argument to this string list. * Appends the string argument to this string list.
* *
* Check null parameter before add.
*
* @param string * @param string
* @return * the string
* @return the string list
*/ */
public StringList append(final String string) public StringList append(final String string)
{ {
@ -519,7 +527,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Appends the string of the array argument to this string list. * Appends the string of the array argument to this string list.
* *
* @param strings * @param strings
* @return * the strings
* @return the string list
*/ */
public StringList append(final String... strings) public StringList append(final String... strings)
{ {
@ -542,7 +551,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
/** /**
* Appends a break line to this string list. * Appends a break line to this string list.
* *
* @return * @return the string list
*/ */
public StringList appendln() public StringList appendln()
{ {
@ -561,7 +570,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* then append a break line too. * then append a break line too.
* *
* @param character * @param character
* @return * the character
* @return the string list
*/ */
public StringList appendln(final char character) public StringList appendln(final char character)
{ {
@ -574,7 +584,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Appendln. * Appends the string of the specified collection, in the order they are
* returned by the collection's iterator. Then append a return line.
* *
* @param string * @param string
* the string * the string
@ -591,7 +602,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Appendln. * Appends the string representation of the double argument to this string list.
* *
* @param value * @param value
* the value * the value
@ -608,7 +619,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Appendln. * Appends the string representation of the int argument to this string list.
* *
* @param value * @param value
* the value * the value
@ -625,7 +636,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Appendln. * Appends the string representation of the long argument to this string list.
* *
* @param value * @param value
* the value * the value
@ -645,7 +656,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
* Appends the string of the array argument to this string list. * Appends the string of the array argument to this string list.
* *
* @param values * @param values
* @return * the values
* @return the string list
*/ */
public StringList appendln(final Object... values) public StringList appendln(final Object... values)
{ {
@ -660,7 +672,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Appendln. * Appends the string representation of the int argument to this string list.
* *
* @param value * @param value
* the value * the value
@ -677,7 +689,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Appendln. * Appends the string representation of the long argument to this string list.
* *
* @param value * @param value
* the value * the value
@ -694,7 +706,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Appendln. * Appends the string argument to this string list.
* *
* @param string * @param string
* the string * the string
@ -711,7 +723,7 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Appendln. * Appends the string of the array argument to this string list.
* *
* @param strings * @param strings
* the strings * the strings
@ -1195,8 +1207,9 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
} }
/** /**
* Gets the last.
* *
* @return * @return the last
*/ */
public String getLast() public String getLast()
{ {
@ -1761,7 +1774,9 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
/** /**
* Sorts this list. * Sorts this list.
* *
* @return This List. * @param comparator
* the comparator
* @return this string list
*/ */
public StringList sortBy(final Comparator<? super String> comparator) public StringList sortBy(final Comparator<? super String> comparator)
{ {
@ -1811,9 +1826,9 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
/** /**
* Extracts a substring from this list. * Extracts a substring from this list.
* *
* @param start * @param beginIndex
* The first character of the substring. * The first character of the substring.
* @param end * @param endIndex
* The last character of the substring. * The last character of the substring.
* *
* @return The sublist targeted. * @return The sublist targeted.

View file

@ -54,8 +54,8 @@ public class StringsUtils
/** /**
* Capitalize. * Capitalize.
* *
* @param sourceStringUtils * @param source
* .lo the source * the source
*/ */
public static void capitalize(final StringList source) public static void capitalize(final StringList source)
{ {
@ -632,6 +632,7 @@ public class StringsUtils
* *
* @param source * @param source
* the source * the source
* @return true, if is blank
*/ */
public static boolean isBlank(final Collection<String> source) public static boolean isBlank(final Collection<String> source)
{ {
@ -1908,6 +1909,8 @@ public class StringsUtils
/** /**
* Writes the strings of this list into a {@code PrintWriter}. * Writes the strings of this list into a {@code PrintWriter}.
* *
* @param source
* the source
* @param out * @param out
* The {@code PrintWriter} where to write. * The {@code PrintWriter} where to write.
* @throws IOException * @throws IOException
@ -1927,6 +1930,8 @@ public class StringsUtils
/** /**
* Writes the strings of this list into a {@code Writer}. * Writes the strings of this list into a {@code Writer}.
* *
* @param source
* the source
* @param out * @param out
* The {@code Writer} where to write. * The {@code Writer} where to write.
* @throws IOException * @throws IOException