Pulling all pending Bukkit-JavaDoc changes
A special thanks goes to @aerouk for almost all of the changes found here. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -6,15 +6,20 @@ import org.apache.commons.lang.Validate;
|
||||
public class StringUtil {
|
||||
|
||||
/**
|
||||
* Copies all elements from the iterable collection of originals to the collection provided.
|
||||
* Copies all elements from the iterable collection of originals to the
|
||||
* collection provided.
|
||||
*
|
||||
* @param token String to search for
|
||||
* @param originals An iterable collection of strings to filter.
|
||||
* @param collection The collection to add matches to
|
||||
* @return the collection provided that would have the elements copied into
|
||||
* @throws UnsupportedOperationException if the collection is immutable and originals contains a string which starts with the specified search string.
|
||||
* @return the collection provided that would have the elements copied
|
||||
* into
|
||||
* @throws UnsupportedOperationException if the collection is immutable
|
||||
* and originals contains a string which starts with the specified
|
||||
* search string.
|
||||
* @throws IllegalArgumentException if any parameter is is null
|
||||
* @throws IllegalArgumentException if originals contains a null element. <b>Note: the collection may be modified before this is thrown</b>
|
||||
* @throws IllegalArgumentException if originals contains a null element.
|
||||
* <b>Note: the collection may be modified before this is thrown</b>
|
||||
*/
|
||||
public static <T extends Collection<String>> T copyPartialMatches(final String token, final Iterable<String> originals, final T collection) throws UnsupportedOperationException, IllegalArgumentException {
|
||||
Validate.notNull(token, "Search token cannot be null");
|
||||
@@ -31,11 +36,14 @@ public class StringUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* This method uses a substring to check case-insensitive equality. This means the internal array does not need to be copied like a toLowerCase() call would.
|
||||
* This method uses a substring to check case-insensitive equality. This
|
||||
* means the internal array does not need to be copied like a
|
||||
* toLowerCase() call would.
|
||||
*
|
||||
* @param string String to check
|
||||
* @param prefix Prefix of string to compare
|
||||
* @return true if provided string starts with, ignoring case, the prefix provided
|
||||
* @return true if provided string starts with, ignoring case, the prefix
|
||||
* provided
|
||||
* @throws NullPointerException if prefix is null
|
||||
* @throws IllegalArgumentException if string is null
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user