Package com.google.api.client.util
Class Objects.ToStringHelper
- java.lang.Object
-
- com.google.api.client.util.Objects.ToStringHelper
-
- Enclosing class:
- Objects
public static final class Objects.ToStringHelper extends Object
Support class forObjects.toStringHelper(java.lang.Object)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objects.ToStringHelper
add(String name, Object value)
Adds a name/value pair to the formatted output inname=value
format.Objects.ToStringHelper
omitNullValues()
Configures theObjects.ToStringHelper
sotoString()
will ignore properties with null value.String
toString()
-
-
-
Method Detail
-
omitNullValues
public Objects.ToStringHelper omitNullValues()
Configures theObjects.ToStringHelper
sotoString()
will ignore properties with null value. The order of calling this method, relative to theadd()
/addValue()
methods, is not significant.
-
add
public Objects.ToStringHelper add(String name, Object value)
Adds a name/value pair to the formatted output inname=value
format. Ifvalue
isnull
, the string"null"
is used, unlessomitNullValues()
is called, in which case this name/value pair will not be added.
-
-