public final class ToStringBuilder extends Object
Internal API: these methods are part of the internal API and may be removed, have their signature change, or have their access level decreased from public to protected, package, or private in future versions without notice.
| Modifier and Type | Method and Description |
|---|---|
ToStringBuilder |
append(String name,
Boolean value)
Append new boolean value.
|
ToStringBuilder |
append(String name,
Integer value)
Append new integer value.
|
<T> ToStringBuilder |
append(String name,
Iterable<T> values)
Append new boolean value.
|
ToStringBuilder |
append(String name,
Long value)
Append new long value.
|
ToStringBuilder |
append(String name,
Map<?,?> map)
Append new map value.
|
ToStringBuilder |
append(String name,
Object value)
Append new object value.
|
ToStringBuilder |
append(String name,
String value)
Append new string value.
|
String |
build()
Build the final string.
|
static ToStringBuilder |
create(Class<?> klass)
Create initial builder.
|
public static ToStringBuilder create(Class<?> klass)
klass - The class name.public ToStringBuilder append(String name, String value)
name - The name of the field.value - The field value.public ToStringBuilder append(String name, Integer value)
name - The name of the field.value - The field value.public ToStringBuilder append(String name, Long value)
name - The name of the field.value - The field value.public ToStringBuilder append(String name, Boolean value)
name - The name of the field.value - The field value.public ToStringBuilder append(String name, Map<?,?> map)
name - The name of the field.map - The map.public ToStringBuilder append(String name, Object value)
name - The name of the field.value - The field value.public <T> ToStringBuilder append(String name, Iterable<T> values)
T - Type of elements in collection.name - The name of the field.values - The collection of values.public String build()
Copyright © 2018. All rights reserved.