Class MoreObjects.ToStringHelper
java.lang.Object
org.glassfish.jersey.internal.guava.MoreObjects.ToStringHelper
- Enclosing class:
- MoreObjects
Support class for
MoreObjects.toStringHelper(java.lang.Object)
.- Since:
- 18.0 (since 2.0 as
Objects.ToStringHelper
. - Author:
- Jason Lee
-
Method Summary
Modifier and TypeMethodDescriptionAdds a name/value pair to the formatted output inname=value
format.Adds a name/value pair to the formatted output inname=value
format.Adds a name/value pair to the formatted output inname=value
format.toString()
Returns a string in the format specified byMoreObjects.toStringHelper(Object)
.
-
Method Details
-
add
Adds a name/value pair to the formatted output inname=value
format. Ifvalue
isnull
, the string"null"
is used, unless#omitNullValues()
is called, in which case this name/value pair will not be added. -
add
Adds a name/value pair to the formatted output inname=value
format.- Since:
- 18.0 (since 11.0 as
Objects.ToStringHelper.omitNullValues()
.
-
add
Adds a name/value pair to the formatted output inname=value
format.- Since:
- 18.0 (since 11.0 as
Objects.ToStringHelper.omitNullValues()
.
-
toString
Returns a string in the format specified byMoreObjects.toStringHelper(Object)
.After calling this method, you can keep adding more properties to later call toString() again and get a more complete representation of the same object; but properties cannot be removed, so this only allows limited reuse of the helper instance. The helper allows duplication of properties (multiple name/value pairs with the same name can be added).
-