@NotThreadSafe public final class ToString extends Object
Object.toString() across the SDK.
 
 ToString.builder("Person")
         .add("name", name)
         .add("age", age)
         .build();
 | Modifier and Type | Method and Description | 
|---|---|
| ToString | add(String fieldName,
   Object field)Add a field to the to-string result. | 
| String | build()Convert this result to a string. | 
| static ToString | builder(String className)Create a to-string result builder for the given class name. | 
| static String | create(String className)Create a to-string result for the given class name. | 
public static String create(String className)
public static ToString builder(String className)
className - The name of the class being toString'dpublic ToString add(String fieldName, Object field)
fieldName - The name of the field. Must not be null.field - The value of the field. Value is ignored if null.public String build()
Copyright © 2019. All rights reserved.