|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.util.StringUtils
public class StringUtils
Helper class for dealing with vCard strings.
| Nested Class Summary | |
|---|---|
static interface |
StringUtils.JoinCallback<T>
Callback interface used with various VCardStringUtils.join()
methods. |
static interface |
StringUtils.JoinMapCallback<K,V>
Callback interface used with the join(Map, String, JoinMapCallback) method. |
| Field Summary | |
|---|---|
static String |
NEWLINE
The local computer's newline character sequence. |
| Method Summary | ||
|---|---|---|
static
|
join(Collection<T> collection,
String delimiter)
Joins a collection of values into a delimited list. |
|
static
|
join(Collection<T> collection,
String delimiter,
StringBuilder sb)
Joins a collection of values into a delimited list. |
|
static
|
join(Collection<T> collection,
String delimiter,
StringBuilder sb,
StringUtils.JoinCallback<T> join)
Joins a collection of values into a delimited list. |
|
static
|
join(Collection<T> collection,
String delimiter,
StringUtils.JoinCallback<T> join)
Joins a collection of values into a delimited list. |
|
static
|
join(Map<K,V> map,
String delimiter,
StringUtils.JoinMapCallback<K,V> join)
Joins a map into a delimited list. |
|
static String |
ltrim(String string)
Trims the whitespace off the left side of a string. |
|
static String |
rtrim(String string)
Trims the whitespace off the right side of a string. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NEWLINE
| Method Detail |
|---|
public static String ltrim(String string)
string - the string to trim
public static String rtrim(String string)
string - the string to trim
public static <T> String join(Collection<T> collection,
String delimiter)
collection - the collection of valuesdelimiter - the delimiter (e.g. ",")
public static <T> void join(Collection<T> collection,
String delimiter,
StringBuilder sb)
collection - the collection of valuesdelimiter - the delimiter (e.g. ",")sb - the string builder to append onto
public static <T> String join(Collection<T> collection,
String delimiter,
StringUtils.JoinCallback<T> join)
collection - the collection of valuesdelimiter - the delimiter (e.g. ",")join - callback function to call on every element in the collection
public static <T> void join(Collection<T> collection,
String delimiter,
StringBuilder sb,
StringUtils.JoinCallback<T> join)
collection - the collection of valuesdelimiter - the delimiter (e.g. ",")sb - the string builder to append ontojoin - callback function to call on every element in the collection
public static <K,V> String join(Map<K,V> map,
String delimiter,
StringUtils.JoinMapCallback<K,V> join)
map - the mapdelimiter - the delimiter (e.g. ",")join - callback function to call on every element in the collection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||