Class Objects.ToStringHelper
- Enclosing class:
Objects
Objects.toStringHelper(java.lang.Object)
.- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Adds a name/value pair to the formatted output inname=value
format.Deprecated.Adds a name/value pair to the formatted output inname=value
format.Deprecated.Adds a name/value pair to the formatted output inname=value
format.Deprecated.Adds a name/value pair to the formatted output inname=value
format.Deprecated.Adds a name/value pair to the formatted output inname=value
format.Deprecated.Adds a name/value pair to the formatted output inname=value
format.Deprecated.Adds a name/value pair to the formatted output inname=value
format.addValue
(boolean value) Deprecated.Adds an unnamed value to the formatted output.addValue
(char value) Deprecated.Adds an unnamed value to the formatted output.addValue
(double value) Deprecated.Adds an unnamed value to the formatted output.addValue
(float value) Deprecated.Adds an unnamed value to the formatted output.addValue
(int value) Deprecated.Adds an unnamed value to the formatted output.addValue
(long value) Deprecated.Adds an unnamed value to the formatted output.Deprecated.Adds an unnamed value to the formatted output.Deprecated.Configures theObjects.ToStringHelper
sotoString()
will ignore properties with null value.toString()
Deprecated.Returns a string in the format specified byObjects.toStringHelper(Object)
.
-
Method Details
-
omitNullValues
Deprecated.Configures theObjects.ToStringHelper
sotoString()
will ignore properties with null value. The order of calling this method, relative to theadd()
/addValue()
methods, is not significant.- Since:
- 12.0
-
add
Deprecated.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. -
add
Deprecated.Adds a name/value pair to the formatted output inname=value
format.- Since:
- 11.0 (source-compatible since 2.0)
-
add
Deprecated.Adds a name/value pair to the formatted output inname=value
format.- Since:
- 11.0 (source-compatible since 2.0)
-
add
Deprecated.Adds a name/value pair to the formatted output inname=value
format.- Since:
- 11.0 (source-compatible since 2.0)
-
add
Deprecated.Adds a name/value pair to the formatted output inname=value
format.- Since:
- 11.0 (source-compatible since 2.0)
-
add
Deprecated.Adds a name/value pair to the formatted output inname=value
format.- Since:
- 11.0 (source-compatible since 2.0)
-
add
Deprecated.Adds a name/value pair to the formatted output inname=value
format.- Since:
- 11.0 (source-compatible since 2.0)
-
addValue
Deprecated.Adds an unnamed value to the formatted output.It is strongly encouraged to use
add(String, Object)
instead and give value a readable name. -
addValue
Deprecated.Adds an unnamed value to the formatted output.It is strongly encouraged to use
add(String, boolean)
instead and give value a readable name.- Since:
- 11.0 (source-compatible since 2.0)
-
addValue
Deprecated.Adds an unnamed value to the formatted output.It is strongly encouraged to use
add(String, char)
instead and give value a readable name.- Since:
- 11.0 (source-compatible since 2.0)
-
addValue
Deprecated.Adds an unnamed value to the formatted output.It is strongly encouraged to use
add(String, double)
instead and give value a readable name.- Since:
- 11.0 (source-compatible since 2.0)
-
addValue
Deprecated.Adds an unnamed value to the formatted output.It is strongly encouraged to use
add(String, float)
instead and give value a readable name.- Since:
- 11.0 (source-compatible since 2.0)
-
addValue
Deprecated.Adds an unnamed value to the formatted output.It is strongly encouraged to use
add(String, int)
instead and give value a readable name.- Since:
- 11.0 (source-compatible since 2.0)
-
addValue
Deprecated.Adds an unnamed value to the formatted output.It is strongly encouraged to use
add(String, long)
instead and give value a readable name.- Since:
- 11.0 (source-compatible since 2.0)
-
toString
Deprecated.Returns a string in the format specified byObjects.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).
-