| java.lang.Object | |
| ↳ | com.google.gdata.util.common.base.Join |
Utility for joining pieces of text separated by a delimiter. It can handle
iterators, collections, arrays, and varargs, and can append to any
Appendable or just return a String. For example,
join(":", "a", "b", "c") returns "a:b:c".
All methods of this class throw NullPointerException when a value
of null is supplied for any parameter. The elements within the
collection, iterator, array, or varargs parameter list may be null --
these will be represented in the output by the string "null".
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Join.JoinException | Exception thrown in response to an IOException from the supplied Appendable. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Appends each of the
tokens to appendable, separated by
delimiter. | |||||||||||
Returns a string containing the
tokens, converted to strings if
necessary, separated by delimiter. | |||||||||||
Returns a string containing the contents of
map, with entries
separated by entryDelimiter, and keys and values separated with
keyValueSeparator. | |||||||||||
Appends the contents of
map to appendable, with entries
separated by entryDelimiter, and keys and values separated with
keyValueSeparator. | |||||||||||
Appends each of the
tokens to appendable, separated by
delimiter. | |||||||||||
Appends each of the
tokens to appendable, separated by
delimiter. | |||||||||||
Returns a string containing the
tokens, converted to strings if
necessary, separated by delimiter. | |||||||||||
Returns a string containing the
tokens, converted to strings if
necessary, separated by delimiter. | |||||||||||
Appends each of the
tokens to appendable, separated by
delimiter. | |||||||||||
Returns a string containing the
tokens, converted to strings if
necessary, separated by delimiter. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Appends each of the tokens to appendable, separated by
delimiter.
Each token will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| appendable | The object to append the results to |
|---|---|
| delimiter | A string to append between every element, but not at the beginning or end |
| tokens | Objects to append |
Appendable instance that was passed in| Join.JoinException | if an IOException occurs |
|---|
Returns a string containing the tokens, converted to strings if
necessary, separated by delimiter. If tokens is empty, it
returns an empty string.
Each token will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| delimiter | A string to append between every element, but not at the beginning or end |
|---|---|
| tokens | Objects to append |
Returns a string containing the contents of map, with entries
separated by entryDelimiter, and keys and values separated with
keyValueSeparator.
Each key and value will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| keyValueSeparator | A string to append between every key and its associated value |
|---|---|
| entryDelimiter | A string to append between every entry, but not at the beginning or end |
| map | The map containing the data to join |
Appends the contents of map to appendable, with entries
separated by entryDelimiter, and keys and values separated with
keyValueSeparator.
Each key and value will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| appendable | The object to append the results to |
|---|---|
| keyValueSeparator | A string to append between every key and its associated value |
| entryDelimiter | A string to append between every entry, but not at the beginning or end |
| map | The map containing the data to join |
Appendable instance that was passed in
Appends each of the tokens to appendable, separated by
delimiter.
Each token will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| appendable | The object to append the results to |
|---|---|
| delimiter | A string to append between every element, but not at the beginning or end |
| tokens | Objects to append |
Appendable instance that was passed in| Join.JoinException | if an IOException occurs |
|---|
Appends each of the tokens to appendable, separated by
delimiter.
Each token will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| appendable | The object to append the results to |
|---|---|
| delimiter | A string to append between every element, but not at the beginning or end |
| tokens | Objects to append |
Appendable instance that was passed in| Join.JoinException | if an IOException occurs |
|---|
Returns a string containing the tokens, converted to strings if
necessary, separated by delimiter. If tokens is empty, it
returns an empty string.
Each token will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| delimiter | A string to append between every element, but not at the beginning or end |
|---|---|
| tokens | Objects to append |
Returns a string containing the tokens, converted to strings if
necessary, separated by delimiter. If tokens is empty, it
returns an empty string.
Each token will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| delimiter | A string to append between every element, but not at the beginning or end |
|---|---|
| tokens | Objects to append |
Appends each of the tokens to appendable, separated by
delimiter.
Each token will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| appendable | The object to append the results to |
|---|---|
| delimiter | A string to append between every element, but not at the beginning or end |
| firstToken | The first object to append |
| otherTokens | Subsequent objects to append |
Appendable instance that was passed in| Join.JoinException | if an IOException occurs |
|---|
Returns a string containing the tokens, converted to strings if
necessary, separated by delimiter.
Each token will be converted to a CharSequence using
valueOf(Object), if it isn't a CharSequence already.
Note that this implies that null tokens will be appended as the
four-character string "null".
| delimiter | A string to append between every element, but not at the beginning or end |
|---|---|
| firstToken | The first object to append |
| otherTokens | Subsequent objects to append |