Package org.togglz.core.util
Class MoreObjects.ToStringHelper
- java.lang.Object
-
- org.togglz.core.util.MoreObjects.ToStringHelper
-
- Enclosing class:
- MoreObjects
public static final class MoreObjects.ToStringHelper extends Object
Support class forMoreObjects.toStringHelper(java.lang.Object).- Since:
- 2.0
- Author:
- Jason Lee
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MoreObjects.ToStringHelperadd(String name, boolean value)Adds a name/value pair to the formatted output inname=valueformat.MoreObjects.ToStringHelperadd(String name, char value)Adds a name/value pair to the formatted output inname=valueformat.MoreObjects.ToStringHelperadd(String name, double value)Adds a name/value pair to the formatted output inname=valueformat.MoreObjects.ToStringHelperadd(String name, float value)Adds a name/value pair to the formatted output inname=valueformat.MoreObjects.ToStringHelperadd(String name, int value)Adds a name/value pair to the formatted output inname=valueformat.MoreObjects.ToStringHelperadd(String name, long value)Adds a name/value pair to the formatted output inname=valueformat.MoreObjects.ToStringHelperadd(String name, Object value)Adds a name/value pair to the formatted output inname=valueformat.StringtoString()Returns a string in the format specified byMoreObjects.toStringHelper(Object).
-
-
-
Method Detail
-
add
public MoreObjects.ToStringHelper add(String name, Object value)
Adds a name/value pair to the formatted output inname=valueformat. Ifvalueisnull, the string"null"is used in which case this name/value pair will not be added.
-
add
public MoreObjects.ToStringHelper add(String name, boolean value)
Adds a name/value pair to the formatted output inname=valueformat.- Since:
- 11.0 (source-compatible since 2.0)
-
add
public MoreObjects.ToStringHelper add(String name, char value)
Adds a name/value pair to the formatted output inname=valueformat.- Since:
- 11.0 (source-compatible since 2.0)
-
add
public MoreObjects.ToStringHelper add(String name, double value)
Adds a name/value pair to the formatted output inname=valueformat.- Since:
- 11.0 (source-compatible since 2.0)
-
add
public MoreObjects.ToStringHelper add(String name, float value)
Adds a name/value pair to the formatted output inname=valueformat.- Since:
- 11.0 (source-compatible since 2.0)
-
add
public MoreObjects.ToStringHelper add(String name, int value)
Adds a name/value pair to the formatted output inname=valueformat.- Since:
- 11.0 (source-compatible since 2.0)
-
add
public MoreObjects.ToStringHelper add(String name, long value)
Adds a name/value pair to the formatted output inname=valueformat.- Since:
- 11.0 (source-compatible since 2.0)
-
toString
public String 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).
-
-