Home | History | Annotate | Download | only in base
      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      2 <!--NewPage-->
      3 <HTML>
      4 <HEAD>
      5 <!-- Generated by javadoc (build 1.6.0-google-internal) on Mon Jan 04 20:47:56 PST 2010 -->
      6 <TITLE>
      7 Objects.ToStringHelper (Guava Libraries 2010.01.04)
      8 </TITLE>
      9 
     10 <META NAME="date" CONTENT="2010-01-04">
     11 
     12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
     13 
     14 <SCRIPT type="text/javascript">
     15 function windowTitle()
     16 {
     17     if (location.href.indexOf('is-external=true') == -1) {
     18         parent.document.title="Objects.ToStringHelper (Guava Libraries 2010.01.04)";
     19     }
     20 }
     21 </SCRIPT>
     22 <NOSCRIPT>
     23 </NOSCRIPT>
     24 
     25 </HEAD>
     26 
     27 <BODY BGCOLOR="white" onload="windowTitle();">
     28 <HR>
     29 
     30 
     31 <!-- ========= START OF TOP NAVBAR ======= -->
     32 <A NAME="navbar_top"><!-- --></A>
     33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
     34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
     35 <TR>
     36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
     37 <A NAME="navbar_top_firstrow"><!-- --></A>
     38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
     39   <TR ALIGN="center" VALIGN="top">
     40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
     41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
     42   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
     43   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Objects.ToStringHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
     44   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
     45   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
     46   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
     47   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
     48   </TR>
     49 </TABLE>
     50 </TD>
     51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
     52 </EM>
     53 </TD>
     54 </TR>
     55 
     56 <TR>
     57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     58 &nbsp;<A HREF="../../../../com/google/common/base/Objects.html" title="class in com.google.common.base"><B>PREV CLASS</B></A>&nbsp;
     59 &nbsp;<A HREF="../../../../com/google/common/base/Preconditions.html" title="class in com.google.common.base"><B>NEXT CLASS</B></A></FONT></TD>
     60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     61   <A HREF="../../../../index.html?com/google/common/base/Objects.ToStringHelper.html" target="_top"><B>FRAMES</B></A>  &nbsp;
     62 &nbsp;<A HREF="Objects.ToStringHelper.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
     63 &nbsp;<SCRIPT type="text/javascript">
     64   <!--
     65   if(window==top) {
     66     document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
     67   }
     68   //-->
     69 </SCRIPT>
     70 <NOSCRIPT>
     71   <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
     72 </NOSCRIPT>
     73 
     74 
     75 </FONT></TD>
     76 </TR>
     77 <TR>
     78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     79   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
     80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     81 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
     82 </TR>
     83 </TABLE>
     84 <A NAME="skip-navbar_top"></A>
     85 <!-- ========= END OF TOP NAVBAR ========= -->
     86 
     87 <HR>
     88 <!-- ======== START OF CLASS DATA ======== -->
     89 <H2>
     90 <FONT SIZE="-1">
     91 com.google.common.base</FONT>
     92 <BR>
     93 Class Objects.ToStringHelper</H2>
     94 <PRE>
     95 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
     96   <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.base.Objects.ToStringHelper</B>
     97 </PRE>
     98 <DL>
     99 <DT><B>Enclosing class:</B><DD><A HREF="../../../../com/google/common/base/Objects.html" title="class in com.google.common.base">Objects</A></DD>
    100 </DL>
    101 <HR>
    102 <DL>
    103 <DT><PRE>public static class <B>Objects.ToStringHelper</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
    104 </PRE>
    105 
    106 <P>
    107 Support class for <A HREF="../../../../com/google/common/base/Objects.html#toStringHelper(java.lang.Object)"><CODE>Objects.toStringHelper(java.lang.Object)</CODE></A>.
    108 <P>
    109 
    110 <P>
    111 <DL>
    112 <DT><B>Since:</B></DT>
    113   <DD>2010.01.04 <b>tentative</b></DD>
    114 <DT><B>Author:</B></DT>
    115   <DD>Jason Lee</DD>
    116 </DL>
    117 <HR>
    118 
    119 <P>
    120 
    121 <!-- ========== METHOD SUMMARY =========== -->
    122 
    123 <A NAME="method_summary"><!-- --></A>
    124 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    125 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    126 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    127 <B>Method Summary</B></FONT></TH>
    128 </TR>
    129 <TR BGCOLOR="white" CLASS="TableRowColor">
    130 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    131 <CODE>&nbsp;<A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html" title="class in com.google.common.base">Objects.ToStringHelper</A></CODE></FONT></TD>
    132 <TD><CODE><B><A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html#add(java.lang.String, java.lang.Object)">add</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
    133     <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
    134 
    135 <BR>
    136 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a name/value pair to the formatted output in <code>name=value</code>
    137  format.</TD>
    138 </TR>
    139 <TR BGCOLOR="white" CLASS="TableRowColor">
    140 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    141 <CODE>&nbsp;<A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html" title="class in com.google.common.base">Objects.ToStringHelper</A></CODE></FONT></TD>
    142 <TD><CODE><B><A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html#addValue(java.lang.Object)">addValue</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
    143 
    144 <BR>
    145 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a value to the formatted output in <code>value</code> format.<p/>
    146 
    147  It is strongly encouraged to use <A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html#add(java.lang.String, java.lang.Object)"><CODE>add(String, Object)</CODE></A> instead and
    148  give value a readable name.</TD>
    149 </TR>
    150 <TR BGCOLOR="white" CLASS="TableRowColor">
    151 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    152 <CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
    153 <TD><CODE><B><A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html#toString()">toString</A></B>()</CODE>
    154 
    155 <BR>
    156 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the formatted string.</TD>
    157 </TR>
    158 </TABLE>
    159 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
    160 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    161 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
    162 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
    163 </TR>
    164 <TR BGCOLOR="white" CLASS="TableRowColor">
    165 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
    166 </TR>
    167 </TABLE>
    168 &nbsp;
    169 <P>
    170 
    171 <!-- ============ METHOD DETAIL ========== -->
    172 
    173 <A NAME="method_detail"><!-- --></A>
    174 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    175 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    176 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    177 <B>Method Detail</B></FONT></TH>
    178 </TR>
    179 </TABLE>
    180 
    181 <A NAME="add(java.lang.String, java.lang.Object)"><!-- --></A><H3>
    182 add</H3>
    183 <PRE>
    184 public <A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html" title="class in com.google.common.base">Objects.ToStringHelper</A> <B>add</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
    185                                   <FONT SIZE="-1"><A HREF="http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</A></FONT>
    186                                   <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</PRE>
    187 <DL>
    188 <DD>Adds a name/value pair to the formatted output in <code>name=value</code>
    189  format. If <code>value</code> is <code>null</code>, the string <code>"null"</code>
    190  is used.
    191 <P>
    192 <DD><DL>
    193 </DL>
    194 </DD>
    195 </DL>
    196 <HR>
    197 
    198 <A NAME="addValue(java.lang.Object)"><!-- --></A><H3>
    199 addValue</H3>
    200 <PRE>
    201 public <A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html" title="class in com.google.common.base">Objects.ToStringHelper</A> <B>addValue</B>(<FONT SIZE="-1"><A HREF="http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</A></FONT>
    202                                        <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</PRE>
    203 <DL>
    204 <DD>Adds a value to the formatted output in <code>value</code> format.<p/>
    205 
    206  It is strongly encouraged to use <A HREF="../../../../com/google/common/base/Objects.ToStringHelper.html#add(java.lang.String, java.lang.Object)"><CODE>add(String, Object)</CODE></A> instead and
    207  give value a readable name.
    208 <P>
    209 <DD><DL>
    210 </DL>
    211 </DD>
    212 </DL>
    213 <HR>
    214 
    215 <A NAME="toString()"><!-- --></A><H3>
    216 toString</H3>
    217 <PRE>
    218 public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
    219 <DL>
    220 <DD>Returns the formatted string.
    221 <P>
    222 <DD><DL>
    223 <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
    224 </DD>
    225 <DD><DL>
    226 </DL>
    227 </DD>
    228 </DL>
    229 <!-- ========= END OF CLASS DATA ========= -->
    230 <HR>
    231 
    232 
    233 <!-- ======= START OF BOTTOM NAVBAR ====== -->
    234 <A NAME="navbar_bottom"><!-- --></A>
    235 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
    236 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
    237 <TR>
    238 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
    239 <A NAME="navbar_bottom_firstrow"><!-- --></A>
    240 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
    241   <TR ALIGN="center" VALIGN="top">
    242   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
    243   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
    244   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
    245   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Objects.ToStringHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
    246   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
    247   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
    248   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
    249   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
    250   </TR>
    251 </TABLE>
    252 </TD>
    253 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
    254 </EM>
    255 </TD>
    256 </TR>
    257 
    258 <TR>
    259 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    260 &nbsp;<A HREF="../../../../com/google/common/base/Objects.html" title="class in com.google.common.base"><B>PREV CLASS</B></A>&nbsp;
    261 &nbsp;<A HREF="../../../../com/google/common/base/Preconditions.html" title="class in com.google.common.base"><B>NEXT CLASS</B></A></FONT></TD>
    262 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    263   <A HREF="../../../../index.html?com/google/common/base/Objects.ToStringHelper.html" target="_top"><B>FRAMES</B></A>  &nbsp;
    264 &nbsp;<A HREF="Objects.ToStringHelper.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
    265 &nbsp;<SCRIPT type="text/javascript">
    266   <!--
    267   if(window==top) {
    268     document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
    269   }
    270   //-->
    271 </SCRIPT>
    272 <NOSCRIPT>
    273   <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
    274 </NOSCRIPT>
    275 
    276 
    277 </FONT></TD>
    278 </TR>
    279 <TR>
    280 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    281   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
    282 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    283 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
    284 </TR>
    285 </TABLE>
    286 <A NAME="skip-navbar_bottom"></A>
    287 <!-- ======== END OF BOTTOM NAVBAR ======= -->
    288 
    289 <HR>
    290 
    291 </BODY>
    292 </HTML>
    293