Package org.eclipse.emf.compare.utils
Class Objects.ToStringHelper
java.lang.Object
org.eclipse.emf.compare.utils.Objects.ToStringHelper
- Enclosing class:
- Objects
Fluent interface to build a String representation of an object following the same format as guava's
Objects.toStringHelper().
Resulting toString() will look like <className>{attribute=value, attribute1=value1} according to the
number of attributes that have been added
.
-
Constructor Summary
ConstructorDescriptionToStringHelper
(Object target) Builds a toStringHelper for the given target object. -
Method Summary
-
Constructor Details
-
ToStringHelper
Builds a toStringHelper for the given target object.- Parameters:
target
- Object for which we'll need a string representation.
-
-
Method Details
-
add
Adds the given key/value pair that needs to appear in the final string representation.Key/value pairs will appear in the final representation in the same order they have been added through here.
- Parameters:
name
- Name of the pair.value
- Value of the pair.- Returns:
this
instance.
-
toString
-