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>
|
||||
* compare(null, null) = 0
|
||||
* compare(null, bravo) < 0
|
||||
* compare(alpha, null) > 0
|
||||
* compare(null, bravo) < 0
|
||||
* compare(alpha, null) > 0
|
||||
* compare(alpha, bravo) = alpha.compareTo(bravo)
|
||||
* </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
|
||||
* are returned by the collection's iterator.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* the 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.
|
||||
*
|
||||
*
|
||||
* @param initialCapacity
|
||||
* the initial capacity
|
||||
*/
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* the 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.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* the 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.
|
||||
*
|
||||
* @param strings
|
||||
* @return
|
||||
*
|
||||
* @param values
|
||||
* the values
|
||||
* @return the string list
|
||||
*/
|
||||
public StringList append(final boolean... values)
|
||||
{
|
||||
|
@ -301,11 +306,8 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string representation of the char argument to this string list.
|
||||
*
|
||||
* @param character
|
||||
* @return
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Appendable#append(char)
|
||||
*/
|
||||
@Override
|
||||
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
|
||||
* returned by the collection's iterator.
|
||||
*
|
||||
*
|
||||
* @param strings
|
||||
* @return
|
||||
* the strings
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
* the value
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
* the value
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
* the value
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
* the value
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param strings
|
||||
* @return
|
||||
*
|
||||
* @param values
|
||||
* the values
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
* the value
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* Check null parameter before add.
|
||||
*
|
||||
*
|
||||
* @param string
|
||||
* @return
|
||||
* the string
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param strings
|
||||
* @return
|
||||
* the strings
|
||||
* @return the string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @return the string list
|
||||
*/
|
||||
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,
|
||||
* then append a break line too.
|
||||
*
|
||||
*
|
||||
* @param character
|
||||
* @return
|
||||
* the character
|
||||
* @return the string list
|
||||
*/
|
||||
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
|
||||
* the string
|
||||
* @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
|
||||
* 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
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* @return
|
||||
* the values
|
||||
* @return the string list
|
||||
*/
|
||||
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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* the strings
|
||||
|
@ -1195,8 +1207,9 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* Gets the last.
|
||||
*
|
||||
* @return the last
|
||||
*/
|
||||
public String getLast()
|
||||
{
|
||||
|
@ -1760,8 +1773,10 @@ public class StringList extends ArrayList<String> implements CharSequence, Appen
|
|||
|
||||
/**
|
||||
* Sorts this list.
|
||||
*
|
||||
* @return This List.
|
||||
*
|
||||
* @param comparator
|
||||
* the comparator
|
||||
* @return this string list
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param start
|
||||
* @param beginIndex
|
||||
* The first character of the substring.
|
||||
* @param end
|
||||
* @param endIndex
|
||||
* The last character of the substring.
|
||||
*
|
||||
* @return The sublist targeted.
|
||||
|
|
|
@ -53,9 +53,9 @@ public class StringsUtils
|
|||
|
||||
/**
|
||||
* Capitalize.
|
||||
*
|
||||
* @param sourceStringUtils
|
||||
* .lo the source
|
||||
*
|
||||
* @param source
|
||||
* the source
|
||||
*/
|
||||
public static void capitalize(final StringList source)
|
||||
{
|
||||
|
@ -629,9 +629,10 @@ public class StringsUtils
|
|||
|
||||
/**
|
||||
* Checks if is blank.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* the source
|
||||
* @return true, if is blank
|
||||
*/
|
||||
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}.
|
||||
*
|
||||
* @param source
|
||||
* the source
|
||||
* @param out
|
||||
* The {@code PrintWriter} where to write.
|
||||
* @throws IOException
|
||||
|
@ -1927,6 +1930,8 @@ public class StringsUtils
|
|||
/**
|
||||
* Writes the strings of this list into a {@code Writer}.
|
||||
*
|
||||
* @param source
|
||||
* the source
|
||||
* @param out
|
||||
* The {@code Writer} where to write.
|
||||
* @throws IOException
|
||||
|
|
Loading…
Reference in a new issue