|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object isql.util.StringJoin
public class StringJoin
Joins texts using a separator (comma...)
Field Summary | |
---|---|
boolean |
first
If it is the first element, don't precede it with the separator |
char |
separator
The separator (comma, semicolon...) |
Constructor Summary | |
---|---|
StringJoin(char separator)
The constructor |
Method Summary | ||
---|---|---|
|
add(java.util.Collection<T> lstToAdd)
adds a collection of values to the final text |
|
|
add(T toAdd)
adds a value to the final text |
|
|
add(T[] arrToAdd)
adds an array of values to the final text |
|
static
|
join(java.util.Collection<T> lstToAdd,
char separator)
builds a text joining a collection of values with a separator |
|
static
|
join(T[] arrToAdd,
char separator)
builds a text joining an array of values with a separator |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public char separator
public boolean first
Constructor Detail |
---|
public StringJoin(char separator)
separator
- the separator (generally a comma or a semicolon)Method Detail |
---|
public <T> void add(T toAdd)
T
- the type of the value to addtoAdd
- the value to add to the joinpublic <T> void add(T[] arrToAdd)
T
- the type of the values to addarrToAdd
- the values to add to the joinpublic <T> void add(java.util.Collection<T> lstToAdd)
T
- the type of the values to addlstToAdd
- the values to add to the joinpublic static <T> java.lang.String join(T[] arrToAdd, char separator)
T
- the type of the values to joinarrToAdd
- the values to joinseparator
- the separator
public static <T> java.lang.String join(java.util.Collection<T> lstToAdd, char separator)
T
- the type of the values to joinlstToAdd
- the values to joinseparator
- the separator
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |