public static final class Objects.ToStringHelper
extends java.lang.Object
Objects.toStringHelper(java.lang.Object)
.Modifier and Type | Method and Description |
---|---|
Objects.ToStringHelper |
add(java.lang.String name,
java.lang.Object value)
Adds a name/value pair to the formatted output in
name=value format. |
Objects.ToStringHelper |
omitNullValues()
Configures the
Objects.ToStringHelper so toString() will ignore properties with null
value. |
java.lang.String |
toString() |
public Objects.ToStringHelper omitNullValues()
Objects.ToStringHelper
so toString()
will ignore properties with null
value. The order of calling this method, relative to the add()
/addValue()
methods, is not significant.public Objects.ToStringHelper add(java.lang.String name, java.lang.Object value)
name=value
format. If value
is null
, the string "null"
is used, unless omitNullValues()
is
called, in which case this name/value pair will not be added.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2011-2018 Google. All Rights Reserved.