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 Joiner (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="Joiner (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> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Joiner.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 <A HREF="../../../../com/google/common/base/Functions.html" title="class in com.google.common.base"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/base/Joiner.MapJoiner.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/Joiner.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="Joiner.html" target="_top"><B>NO FRAMES</B></A> 63 <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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81 DETAIL: FIELD | CONSTR | <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 Joiner</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.Joiner</B> 97 </PRE> 98 <HR> 99 <DL> 100 <DT><PRE>public class <B>Joiner</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> 101 </PRE> 102 103 <P> 104 An object which joins pieces of text (specified as an array, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><CODE>Iterable</CODE></A>, varargs or even a <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A>) with a separator. It either 105 appends the results to an <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang"><CODE>Appendable</CODE></A> or returns them as a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><CODE>String</CODE></A>. Example: <pre> <code>Joiner joiner = Joiner.on("; ").skipNulls(); 106 . . . 107 return joiner.join("Harry", null, "Ron", "Hermione");</code></pre> 108 109 This returns the string <code>"Harry; Ron; Hermione"</code>. Note that all input 110 elements are converted to strings using <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"><CODE>Object.toString()</CODE></A> before 111 being appended. 112 113 <p>If neither <A HREF="../../../../com/google/common/base/Joiner.html#skipNulls()"><CODE>skipNulls()</CODE></A> nor <A HREF="../../../../com/google/common/base/Joiner.html#useForNull(java.lang.String)"><CODE>useForNull(String)</CODE></A> is 114 specified, the joining methods will throw <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><CODE>NullPointerException</CODE></A> if any 115 given element is null. 116 <P> 117 118 <P> 119 <DL> 120 <DT><B>Since:</B></DT> 121 <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD> 122 <DT><B>Author:</B></DT> 123 <DD>Kevin Bourrillion</DD> 124 </DL> 125 <HR> 126 127 <P> 128 <!-- ======== NESTED CLASS SUMMARY ======== --> 129 130 <A NAME="nested_class_summary"><!-- --></A> 131 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 132 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 133 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 134 <B>Nested Class Summary</B></FONT></TH> 135 </TR> 136 <TR BGCOLOR="white" CLASS="TableRowColor"> 137 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 138 <CODE>static class</CODE></FONT></TD> 139 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.MapJoiner.html" title="class in com.google.common.base">Joiner.MapJoiner</A></B></CODE> 140 141 <BR> 142 An object that joins map entries in the same manner as <code>Joiner</code> joins 143 iterables and arrays.</TD> 144 </TR> 145 </TABLE> 146 147 <!-- ========== METHOD SUMMARY =========== --> 148 149 <A NAME="method_summary"><!-- --></A> 150 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 151 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 152 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 153 <B>Method Summary</B></FONT></TH> 154 </TR> 155 <TR BGCOLOR="white" CLASS="TableRowColor"> 156 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 157 <CODE> 158 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 159 <TR ALIGN="right" VALIGN=""> 160 <TD NOWRAP><FONT SIZE="-1"> 161 <CODE><A extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>> 162 <BR> 163 A</CODE></FONT></TD> 164 </TR> 165 </TABLE> 166 </CODE></FONT></TD> 167 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#appendTo(A, java.lang.Iterable)">appendTo</A></B>(A appendable, 168 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><?> parts)</CODE> 169 170 <BR> 171 Appends the string representation of each of <code>parts</code>, using the 172 previously configured separator between each, to <code>appendable</code>.</TD> 173 </TR> 174 <TR BGCOLOR="white" CLASS="TableRowColor"> 175 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 176 <CODE> 177 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 178 <TR ALIGN="right" VALIGN=""> 179 <TD NOWRAP><FONT SIZE="-1"> 180 <CODE><A extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>> 181 <BR> 182 A</CODE></FONT></TD> 183 </TR> 184 </TABLE> 185 </CODE></FONT></TD> 186 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#appendTo(A, java.lang.Object[])">appendTo</A></B>(A appendable, 187 <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>[] parts)</CODE> 188 189 <BR> 190 Appends the string representation of each of <code>parts</code>, using the 191 previously configured separator between each, to <code>appendable</code>.</TD> 192 </TR> 193 <TR BGCOLOR="white" CLASS="TableRowColor"> 194 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 195 <CODE> 196 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 197 <TR ALIGN="right" VALIGN=""> 198 <TD NOWRAP><FONT SIZE="-1"> 199 <CODE><A extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>> 200 <BR> 201 A</CODE></FONT></TD> 202 </TR> 203 </TABLE> 204 </CODE></FONT></TD> 205 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#appendTo(A, java.lang.Object, java.lang.Object, java.lang.Object...)">appendTo</A></B>(A appendable, 206 <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> first, 207 <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> second, 208 <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>... rest)</CODE> 209 210 <BR> 211 Appends to <code>appendable</code> the string representation of each of the 212 remaining arguments.</TD> 213 </TR> 214 <TR BGCOLOR="white" CLASS="TableRowColor"> 215 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 216 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A></CODE></FONT></TD> 217 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#appendTo(java.lang.StringBuilder, java.lang.Iterable)">appendTo</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> builder, 218 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><?> parts)</CODE> 219 220 <BR> 221 Appends the string representation of each of <code>parts</code>, using the 222 previously configured separator between each, to <code>builder</code>.</TD> 223 </TR> 224 <TR BGCOLOR="white" CLASS="TableRowColor"> 225 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 226 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A></CODE></FONT></TD> 227 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#appendTo(java.lang.StringBuilder, java.lang.Object[])">appendTo</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> builder, 228 <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>[] parts)</CODE> 229 230 <BR> 231 Appends the string representation of each of <code>parts</code>, using the 232 previously configured separator between each, to <code>builder</code>.</TD> 233 </TR> 234 <TR BGCOLOR="white" CLASS="TableRowColor"> 235 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 236 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A></CODE></FONT></TD> 237 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#appendTo(java.lang.StringBuilder, java.lang.Object, java.lang.Object, java.lang.Object...)">appendTo</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> builder, 238 <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> first, 239 <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> second, 240 <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>... rest)</CODE> 241 242 <BR> 243 Appends to <code>builder</code> the string representation of each of the 244 remaining arguments.</TD> 245 </TR> 246 <TR BGCOLOR="white" CLASS="TableRowColor"> 247 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 248 <CODE> <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> 249 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#join(java.lang.Iterable)">join</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><?> parts)</CODE> 250 251 <BR> 252 Returns a string containing the string representation of each of <code>parts</code>, using the previously configured separator between each.</TD> 253 </TR> 254 <TR BGCOLOR="white" CLASS="TableRowColor"> 255 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 256 <CODE> <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> 257 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#join(java.lang.Object[])">join</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>[] parts)</CODE> 258 259 <BR> 260 Returns a string containing the string representation of each of <code>parts</code>, using the previously configured separator between each.</TD> 261 </TR> 262 <TR BGCOLOR="white" CLASS="TableRowColor"> 263 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 264 <CODE> <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> 265 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#join(java.lang.Object, java.lang.Object, java.lang.Object...)">join</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> first, 266 <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> second, 267 <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>... rest)</CODE> 268 269 <BR> 270 Returns a string containing the string representation of each argument, 271 using the previously configured separator between each.</TD> 272 </TR> 273 <TR BGCOLOR="white" CLASS="TableRowColor"> 274 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 275 <CODE>static <A HREF="../../../../com/google/common/base/Joiner.html" title="class in com.google.common.base">Joiner</A></CODE></FONT></TD> 276 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#on(char)">on</A></B>(char separator)</CODE> 277 278 <BR> 279 Returns a joiner which automatically places <code>separator</code> between 280 consecutive elements.</TD> 281 </TR> 282 <TR BGCOLOR="white" CLASS="TableRowColor"> 283 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 284 <CODE>static <A HREF="../../../../com/google/common/base/Joiner.html" title="class in com.google.common.base">Joiner</A></CODE></FONT></TD> 285 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#on(java.lang.String)">on</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> separator)</CODE> 286 287 <BR> 288 Returns a joiner which automatically places <code>separator</code> between 289 consecutive elements.</TD> 290 </TR> 291 <TR BGCOLOR="white" CLASS="TableRowColor"> 292 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 293 <CODE> <A HREF="../../../../com/google/common/base/Joiner.html" title="class in com.google.common.base">Joiner</A></CODE></FONT></TD> 294 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#skipNulls()">skipNulls</A></B>()</CODE> 295 296 <BR> 297 Returns a joiner with the same behavior as this joiner, except 298 automatically skipping over any provided null elements.</TD> 299 </TR> 300 <TR BGCOLOR="white" CLASS="TableRowColor"> 301 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 302 <CODE> <A HREF="../../../../com/google/common/base/Joiner.html" title="class in com.google.common.base">Joiner</A></CODE></FONT></TD> 303 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#useForNull(java.lang.String)">useForNull</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> nullText)</CODE> 304 305 <BR> 306 Returns a joiner with the same behavior as this one, except automatically 307 substituting <code>nullText</code> for any provided null elements.</TD> 308 </TR> 309 <TR BGCOLOR="white" CLASS="TableRowColor"> 310 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 311 <CODE> <A HREF="../../../../com/google/common/base/Joiner.MapJoiner.html" title="class in com.google.common.base">Joiner.MapJoiner</A></CODE></FONT></TD> 312 <TD><CODE><B><A HREF="../../../../com/google/common/base/Joiner.html#withKeyValueSeparator(java.lang.String)">withKeyValueSeparator</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> keyValueSeparator)</CODE> 313 314 <BR> 315 Returns a <code>MapJoiner</code> using the given key-value separator, and the 316 same configuration as this <code>Joiner</code> otherwise.</TD> 317 </TR> 318 </TABLE> 319 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 320 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 321 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 322 <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> 323 </TR> 324 <TR BGCOLOR="white" CLASS="TableRowColor"> 325 <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#toString()" title="class or interface in java.lang">toString</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> 326 </TR> 327 </TABLE> 328 329 <P> 330 331 <!-- ============ METHOD DETAIL ========== --> 332 333 <A NAME="method_detail"><!-- --></A> 334 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 335 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 336 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 337 <B>Method Detail</B></FONT></TH> 338 </TR> 339 </TABLE> 340 341 <A NAME="on(java.lang.String)"><!-- --></A><H3> 342 on</H3> 343 <PRE> 344 public static <A HREF="../../../../com/google/common/base/Joiner.html" title="class in com.google.common.base">Joiner</A> <B>on</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> separator)</PRE> 345 <DL> 346 <DD>Returns a joiner which automatically places <code>separator</code> between 347 consecutive elements. 348 <P> 349 <DD><DL> 350 </DL> 351 </DD> 352 </DL> 353 <HR> 354 355 <A NAME="on(char)"><!-- --></A><H3> 356 on</H3> 357 <PRE> 358 public static <A HREF="../../../../com/google/common/base/Joiner.html" title="class in com.google.common.base">Joiner</A> <B>on</B>(char separator)</PRE> 359 <DL> 360 <DD>Returns a joiner which automatically places <code>separator</code> between 361 consecutive elements. 362 <P> 363 <DD><DL> 364 </DL> 365 </DD> 366 </DL> 367 <HR> 368 369 <A NAME="appendTo(java.lang.Appendable,java.lang.Iterable)"><!-- --></A><A NAME="appendTo(A, java.lang.Iterable)"><!-- --></A><H3> 370 appendTo</H3> 371 <PRE> 372 public <A extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>> A <B>appendTo</B>(A appendable, 373 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><?> parts) 374 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> 375 <DL> 376 <DD>Appends the string representation of each of <code>parts</code>, using the 377 previously configured separator between each, to <code>appendable</code>. 378 <P> 379 <DD><DL> 380 381 <DT><B>Throws:</B> 382 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> 383 </DD> 384 </DL> 385 <HR> 386 387 <A NAME="appendTo(java.lang.Appendable,java.lang.Object[])"><!-- --></A><A NAME="appendTo(A, java.lang.Object[])"><!-- --></A><H3> 388 appendTo</H3> 389 <PRE> 390 public final <A extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>> A <B>appendTo</B>(A appendable, 391 <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>[] parts) 392 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> 393 <DL> 394 <DD>Appends the string representation of each of <code>parts</code>, using the 395 previously configured separator between each, to <code>appendable</code>. 396 <P> 397 <DD><DL> 398 399 <DT><B>Throws:</B> 400 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> 401 </DD> 402 </DL> 403 <HR> 404 405 <A NAME="appendTo(java.lang.Appendable,java.lang.Object,java.lang.Object,java.lang.Object[])"><!-- --></A><A NAME="appendTo(A, java.lang.Object, java.lang.Object, java.lang.Object...)"><!-- --></A><H3> 406 appendTo</H3> 407 <PRE> 408 public final <A extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</A>> A <B>appendTo</B>(A appendable, 409 <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> 410 <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> first, 411 <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> 412 <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> second, 413 <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>... rest) 414 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> 415 <DL> 416 <DD>Appends to <code>appendable</code> the string representation of each of the 417 remaining arguments. 418 <P> 419 <DD><DL> 420 421 <DT><B>Throws:</B> 422 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> 423 </DD> 424 </DL> 425 <HR> 426 427 <A NAME="appendTo(java.lang.StringBuilder, java.lang.Iterable)"><!-- --></A><H3> 428 appendTo</H3> 429 <PRE> 430 public final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> <B>appendTo</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> builder, 431 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><?> parts)</PRE> 432 <DL> 433 <DD>Appends the string representation of each of <code>parts</code>, using the 434 previously configured separator between each, to <code>builder</code>. Identical 435 to <A HREF="../../../../com/google/common/base/Joiner.html#appendTo(A, java.lang.Iterable)"><CODE>appendTo(Appendable, Iterable)</CODE></A>, except that it does not throw 436 <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><CODE>IOException</CODE></A>. 437 <P> 438 <DD><DL> 439 </DL> 440 </DD> 441 </DL> 442 <HR> 443 444 <A NAME="appendTo(java.lang.StringBuilder, java.lang.Object[])"><!-- --></A><H3> 445 appendTo</H3> 446 <PRE> 447 public final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> <B>appendTo</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> builder, 448 <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>[] parts)</PRE> 449 <DL> 450 <DD>Appends the string representation of each of <code>parts</code>, using the 451 previously configured separator between each, to <code>builder</code>. Identical 452 to <A HREF="../../../../com/google/common/base/Joiner.html#appendTo(A, java.lang.Iterable)"><CODE>appendTo(Appendable, Iterable)</CODE></A>, except that it does not throw 453 <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><CODE>IOException</CODE></A>. 454 <P> 455 <DD><DL> 456 </DL> 457 </DD> 458 </DL> 459 <HR> 460 461 <A NAME="appendTo(java.lang.StringBuilder, java.lang.Object, java.lang.Object, java.lang.Object...)"><!-- --></A><H3> 462 appendTo</H3> 463 <PRE> 464 public final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> <B>appendTo</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</A> builder, 465 <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> 466 <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> first, 467 <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> 468 <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> second, 469 <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>... rest)</PRE> 470 <DL> 471 <DD>Appends to <code>builder</code> the string representation of each of the 472 remaining arguments. Identical to <A HREF="../../../../com/google/common/base/Joiner.html#appendTo(A, java.lang.Object, java.lang.Object, java.lang.Object...)"><CODE>appendTo(Appendable, Object, 473 Object, Object[])</CODE></A>, except that it does not throw <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><CODE>IOException</CODE></A>. 474 <P> 475 <DD><DL> 476 </DL> 477 </DD> 478 </DL> 479 <HR> 480 481 <A NAME="join(java.lang.Iterable)"><!-- --></A><H3> 482 join</H3> 483 <PRE> 484 public final <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>join</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><?> parts)</PRE> 485 <DL> 486 <DD>Returns a string containing the string representation of each of <code>parts</code>, using the previously configured separator between each. 487 <P> 488 <DD><DL> 489 </DL> 490 </DD> 491 </DL> 492 <HR> 493 494 <A NAME="join(java.lang.Object[])"><!-- --></A><H3> 495 join</H3> 496 <PRE> 497 public final <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>join</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>[] parts)</PRE> 498 <DL> 499 <DD>Returns a string containing the string representation of each of <code>parts</code>, using the previously configured separator between each. 500 <P> 501 <DD><DL> 502 </DL> 503 </DD> 504 </DL> 505 <HR> 506 507 <A NAME="join(java.lang.Object, java.lang.Object, java.lang.Object...)"><!-- --></A><H3> 508 join</H3> 509 <PRE> 510 public final <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>join</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> 511 <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> first, 512 <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> 513 <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> second, 514 <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>... rest)</PRE> 515 <DL> 516 <DD>Returns a string containing the string representation of each argument, 517 using the previously configured separator between each. 518 <P> 519 <DD><DL> 520 </DL> 521 </DD> 522 </DL> 523 <HR> 524 525 <A NAME="useForNull(java.lang.String)"><!-- --></A><H3> 526 useForNull</H3> 527 <PRE> 528 public <A HREF="../../../../com/google/common/base/Joiner.html" title="class in com.google.common.base">Joiner</A> <B>useForNull</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> nullText)</PRE> 529 <DL> 530 <DD>Returns a joiner with the same behavior as this one, except automatically 531 substituting <code>nullText</code> for any provided null elements. 532 <P> 533 <DD><DL> 534 </DL> 535 </DD> 536 </DL> 537 <HR> 538 539 <A NAME="skipNulls()"><!-- --></A><H3> 540 skipNulls</H3> 541 <PRE> 542 public <A HREF="../../../../com/google/common/base/Joiner.html" title="class in com.google.common.base">Joiner</A> <B>skipNulls</B>()</PRE> 543 <DL> 544 <DD>Returns a joiner with the same behavior as this joiner, except 545 automatically skipping over any provided null elements. 546 <P> 547 <DD><DL> 548 </DL> 549 </DD> 550 </DL> 551 <HR> 552 553 <A NAME="withKeyValueSeparator(java.lang.String)"><!-- --></A><H3> 554 withKeyValueSeparator</H3> 555 <PRE> 556 public <A HREF="../../../../com/google/common/base/Joiner.MapJoiner.html" title="class in com.google.common.base">Joiner.MapJoiner</A> <B>withKeyValueSeparator</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> keyValueSeparator)</PRE> 557 <DL> 558 <DD>Returns a <code>MapJoiner</code> using the given key-value separator, and the 559 same configuration as this <code>Joiner</code> otherwise. 560 <P> 561 <DD><DL> 562 </DL> 563 </DD> 564 </DL> 565 <!-- ========= END OF CLASS DATA ========= --> 566 <HR> 567 568 569 <!-- ======= START OF BOTTOM NAVBAR ====== --> 570 <A NAME="navbar_bottom"><!-- --></A> 571 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 572 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 573 <TR> 574 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 575 <A NAME="navbar_bottom_firstrow"><!-- --></A> 576 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 577 <TR ALIGN="center" VALIGN="top"> 578 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 579 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 580 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 581 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Joiner.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 582 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 583 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 584 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 585 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 586 </TR> 587 </TABLE> 588 </TD> 589 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 590 </EM> 591 </TD> 592 </TR> 593 594 <TR> 595 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 596 <A HREF="../../../../com/google/common/base/Functions.html" title="class in com.google.common.base"><B>PREV CLASS</B></A> 597 <A HREF="../../../../com/google/common/base/Joiner.MapJoiner.html" title="class in com.google.common.base"><B>NEXT CLASS</B></A></FONT></TD> 598 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 599 <A HREF="../../../../index.html?com/google/common/base/Joiner.html" target="_top"><B>FRAMES</B></A> 600 <A HREF="Joiner.html" target="_top"><B>NO FRAMES</B></A> 601 <SCRIPT type="text/javascript"> 602 <!-- 603 if(window==top) { 604 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 605 } 606 //--> 607 </SCRIPT> 608 <NOSCRIPT> 609 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 610 </NOSCRIPT> 611 612 613 </FONT></TD> 614 </TR> 615 <TR> 616 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 617 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 618 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 619 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 620 </TR> 621 </TABLE> 622 <A NAME="skip-navbar_bottom"></A> 623 <!-- ======== END OF BOTTOM NAVBAR ======= --> 624 625 <HR> 626 627 </BODY> 628 </HTML> 629