com.google.gdata.util.common.base
Class Objects.ToStringHelper

java.lang.Object
  extended by com.google.gdata.util.common.base.Objects.ToStringHelper
Enclosing class:
Objects

public static class Objects.ToStringHelper
extends java.lang.Object

Helper class for generating consistent toString across ads/api pojos.

This class is made to support Objects.toStringHelper(Object).

See Also:
Objects.toStringHelper(Object)

Method Summary
 Objects.ToStringHelper add(java.lang.String name, java.lang.Object value)
          Adds a name/value pair to the formatted output in name=value format.
 Objects.ToStringHelper addValue(java.lang.Object value)
          Adds a value to the formatted output in value format.

It is strongly encouraged to use add(String, Object) instead and give value a readable name.

 java.lang.String toString()
          Returns the formatted string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

add

public Objects.ToStringHelper add(java.lang.String name,
                                  java.lang.Object value)
Adds a name/value pair to the formatted output in name=value format. If value is null, the string "null" is used.


addValue

public Objects.ToStringHelper addValue(java.lang.Object value)
Adds a value to the formatted output in value format.

It is strongly encouraged to use add(String, Object) instead and give value a readable name.


toString

public java.lang.String toString()
Returns the formatted string.

Overrides:
toString in class java.lang.Object