Package com.saperion.common.lang.format
Class ToStringParameters
java.lang.Object
com.saperion.common.lang.format.ToStringParameters
ToStringParameters
collects the parameter-informations for the standard Object.toString()
-format of a
ToStringParameterPossessor
.- Author:
- agz
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a parameter with the specified name and value to thisToStringParameters
.
-
Method Details
-
add
Adds a parameter with the specified name and value to thisToStringParameters
. If there is a parameter with the same name already the new parameter will NOT be added. This guarantees that in a diamond-shaped multiple inheritance situation the parameters of the topmost superclass are not added several times. Same name means instance equality, i.e. the same string literal constant name will not be added twice, but if one specifies a dynamically created name the parameter will be added twice. It is recommended (and the usual way) to use string literal constants fortoString
-parameter names always. The parameter name must not benull
(but may be an empty string). The parameter value may benull
.- Parameters:
parameterName
- parameter nameparameterValue
- parameter value
-