|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgeocaching.api.util.StringUtils
public class StringUtils
This is a part of original StringUtils.java from Apache Commons lib.
String| Field Summary | |
|---|---|
static String |
EMPTY
The empty String "". |
| Constructor Summary | |
|---|---|
StringUtils()
|
|
| Method Summary | |
|---|---|
static String |
concatenate(Object[] array)
Deprecated. Use the better named join(Object[]) instead.
Method will be removed in Commons Lang 3.0. |
static String |
join(Iterator iterator,
char separator)
Joins the elements of the provided Iterator into
a single String containing the provided elements. |
static String |
join(Iterator iterator,
String separator)
Joins the elements of the provided Iterator into
a single String containing the provided elements. |
static String |
join(Object[] array)
Joins the elements of the provided array into a single String containing the provided list of elements. |
static String |
join(Object[] array,
char separator)
Joins the elements of the provided array into a single String containing the provided list of elements. |
static String |
join(Object[] array,
String separator)
Joins the elements of the provided array into a single String containing the provided list of elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EMPTY
"".
| Constructor Detail |
|---|
public StringUtils()
| Method Detail |
|---|
@Deprecated public static String concatenate(Object[] array)
join(Object[]) instead.
Method will be removed in Commons Lang 3.0.
Concatenates elements of an array into a single String. Null objects or empty strings within the array are represented by empty strings.
StringUtils.concatenate(null) = null StringUtils.concatenate([]) = "" StringUtils.concatenate([null]) = "" StringUtils.concatenate(["a", "b", "c"]) = "abc" StringUtils.concatenate([null, "", "a"]) = "a"
array - the array of values to concatenate, may be null
null if null array inputpublic static String join(Object[] array)
Joins the elements of the provided array into a single String containing the provided list of elements.
No separator is added to the joined 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"]) = "abc" StringUtils.join([null, "", "a"]) = "a"
array - the array of values to join together, may be null
null if null array input
public static String join(Object[] array,
char 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. 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([null, "", "a"], ';') = ";;a"
array - the array of values to join together, may be nullseparator - the separator character to use
null if null array input
public static String join(Object[] array,
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
public static String join(Iterator iterator,
char separator)
Joins the elements of the provided Iterator into
a single String containing the provided elements.
No delimiter is added before or after the list. Null objects or empty strings within the iteration are represented by empty strings.
See the examples here: join(Object[],char).
iterator - the Iterator of values to join together, may be nullseparator - the separator character to use
null if null iterator input
public static String join(Iterator iterator,
String separator)
Joins the elements of the provided Iterator into
a single String containing the provided elements.
No delimiter is added before or after the list.
A null separator is the same as an empty String ("").
See the examples here: join(Object[],String).
iterator - the Iterator of values to join together, may be nullseparator - the separator character to use, null treated as ""
null if null iterator input
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||