public class StringUtil
extends java.lang.Object
| Constructor | Description |
|---|---|
StringUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
static <T extends java.util.Collection<? super java.lang.String>> |
copyPartialMatches(java.lang.String token,
java.lang.Iterable<java.lang.String> originals,
T collection) |
Copies all elements from the iterable collection of originals to the
collection provided.
|
static boolean |
startsWithIgnoreCase(java.lang.String string,
java.lang.String prefix) |
This method uses a region to check case-insensitive equality.
|
public static <T extends java.util.Collection<? super java.lang.String>> T copyPartialMatches(java.lang.String token,
java.lang.Iterable<java.lang.String> originals,
T collection)
throws java.lang.UnsupportedOperationException,
java.lang.IllegalArgumentException
T - the collection of stringstoken - String to search fororiginals - An iterable collection of strings to filter.collection - The collection to add matches tojava.lang.UnsupportedOperationException - if the collection is immutable
and originals contains a string which starts with the specified
search string.java.lang.IllegalArgumentException - if any parameter is is nulljava.lang.IllegalArgumentException - if originals contains a null element.
Note: the collection may be modified before this is thrownpublic static boolean startsWithIgnoreCase(java.lang.String string,
java.lang.String prefix)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
string - String to checkprefix - Prefix of string to comparejava.lang.NullPointerException - if prefix is nulljava.lang.IllegalArgumentException - if string is nullCopyright © 2018. All rights reserved.