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:58 PST 2010 --> 6<TITLE> 7ImmutableMultiset.Builder (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"> 15function windowTitle() 16{ 17 if (location.href.indexOf('is-external=true') == -1) { 18 parent.document.title="ImmutableMultiset.Builder (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/ImmutableMultiset.Builder.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/collect/ImmutableMultiset.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 61 <A HREF="../../../../index.html?com/google/common/collect/ImmutableMultiset.Builder.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="ImmutableMultiset.Builder.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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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"> 91com.google.common.collect</FONT> 92<BR> 93Class ImmutableMultiset.Builder<E></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.collect.ImmutableMultiset.Builder<E></B> 97</PRE> 98<DL> 99<DT><B>Enclosing class:</B><DD><A HREF="../../../../com/google/common/collect/ImmutableMultiset.html" title="class in com.google.common.collect">ImmutableMultiset</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.html" title="type parameter in ImmutableMultiset">E</A>></DD> 100</DL> 101<HR> 102<DL> 103<DT><PRE>public static final class <B>ImmutableMultiset.Builder<E></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> 107A builder for creating immutable multiset instances, especially 108 <code>public static final</code> multisets ("constant multisets"). 109 110 <p>Example: 111 <pre> <code>public static final ImmutableMultiset<Bean> BEANS 112 = new ImmutableMultiset.Builder<Bean>() 113 .addCopies(Bean.COCOA, 4) 114 .addCopies(Bean.GARDEN, 6) 115 .addCopies(Bean.RED, 8) 116 .addCopies(Bean.BLACK_EYED, 10) 117 .build();</code></pre> 118 119 <p>Builder instances can be reused - it is safe to call <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#build()"><CODE>build()</CODE></A> 120 multiple times to build multiple multisets in series. Each multiset 121 is a superset of the multiset created before it. 122<P> 123 124<P> 125<HR> 126 127<P> 128 129<!-- ======== CONSTRUCTOR SUMMARY ======== --> 130 131<A NAME="constructor_summary"><!-- --></A> 132<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 133<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 134<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 135<B>Constructor Summary</B></FONT></TH> 136</TR> 137<TR BGCOLOR="white" CLASS="TableRowColor"> 138<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#ImmutableMultiset.Builder()">ImmutableMultiset.Builder</A></B>()</CODE> 139 140<BR> 141 Creates a new builder.</TD> 142</TR> 143</TABLE> 144 145<!-- ========== METHOD SUMMARY =========== --> 146 147<A NAME="method_summary"><!-- --></A> 148<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 149<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 150<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 151<B>Method Summary</B></FONT></TH> 152</TR> 153<TR BGCOLOR="white" CLASS="TableRowColor"> 154<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 155<CODE> <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>></CODE></FONT></TD> 156<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#add(E...)">add</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>... elements)</CODE> 157 158<BR> 159 Adds each element of <code>elements</code> to the <code>ImmutableMultiset</code>.</TD> 160</TR> 161<TR BGCOLOR="white" CLASS="TableRowColor"> 162<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 163<CODE> <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>></CODE></FONT></TD> 164<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#add(E)">add</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A> element)</CODE> 165 166<BR> 167 Adds <code>element</code> to the <code>ImmutableMultiset</code>.</TD> 168</TR> 169<TR BGCOLOR="white" CLASS="TableRowColor"> 170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 171<CODE> <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>></CODE></FONT></TD> 172<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#addAll(java.lang.Iterable)">addAll</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><? extends <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> elements)</CODE> 173 174<BR> 175 Adds each element of <code>elements</code> to the <code>ImmutableMultiset</code>.</TD> 176</TR> 177<TR BGCOLOR="white" CLASS="TableRowColor"> 178<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 179<CODE> <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>></CODE></FONT></TD> 180<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#addAll(java.util.Iterator)">addAll</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><? extends <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> elements)</CODE> 181 182<BR> 183 Adds each element of <code>elements</code> to the <code>ImmutableMultiset</code>.</TD> 184</TR> 185<TR BGCOLOR="white" CLASS="TableRowColor"> 186<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 187<CODE> <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>></CODE></FONT></TD> 188<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#addCopies(E, int)">addCopies</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A> element, 189 int occurrences)</CODE> 190 191<BR> 192 Adds a number of occurrences of an element to this <code>ImmutableMultiset</code>.</TD> 193</TR> 194<TR BGCOLOR="white" CLASS="TableRowColor"> 195<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 196<CODE> <A HREF="../../../../com/google/common/collect/ImmutableMultiset.html" title="class in com.google.common.collect">ImmutableMultiset</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>></CODE></FONT></TD> 197<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#build()">build</A></B>()</CODE> 198 199<BR> 200 Returns a newly-created <code>ImmutableMultiset</code> based on the contents 201 of the <code>Builder</code>.</TD> 202</TR> 203<TR BGCOLOR="white" CLASS="TableRowColor"> 204<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 205<CODE> <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>></CODE></FONT></TD> 206<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html#setCount(E, int)">setCount</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A> element, 207 int count)</CODE> 208 209<BR> 210 Adds or removes the necessary occurrences of an element such that the 211 element attains the desired count.</TD> 212</TR> 213</TABLE> 214 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 215<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 216<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 217<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> 218</TR> 219<TR BGCOLOR="white" CLASS="TableRowColor"> 220<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> 221</TR> 222</TABLE> 223 224<P> 225 226<!-- ========= CONSTRUCTOR DETAIL ======== --> 227 228<A NAME="constructor_detail"><!-- --></A> 229<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 230<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 231<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 232<B>Constructor Detail</B></FONT></TH> 233</TR> 234</TABLE> 235 236<A NAME="ImmutableMultiset.Builder()"><!-- --></A><H3> 237ImmutableMultiset.Builder</H3> 238<PRE> 239public <B>ImmutableMultiset.Builder</B>()</PRE> 240<DL> 241<DD>Creates a new builder. The returned builder is equivalent to the builder 242 generated by <A HREF="../../../../com/google/common/collect/ImmutableMultiset.html#builder()"><CODE>ImmutableMultiset.builder()</CODE></A>. 243<P> 244</DL> 245 246<!-- ============ METHOD DETAIL ========== --> 247 248<A NAME="method_detail"><!-- --></A> 249<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 250<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 251<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 252<B>Method Detail</B></FONT></TH> 253</TR> 254</TABLE> 255 256<A NAME="add(java.lang.Object)"><!-- --></A><A NAME="add(E)"><!-- --></A><H3> 257add</H3> 258<PRE> 259public <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> <B>add</B>(<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A> element)</PRE> 260<DL> 261<DD>Adds <code>element</code> to the <code>ImmutableMultiset</code>. 262<P> 263<DD><DL> 264</DL> 265</DD> 266<DD><DL> 267<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to add 268<DT><B>Returns:</B><DD>this <code>Builder</code> object 269<DT><B>Throws:</B> 270<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>element</code> is null</DL> 271</DD> 272</DL> 273<HR> 274 275<A NAME="addCopies(java.lang.Object,int)"><!-- --></A><A NAME="addCopies(E, int)"><!-- --></A><H3> 276addCopies</H3> 277<PRE> 278public <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> <B>addCopies</B>(<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A> element, 279 int occurrences)</PRE> 280<DL> 281<DD>Adds a number of occurrences of an element to this <code>ImmutableMultiset</code>. 282<P> 283<DD><DL> 284<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to add<DD><CODE>occurrences</CODE> - the number of occurrences of the element to add. May 285 be zero, in which case no change will be made. 286<DT><B>Returns:</B><DD>this <code>Builder</code> object 287<DT><B>Throws:</B> 288<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>element</code> is null 289<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>occurrences</code> is negative, or 290 if this operation would result in more than <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><CODE>Integer.MAX_VALUE</CODE></A> 291 occurrences of the element</DL> 292</DD> 293</DL> 294<HR> 295 296<A NAME="setCount(java.lang.Object,int)"><!-- --></A><A NAME="setCount(E, int)"><!-- --></A><H3> 297setCount</H3> 298<PRE> 299public <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> <B>setCount</B>(<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A> element, 300 int count)</PRE> 301<DL> 302<DD>Adds or removes the necessary occurrences of an element such that the 303 element attains the desired count. 304<P> 305<DD><DL> 306<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to add or remove occurrences of<DD><CODE>count</CODE> - the desired count of the element in this multiset 307<DT><B>Returns:</B><DD>this <code>Builder</code> object 308<DT><B>Throws:</B> 309<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>element</code> is null 310<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>count</code> is negative</DL> 311</DD> 312</DL> 313<HR> 314 315<A NAME="add(java.lang.Object[])"><!-- --></A><A NAME="add(E...)"><!-- --></A><H3> 316add</H3> 317<PRE> 318public <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> <B>add</B>(<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>... elements)</PRE> 319<DL> 320<DD>Adds each element of <code>elements</code> to the <code>ImmutableMultiset</code>. 321<P> 322<DD><DL> 323</DL> 324</DD> 325<DD><DL> 326<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements to add 327<DT><B>Returns:</B><DD>this <code>Builder</code> object 328<DT><B>Throws:</B> 329<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>elements</code> is null or contains a 330 null element</DL> 331</DD> 332</DL> 333<HR> 334 335<A NAME="addAll(java.lang.Iterable)"><!-- --></A><H3> 336addAll</H3> 337<PRE> 338public <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> <B>addAll</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><? extends <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> elements)</PRE> 339<DL> 340<DD>Adds each element of <code>elements</code> to the <code>ImmutableMultiset</code>. 341<P> 342<DD><DL> 343</DL> 344</DD> 345<DD><DL> 346<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the <code>Iterable</code> to add to the <code>ImmutableMultiset</code> 347<DT><B>Returns:</B><DD>this <code>Builder</code> object 348<DT><B>Throws:</B> 349<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>elements</code> is null or contains a 350 null element</DL> 351</DD> 352</DL> 353<HR> 354 355<A NAME="addAll(java.util.Iterator)"><!-- --></A><H3> 356addAll</H3> 357<PRE> 358public <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect">ImmutableMultiset.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> <B>addAll</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><? extends <A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> elements)</PRE> 359<DL> 360<DD>Adds each element of <code>elements</code> to the <code>ImmutableMultiset</code>. 361<P> 362<DD><DL> 363</DL> 364</DD> 365<DD><DL> 366<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements to add to the <code>ImmutableMultiset</code> 367<DT><B>Returns:</B><DD>this <code>Builder</code> object 368<DT><B>Throws:</B> 369<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>elements</code> is null or contains a 370 null element</DL> 371</DD> 372</DL> 373<HR> 374 375<A NAME="build()"><!-- --></A><H3> 376build</H3> 377<PRE> 378public <A HREF="../../../../com/google/common/collect/ImmutableMultiset.html" title="class in com.google.common.collect">ImmutableMultiset</A><<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="type parameter in ImmutableMultiset.Builder">E</A>> <B>build</B>()</PRE> 379<DL> 380<DD>Returns a newly-created <code>ImmutableMultiset</code> based on the contents 381 of the <code>Builder</code>. 382<P> 383<DD><DL> 384</DL> 385</DD> 386<DD><DL> 387</DL> 388</DD> 389</DL> 390<!-- ========= END OF CLASS DATA ========= --> 391<HR> 392 393 394<!-- ======= START OF BOTTOM NAVBAR ====== --> 395<A NAME="navbar_bottom"><!-- --></A> 396<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 397<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 398<TR> 399<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 400<A NAME="navbar_bottom_firstrow"><!-- --></A> 401<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 402 <TR ALIGN="center" VALIGN="top"> 403 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 404 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 405 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 406 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ImmutableMultiset.Builder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 407 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 408 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 409 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 410 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 411 </TR> 412</TABLE> 413</TD> 414<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 415</EM> 416</TD> 417</TR> 418 419<TR> 420<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 421 <A HREF="../../../../com/google/common/collect/ImmutableMultiset.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 422 <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 423<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 424 <A HREF="../../../../index.html?com/google/common/collect/ImmutableMultiset.Builder.html" target="_top"><B>FRAMES</B></A> 425 <A HREF="ImmutableMultiset.Builder.html" target="_top"><B>NO FRAMES</B></A> 426 <SCRIPT type="text/javascript"> 427 <!-- 428 if(window==top) { 429 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 430 } 431 //--> 432</SCRIPT> 433<NOSCRIPT> 434 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 435</NOSCRIPT> 436 437 438</FONT></TD> 439</TR> 440<TR> 441<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 442 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 443<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 444DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> 445</TR> 446</TABLE> 447<A NAME="skip-navbar_bottom"></A> 448<!-- ======== END OF BOTTOM NAVBAR ======= --> 449 450<HR> 451 452</BODY> 453</HTML> 454