Package com.saperion.common.lang.format
Class ToStringParameters
- java.lang.Object
-
- com.saperion.common.lang.format.ToStringParameters
-
public final class ToStringParameters extends java.lang.Object
ToStringParameters
collects the parameter-informations for the standardObject.toString()
-format of aToStringParameterPossessor
.- Author:
- agz
- See Also:
ToStringParameterPossessor
,ToStringFormatter.format(ToStringParameterPossessor)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.String parameterName, java.lang.Object parameterValue)
Adds a parameter with the specified name and value to thisToStringParameters
.
-
-
-
Method Detail
-
add
public void add(java.lang.String parameterName, java.lang.Object parameterValue)
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
-
-