Home | History | Annotate | Download | only in collect
      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>
      7 ImmutableSet.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">
     15 function windowTitle()
     16 {
     17     if (location.href.indexOf('is-external=true') == -1) {
     18         parent.document.title="ImmutableSet.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>&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/ImmutableSet.Builder.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/collect/ImmutableSet.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
     59 &nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSetMultimap.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/ImmutableSet.Builder.html" target="_top"><B>FRAMES</B></A>  &nbsp;
     62 &nbsp;<A HREF="ImmutableSet.Builder.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;<A HREF="#constructor_summary">CONSTR</A>&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;<A HREF="#constructor_detail">CONSTR</A>&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.collect</FONT>
     92 <BR>
     93 Class ImmutableSet.Builder&lt;E&gt;</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.ImmutableSet.Builder&lt;E&gt;</B>
     97 </PRE>
     98 <DL>
     99 <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A></DD>
    100 </DL>
    101 <DL>
    102 <DT><B>Enclosing class:</B><DD><A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</DD>
    103 </DL>
    104 <HR>
    105 <DL>
    106 <DT><PRE>public static class <B>ImmutableSet.Builder&lt;E&gt;</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>
    107 </PRE>
    108 
    109 <P>
    110 A builder for creating immutable set instances, especially
    111  <code>public static final</code> sets ("constant sets").
    112 
    113  <p>Example:
    114  <pre><code>public static final ImmutableSet&lt;Color&gt; GOOGLE_COLORS
    115        = new ImmutableSet.Builder&lt;Color&gt;()
    116            .addAll(WEBSAFE_COLORS)
    117            .add(new Color(0, 191, 255))
    118            .build();</code></pre>
    119 
    120  <p>Builder instances can be reused - it is safe to call <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html#build()"><CODE>build()</CODE></A>
    121  multiple times to build multiple sets in series. Each set
    122  is a superset of the set created before it.
    123 <P>
    124 
    125 <P>
    126 <HR>
    127 
    128 <P>
    129 
    130 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
    131 
    132 <A NAME="constructor_summary"><!-- --></A>
    133 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    134 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    135 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    136 <B>Constructor Summary</B></FONT></TH>
    137 </TR>
    138 <TR BGCOLOR="white" CLASS="TableRowColor">
    139 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html#ImmutableSet.Builder()">ImmutableSet.Builder</A></B>()</CODE>
    140 
    141 <BR>
    142 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new builder.</TD>
    143 </TR>
    144 </TABLE>
    145 &nbsp;
    146 <!-- ========== METHOD SUMMARY =========== -->
    147 
    148 <A NAME="method_summary"><!-- --></A>
    149 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    150 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    151 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    152 <B>Method Summary</B></FONT></TH>
    153 </TR>
    154 <TR BGCOLOR="white" CLASS="TableRowColor">
    155 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    156 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;</CODE></FONT></TD>
    157 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html#add(E...)">add</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>...&nbsp;elements)</CODE>
    158 
    159 <BR>
    160 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds each element of <code>elements</code> to the <code>ImmutableSet</code>,
    161  ignoring duplicate elements (only the first duplicate element is added).</TD>
    162 </TR>
    163 <TR BGCOLOR="white" CLASS="TableRowColor">
    164 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    165 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;</CODE></FONT></TD>
    166 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html#add(E)">add</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&nbsp;element)</CODE>
    167 
    168 <BR>
    169 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds <code>element</code> to the <code>ImmutableSet</code>.</TD>
    170 </TR>
    171 <TR BGCOLOR="white" CLASS="TableRowColor">
    172 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    173 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;</CODE></FONT></TD>
    174 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.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>&lt;? extends <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;&nbsp;elements)</CODE>
    175 
    176 <BR>
    177 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds each element of <code>elements</code> to the <code>ImmutableSet</code>,
    178  ignoring duplicate elements (only the first duplicate element is added).</TD>
    179 </TR>
    180 <TR BGCOLOR="white" CLASS="TableRowColor">
    181 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    182 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;</CODE></FONT></TD>
    183 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.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>&lt;? extends <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;&nbsp;elements)</CODE>
    184 
    185 <BR>
    186 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds each element of <code>elements</code> to the <code>ImmutableSet</code>,
    187  ignoring duplicate elements (only the first duplicate element is added).</TD>
    188 </TR>
    189 <TR BGCOLOR="white" CLASS="TableRowColor">
    190 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    191 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;</CODE></FONT></TD>
    192 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html#build()">build</A></B>()</CODE>
    193 
    194 <BR>
    195 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a newly-created <code>ImmutableSet</code> based on the contents of
    196  the <code>Builder</code>.</TD>
    197 </TR>
    198 </TABLE>
    199 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
    200 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    201 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
    202 <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>
    203 </TR>
    204 <TR BGCOLOR="white" CLASS="TableRowColor">
    205 <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>
    206 </TR>
    207 </TABLE>
    208 &nbsp;
    209 <P>
    210 
    211 <!-- ========= CONSTRUCTOR DETAIL ======== -->
    212 
    213 <A NAME="constructor_detail"><!-- --></A>
    214 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    215 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    216 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    217 <B>Constructor Detail</B></FONT></TH>
    218 </TR>
    219 </TABLE>
    220 
    221 <A NAME="ImmutableSet.Builder()"><!-- --></A><H3>
    222 ImmutableSet.Builder</H3>
    223 <PRE>
    224 public <B>ImmutableSet.Builder</B>()</PRE>
    225 <DL>
    226 <DD>Creates a new builder. The returned builder is equivalent to the builder
    227  generated by <A HREF="../../../../com/google/common/collect/ImmutableSet.html#builder()"><CODE>ImmutableSet.builder()</CODE></A>.
    228 <P>
    229 </DL>
    230 
    231 <!-- ============ METHOD DETAIL ========== -->
    232 
    233 <A NAME="method_detail"><!-- --></A>
    234 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    235 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    236 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    237 <B>Method Detail</B></FONT></TH>
    238 </TR>
    239 </TABLE>
    240 
    241 <A NAME="add(java.lang.Object)"><!-- --></A><A NAME="add(E)"><!-- --></A><H3>
    242 add</H3>
    243 <PRE>
    244 public <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt; <B>add</B>(<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&nbsp;element)</PRE>
    245 <DL>
    246 <DD>Adds <code>element</code> to the <code>ImmutableSet</code>.  If the <code>ImmutableSet</code> already contains <code>element</code>, then <code>add</code> has no
    247  effect (only the previously added element is retained).
    248 <P>
    249 <DD><DL>
    250 </DL>
    251 </DD>
    252 <DD><DL>
    253 <DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to add
    254 <DT><B>Returns:</B><DD>this <code>Builder</code> object
    255 <DT><B>Throws:</B>
    256 <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>
    257 </DD>
    258 </DL>
    259 <HR>
    260 
    261 <A NAME="add(java.lang.Object[])"><!-- --></A><A NAME="add(E...)"><!-- --></A><H3>
    262 add</H3>
    263 <PRE>
    264 public <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt; <B>add</B>(<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>...&nbsp;elements)</PRE>
    265 <DL>
    266 <DD>Adds each element of <code>elements</code> to the <code>ImmutableSet</code>,
    267  ignoring duplicate elements (only the first duplicate element is added).
    268 <P>
    269 <DD><DL>
    270 </DL>
    271 </DD>
    272 <DD><DL>
    273 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements to add
    274 <DT><B>Returns:</B><DD>this <code>Builder</code> object
    275 <DT><B>Throws:</B>
    276 <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
    277      null element</DL>
    278 </DD>
    279 </DL>
    280 <HR>
    281 
    282 <A NAME="addAll(java.lang.Iterable)"><!-- --></A><H3>
    283 addAll</H3>
    284 <PRE>
    285 public <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt; <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>&lt;? extends <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;&nbsp;elements)</PRE>
    286 <DL>
    287 <DD>Adds each element of <code>elements</code> to the <code>ImmutableSet</code>,
    288  ignoring duplicate elements (only the first duplicate element is added).
    289 <P>
    290 <DD><DL>
    291 </DL>
    292 </DD>
    293 <DD><DL>
    294 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the <code>Iterable</code> to add to the <code>ImmutableSet</code>
    295 <DT><B>Returns:</B><DD>this <code>Builder</code> object
    296 <DT><B>Throws:</B>
    297 <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
    298      null element</DL>
    299 </DD>
    300 </DL>
    301 <HR>
    302 
    303 <A NAME="addAll(java.util.Iterator)"><!-- --></A><H3>
    304 addAll</H3>
    305 <PRE>
    306 public <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt; <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>&lt;? extends <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt;&nbsp;elements)</PRE>
    307 <DL>
    308 <DD>Adds each element of <code>elements</code> to the <code>ImmutableSet</code>,
    309  ignoring duplicate elements (only the first duplicate element is added).
    310 <P>
    311 <DD><DL>
    312 </DL>
    313 </DD>
    314 <DD><DL>
    315 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements to add to the <code>ImmutableSet</code>
    316 <DT><B>Returns:</B><DD>this <code>Builder</code> object
    317 <DT><B>Throws:</B>
    318 <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
    319      null element</DL>
    320 </DD>
    321 </DL>
    322 <HR>
    323 
    324 <A NAME="build()"><!-- --></A><H3>
    325 build</H3>
    326 <PRE>
    327 public <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="type parameter in ImmutableSet.Builder">E</A>&gt; <B>build</B>()</PRE>
    328 <DL>
    329 <DD>Returns a newly-created <code>ImmutableSet</code> based on the contents of
    330  the <code>Builder</code>.
    331 <P>
    332 <DD><DL>
    333 </DL>
    334 </DD>
    335 <DD><DL>
    336 </DL>
    337 </DD>
    338 </DL>
    339 <!-- ========= END OF CLASS DATA ========= -->
    340 <HR>
    341 
    342 
    343 <!-- ======= START OF BOTTOM NAVBAR ====== -->
    344 <A NAME="navbar_bottom"><!-- --></A>
    345 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
    346 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
    347 <TR>
    348 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
    349 <A NAME="navbar_bottom_firstrow"><!-- --></A>
    350 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
    351   <TR ALIGN="center" VALIGN="top">
    352   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
    353   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
    354   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
    355   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ImmutableSet.Builder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
    356   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
    357   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
    358   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
    359   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
    360   </TR>
    361 </TABLE>
    362 </TD>
    363 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
    364 </EM>
    365 </TD>
    366 </TR>
    367 
    368 <TR>
    369 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    370 &nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
    371 &nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSetMultimap.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD>
    372 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    373   <A HREF="../../../../index.html?com/google/common/collect/ImmutableSet.Builder.html" target="_top"><B>FRAMES</B></A>  &nbsp;
    374 &nbsp;<A HREF="ImmutableSet.Builder.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
    375 &nbsp;<SCRIPT type="text/javascript">
    376   <!--
    377   if(window==top) {
    378     document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
    379   }
    380   //-->
    381 </SCRIPT>
    382 <NOSCRIPT>
    383   <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
    384 </NOSCRIPT>
    385 
    386 
    387 </FONT></TD>
    388 </TR>
    389 <TR>
    390 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    391   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
    392 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    393 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
    394 </TR>
    395 </TABLE>
    396 <A NAME="skip-navbar_bottom"></A>
    397 <!-- ======== END OF BOTTOM NAVBAR ======= -->
    398 
    399 <HR>
    400 
    401 </BODY>
    402 </HTML>
    403