|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcn.dreampie.common.util.Joiner
public class Joiner
Created by ice on 14-12-29.
| 嵌套类摘要 | |
|---|---|
static class |
Joiner.MapJoiner
An object that joins map entries in the same manner as Joiner joins iterables and
arrays. |
| 方法摘要 | ||
|---|---|---|
|
appendTo(A appendable,
Iterable<?> parts)
Appends the string representation of each of parts, using the previously configured
separator between each, to appendable. |
|
|
appendTo(A appendable,
Iterator<?> parts)
Appends the string representation of each of parts, using the previously configured
separator between each, to appendable. |
|
|
appendTo(A appendable,
Object[] parts)
Appends the string representation of each of parts, using the previously configured
separator between each, to appendable. |
|
|
appendTo(A appendable,
Object first,
Object second,
Object... rest)
Appends to appendable the string representation of each of the remaining arguments. |
|
StringBuilder |
appendTo(StringBuilder builder,
Iterable<?> parts)
Appends the string representation of each of parts, using the previously configured
separator between each, to builder. |
|
StringBuilder |
appendTo(StringBuilder builder,
Iterator<?> parts)
Appends the string representation of each of parts, using the previously configured
separator between each, to builder. |
|
StringBuilder |
appendTo(StringBuilder builder,
Object[] parts)
Appends the string representation of each of parts, using the previously configured
separator between each, to builder. |
|
StringBuilder |
appendTo(StringBuilder builder,
Object first,
Object second,
Object... rest)
Appends to builder the string representation of each of the remaining arguments. |
|
String |
join(Iterable<?> parts)
Returns a string containing the string representation of each of parts, using the
previously configured separator between each. |
|
String |
join(Iterator<?> parts)
Returns a string containing the string representation of each of parts, using the
previously configured separator between each. |
|
String |
join(Object[] parts)
Returns a string containing the string representation of each of parts, using the
previously configured separator between each. |
|
String |
join(Object first,
Object second,
Object... rest)
Returns a string containing the string representation of each argument, using the previously configured separator between each. |
|
static Joiner |
on(char separator)
Returns a joinKit which automatically places separator between consecutive elements. |
|
static Joiner |
on(String separator)
Returns a joinKit which automatically places separator between consecutive elements. |
|
Joiner |
skipNulls()
Returns a joinKit with the same behavior as this joinKit, except automatically skipping over any provided null elements. |
|
Joiner |
useForNull(String nullText)
Returns a joinKit with the same behavior as this one, except automatically substituting nullText for any provided null elements. |
|
Joiner.MapJoiner |
withKeyValueSeparator(String keyValueSeparator)
Returns a MapJoiner using the given key-value separator, and the same configuration as
this Joiner otherwise. |
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 方法详细信息 |
|---|
public static Joiner on(String separator)
separator between consecutive elements.
public static Joiner on(char separator)
separator between consecutive elements.
public <A extends Appendable> A appendTo(A appendable,
Iterable<?> parts)
throws IOException
parts, using the previously configured
separator between each, to appendable.
IOException
public <A extends Appendable> A appendTo(A appendable,
Iterator<?> parts)
throws IOException
parts, using the previously configured
separator between each, to appendable.
IOException
public final <A extends Appendable> A appendTo(A appendable,
Object[] parts)
throws IOException
parts, using the previously configured
separator between each, to appendable.
IOException
public final <A extends Appendable> A appendTo(A appendable,
Object first,
Object second,
Object... rest)
throws IOException
appendable the string representation of each of the remaining arguments.
IOException
public final StringBuilder appendTo(StringBuilder builder,
Iterable<?> parts)
parts, using the previously configured
separator between each, to builder. Identical to appendTo(Appendable,
Iterable), except that it does not throw IOException.
public final StringBuilder appendTo(StringBuilder builder,
Iterator<?> parts)
parts, using the previously configured
separator between each, to builder. Identical to appendTo(Appendable,
Iterable), except that it does not throw IOException.
public final StringBuilder appendTo(StringBuilder builder,
Object[] parts)
parts, using the previously configured
separator between each, to builder. Identical to appendTo(Appendable,
Iterable), except that it does not throw IOException.
public final StringBuilder appendTo(StringBuilder builder,
Object first,
Object second,
Object... rest)
builder the string representation of each of the remaining arguments.
Identical to appendTo(Appendable, Object, Object, Object...), except that it does not
throw IOException.
public final String join(Iterable<?> parts)
parts, using the
previously configured separator between each.
public final String join(Iterator<?> parts)
parts, using the
previously configured separator between each.
public final String join(Object[] parts)
parts, using the
previously configured separator between each.
public final String join(Object first,
Object second,
Object... rest)
public Joiner useForNull(String nullText)
nullText for any provided null elements.
public Joiner skipNulls()
public Joiner.MapJoiner withKeyValueSeparator(String keyValueSeparator)
MapJoiner using the given key-value separator, and the same configuration as
this Joiner otherwise.
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||