Made a Javadoc review.
This commit is contained in:
parent
39f6c62c96
commit
47a626b940
3 changed files with 79 additions and 59 deletions
|
@ -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) < 0
|
||||||
* compare(alpha, null) > 0
|
* compare(alpha, null) > 0
|
||||||
* compare(alpha, bravo) = alpha.compareTo(bravo)
|
* compare(alpha, bravo) = alpha.compareTo(bravo)
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
|
|
@ -95,8 +95,9 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
|
||||||
/**
|
/**
|
||||||
* Constructs a list of string of the specified collection, in the order they
|
* Constructs a list of string of the specified collection, in the order they
|
||||||
* 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)
|
||||||
{
|
{
|
||||||
|
@ -157,8 +158,9 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -209,8 +211,9 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -257,8 +260,9 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -279,9 +283,10 @@ 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)
|
||||||
|
@ -361,9 +363,10 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
|
||||||
/**
|
/**
|
||||||
* Appends the string of the specified collection, in the order they are
|
* Appends the string of the specified collection, in the order they are
|
||||||
* 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)
|
||||||
{
|
{
|
||||||
|
@ -385,9 +388,10 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -417,9 +422,10 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -433,9 +439,10 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -454,9 +461,10 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -478,9 +486,10 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -494,11 +503,10 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -517,9 +525,10 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -541,8 +550,8 @@ 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()
|
||||||
{
|
{
|
||||||
|
@ -559,9 +568,10 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
|
||||||
/**
|
/**
|
||||||
* Appends the string representation of the char argument to this string list,
|
* Appends the string representation of the char argument to this string list,
|
||||||
* 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,8 +584,9 @@ 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
|
||||||
* @return the string list
|
* @return the string list
|
||||||
|
@ -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
|
||||||
|
@ -643,9 +654,10 @@ 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()
|
||||||
{
|
{
|
||||||
|
@ -1760,8 +1773,10 @@ 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.
|
||||||
|
|
|
@ -53,9 +53,9 @@ 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)
|
||||||
{
|
{
|
||||||
|
@ -629,9 +629,10 @@ public class StringsUtils
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if is blank.
|
* Checks if is blank.
|
||||||
*
|
*
|
||||||
* @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
|
||||||
|
|
Loading…
Reference in a new issue