|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.netmera.mobile.util.StringUtils
public class StringUtils
| Field Summary | |
|---|---|
static java.lang.String |
EMPTY
|
| Constructor Summary | |
|---|---|
StringUtils()
|
|
| Method Summary | ||
|---|---|---|
static java.lang.Object[] |
convertCollectionsToArray(java.util.Collection<?> collection)
|
|
static java.lang.String |
convertInputStreamToString(java.io.InputStream in)
|
|
static java.util.Date |
convertStringToDate(java.lang.String dateStr)
Converts String into Date |
|
static boolean |
isNotBlank(java.lang.String str)
Checks if a String is not empty (""), not null and not whitespace only. |
|
static java.lang.String |
join(java.lang.Object[] array,
java.lang.String separator)
Joins the elements of the provided array into a single String containing the provided list of elements. |
|
static
|
nullCheck(T argument)
|
|
static java.lang.String |
substringAfterLast(java.lang.String str,
java.lang.String separator)
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String EMPTY
| Constructor Detail |
|---|
public StringUtils()
| Method Detail |
|---|
public static java.lang.Object[] convertCollectionsToArray(java.util.Collection<?> collection)
public static java.lang.String substringAfterLast(java.lang.String str,
java.lang.String separator)
public static java.util.Date convertStringToDate(java.lang.String dateStr)
public static <T> T nullCheck(T argument)
public static java.lang.String convertInputStreamToString(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionpublic static boolean isNotBlank(java.lang.String str)
StringUtils.isNotBlank(null) = false
StringUtils.isNotBlank("") = false
StringUtils.isNotBlank(" ") = false
StringUtils.isNotBlank("bob") = true
StringUtils.isNotBlank(" bob ") = true
str - - String to check
public static java.lang.String join(java.lang.Object[] array,
java.lang.String separator)
Joins the elements of the provided array into a single String containing the provided list of elements.
No delimiter is added before or after the list. A null
separator is the same as an empty String (""). Null objects or empty
strings within the array are represented by empty strings.
StringUtils.join(null, *) = null StringUtils.join([], *) = "" StringUtils.join([null], *) = "" StringUtils.join(["a", "b", "c"], "--") = "a--b--c" StringUtils.join(["a", "b", "c"], null) = "abc" StringUtils.join(["a", "b", "c"], "") = "abc" StringUtils.join([null, "", "a"], ',') = ",,a"
array - the array of values to join together, may be nullseparator - the separator character to use, null treated as ""
null if null array input
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||