• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>
7ImmutableSet (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="ImmutableSet (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.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/ImmutableMultiset.Builder.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.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.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="ImmutableSet.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;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91com.google.common.collect</FONT>
92<BR>
93Class ImmutableSet&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 "><A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="class in com.google.common.collect">com.google.common.collect.ImmutableCollection</A>&lt;E&gt;
97      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.collect.ImmutableSet&lt;E&gt;</B>
98</PRE>
99<DL>
100<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <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;E&gt;, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;</DD>
101</DL>
102<DL>
103<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A></DD>
104</DL>
105<HR>
106<DL>
107<DT><PRE>public abstract class <B>ImmutableSet&lt;E&gt;</B><DT>extends <A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="class in com.google.common.collect">ImmutableCollection</A>&lt;E&gt;<DT>implements <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;E&gt;</DL>
108</PRE>
109
110<P>
111A high-performance, immutable <code>Set</code> with reliable, user-specified
112 iteration order. Does not permit null elements.
113
114 <p>Unlike <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collections.html?is-external=true#unmodifiableSet(java.util.Set)" title="class or interface in java.util"><CODE>Collections.unmodifiableSet(java.util.Set<? extends T>)</CODE></A>, which is a <i>view</i> of a
115 separate collection that can still change, an instance of this class contains
116 its own private data and will <i>never</i> change. This class is convenient
117 for <code>public static final</code> sets ("constant sets") and also lets you
118 easily make a "defensive copy" of a set provided to your class by a caller.
119
120 <p><b>Warning:</b> Like most sets, an <code>ImmutableSet</code> will not function
121 correctly if an element is modified after being placed in the set. For this
122 reason, and to avoid general confusion, it is strongly recommended to place
123 only immutable objects into this collection.
124
125 <p>This class has been observed to perform significantly better than <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util"><CODE>HashSet</CODE></A> for objects with very fast <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"><CODE>Object.hashCode()</CODE></A> implementations
126 (as a well-behaved immutable object should). While this class's factory
127 methods create hash-based instances, the <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect"><CODE>ImmutableSortedSet</CODE></A> subclass
128 performs binary searches instead.
129
130 <p><b>Note</b>: Although this class is not final, it cannot be subclassed
131 outside its package as it has no public or protected constructors. Thus,
132 instances of this type are guaranteed to be immutable.
133<P>
134
135<P>
136<DL>
137<DT><B>Since:</B></DT>
138  <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD>
139<DT><B>Author:</B></DT>
140  <DD>Kevin Bourrillion, Nick Kralevich</DD>
141<DT><B>See Also:</B><DD><A HREF="../../../../com/google/common/collect/ImmutableList.html" title="class in com.google.common.collect"><CODE>ImmutableList</CODE></A>,
142<A HREF="../../../../com/google/common/collect/ImmutableMap.html" title="class in com.google.common.collect"><CODE>ImmutableMap</CODE></A>,
143<A HREF="../../../../serialized-form.html#com.google.common.collect.ImmutableSet">Serialized Form</A></DL>
144<HR>
145
146<P>
147<!-- ======== NESTED CLASS SUMMARY ======== -->
148
149<A NAME="nested_class_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>Nested Class 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>static&nbsp;class</CODE></FONT></TD>
158<TD><CODE><B><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></CODE>
159
160<BR>
161&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A builder for creating immutable set instances, especially
162 <code>public static final</code> sets ("constant sets").</TD>
163</TR>
164</TABLE>
165&nbsp;
166<!-- ========== METHOD SUMMARY =========== -->
167
168<A NAME="method_summary"><!-- --></A>
169<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
170<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
171<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
172<B>Method Summary</B></FONT></TH>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>static
177<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
178<TR ALIGN="right" VALIGN="">
179<TD NOWRAP><FONT SIZE="-1">
180<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;E&gt;</CODE></FONT></TD>
181</TR>
182</TABLE>
183</CODE></FONT></TD>
184<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#builder()">builder</A></B>()</CODE>
185
186<BR>
187&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new builder.</TD>
188</TR>
189<TR BGCOLOR="white" CLASS="TableRowColor">
190<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
191<CODE>static
192<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
193<TR ALIGN="right" VALIGN="">
194<TD NOWRAP><FONT SIZE="-1">
195<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
196</TR>
197</TABLE>
198</CODE></FONT></TD>
199<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(java.lang.Iterable)">copyOf</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 E&gt;&nbsp;elements)</CODE>
200
201<BR>
202&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set containing the given elements, in order.</TD>
203</TR>
204<TR BGCOLOR="white" CLASS="TableRowColor">
205<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
206<CODE>static
207<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
208<TR ALIGN="right" VALIGN="">
209<TD NOWRAP><FONT SIZE="-1">
210<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
211</TR>
212</TABLE>
213</CODE></FONT></TD>
214<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(java.util.Iterator)">copyOf</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 E&gt;&nbsp;elements)</CODE>
215
216<BR>
217&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set containing the given elements, in order.</TD>
218</TR>
219<TR BGCOLOR="white" CLASS="TableRowColor">
220<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221<CODE>&nbsp;boolean</CODE></FONT></TD>
222<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;object)</CODE>
223
224<BR>
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
226</TR>
227<TR BGCOLOR="white" CLASS="TableRowColor">
228<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229<CODE>&nbsp;int</CODE></FONT></TD>
230<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#hashCode()">hashCode</A></B>()</CODE>
231
232<BR>
233&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
234</TR>
235<TR BGCOLOR="white" CLASS="TableRowColor">
236<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237<CODE>abstract &nbsp;<A HREF="../../../../com/google/common/collect/UnmodifiableIterator.html" title="class in com.google.common.collect">UnmodifiableIterator</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE></FONT></TD>
238<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#iterator()">iterator</A></B>()</CODE>
239
240<BR>
241&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable iterator across the elements in this collection.</TD>
242</TR>
243<TR BGCOLOR="white" CLASS="TableRowColor">
244<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
245<CODE>static
246<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
247<TR ALIGN="right" VALIGN="">
248<TD NOWRAP><FONT SIZE="-1">
249<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
250</TR>
251</TABLE>
252</CODE></FONT></TD>
253<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#of()">of</A></B>()</CODE>
254
255<BR>
256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the empty immutable set.</TD>
257</TR>
258<TR BGCOLOR="white" CLASS="TableRowColor">
259<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260<CODE>static
261<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
262<TR ALIGN="right" VALIGN="">
263<TD NOWRAP><FONT SIZE="-1">
264<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
265</TR>
266</TABLE>
267</CODE></FONT></TD>
268<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#of(E...)">of</A></B>(E...&nbsp;elements)</CODE>
269
270<BR>
271&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set containing the given elements, in order.</TD>
272</TR>
273<TR BGCOLOR="white" CLASS="TableRowColor">
274<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
275<CODE>static
276<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
277<TR ALIGN="right" VALIGN="">
278<TD NOWRAP><FONT SIZE="-1">
279<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
280</TR>
281</TABLE>
282</CODE></FONT></TD>
283<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#of(E)">of</A></B>(E&nbsp;element)</CODE>
284
285<BR>
286&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set containing a single element.</TD>
287</TR>
288<TR BGCOLOR="white" CLASS="TableRowColor">
289<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290<CODE>static
291<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
292<TR ALIGN="right" VALIGN="">
293<TD NOWRAP><FONT SIZE="-1">
294<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
295</TR>
296</TABLE>
297</CODE></FONT></TD>
298<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#of(E, E)">of</A></B>(E&nbsp;e1,
299   E&nbsp;e2)</CODE>
300
301<BR>
302&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set containing the given elements, in order.</TD>
303</TR>
304<TR BGCOLOR="white" CLASS="TableRowColor">
305<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
306<CODE>static
307<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
308<TR ALIGN="right" VALIGN="">
309<TD NOWRAP><FONT SIZE="-1">
310<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
311</TR>
312</TABLE>
313</CODE></FONT></TD>
314<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#of(E, E, E)">of</A></B>(E&nbsp;e1,
315   E&nbsp;e2,
316   E&nbsp;e3)</CODE>
317
318<BR>
319&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set containing the given elements, in order.</TD>
320</TR>
321<TR BGCOLOR="white" CLASS="TableRowColor">
322<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
323<CODE>static
324<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
325<TR ALIGN="right" VALIGN="">
326<TD NOWRAP><FONT SIZE="-1">
327<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
328</TR>
329</TABLE>
330</CODE></FONT></TD>
331<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#of(E, E, E, E)">of</A></B>(E&nbsp;e1,
332   E&nbsp;e2,
333   E&nbsp;e3,
334   E&nbsp;e4)</CODE>
335
336<BR>
337&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set containing the given elements, in order.</TD>
338</TR>
339<TR BGCOLOR="white" CLASS="TableRowColor">
340<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
341<CODE>static
342<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
343<TR ALIGN="right" VALIGN="">
344<TD NOWRAP><FONT SIZE="-1">
345<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt;</CODE></FONT></TD>
346</TR>
347</TABLE>
348</CODE></FONT></TD>
349<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSet.html#of(E, E, E, E, E)">of</A></B>(E&nbsp;e1,
350   E&nbsp;e2,
351   E&nbsp;e3,
352   E&nbsp;e4,
353   E&nbsp;e5)</CODE>
354
355<BR>
356&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an immutable set containing the given elements, in order.</TD>
357</TR>
358</TABLE>
359&nbsp;<A NAME="methods_inherited_from_class_com.google.common.collect.ImmutableCollection"><!-- --></A>
360<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
361<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
362<TH ALIGN="left"><B>Methods inherited from class com.google.common.collect.<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="class in com.google.common.collect">ImmutableCollection</A></B></TH>
363</TR>
364<TR BGCOLOR="white" CLASS="TableRowColor">
365<TD><CODE><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#add(E)">add</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#addAll(java.util.Collection)">addAll</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#asList()">asList</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#clear()">clear</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#contains(java.lang.Object)">contains</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#containsAll(java.util.Collection)">containsAll</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#isEmpty()">isEmpty</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#remove(java.lang.Object)">remove</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#removeAll(java.util.Collection)">removeAll</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#retainAll(java.util.Collection)">retainAll</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#toArray()">toArray</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#toArray(T[])">toArray</A>, <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#toString()">toString</A></CODE></TD>
366</TR>
367</TABLE>
368&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
369<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
370<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
371<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>
372</TR>
373<TR BGCOLOR="white" CLASS="TableRowColor">
374<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#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#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
375</TR>
376</TABLE>
377&nbsp;<A NAME="methods_inherited_from_class_java.util.Set"><!-- --></A>
378<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
379<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
380<TH ALIGN="left"><B>Methods inherited from interface java.util.<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A></B></TH>
381</TR>
382<TR BGCOLOR="white" CLASS="TableRowColor">
383<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#add(E)" title="class or interface in java.util">add</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#clear()" title="class or interface in java.util">clear</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util">contains</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#isEmpty()" title="class or interface in java.util">isEmpty</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util">remove</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#size()" title="class or interface in java.util">size</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#toArray()" title="class or interface in java.util">toArray</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#toArray(T[])" title="class or interface in java.util">toArray</A></CODE></TD>
384</TR>
385</TABLE>
386&nbsp;
387<P>
388
389<!-- ============ METHOD DETAIL ========== -->
390
391<A NAME="method_detail"><!-- --></A>
392<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
393<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
394<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
395<B>Method Detail</B></FONT></TH>
396</TR>
397</TABLE>
398
399<A NAME="of()"><!-- --></A><H3>
400of</H3>
401<PRE>
402public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>of</B>()</PRE>
403<DL>
404<DD>Returns the empty immutable set. This set behaves and performs comparably
405 to <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collections.html?is-external=true#emptySet()" title="class or interface in java.util"><CODE>Collections.emptySet()</CODE></A>, and is preferable mainly for consistency
406 and maintainability of your code.
407<P>
408<DD><DL>
409</DL>
410</DD>
411<DD><DL>
412</DL>
413</DD>
414</DL>
415<HR>
416
417<A NAME="of(java.lang.Object)"><!-- --></A><A NAME="of(E)"><!-- --></A><H3>
418of</H3>
419<PRE>
420public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>of</B>(E&nbsp;element)</PRE>
421<DL>
422<DD>Returns an immutable set containing a single element. This set behaves and
423 performs comparably to <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collections.html?is-external=true#singleton(T)" title="class or interface in java.util"><CODE>Collections.singleton(T)</CODE></A>, but will not accept
424 a null element. It is preferable mainly for consistency and
425 maintainability of your code.
426<P>
427<DD><DL>
428</DL>
429</DD>
430<DD><DL>
431</DL>
432</DD>
433</DL>
434<HR>
435
436<A NAME="of(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="of(E, E)"><!-- --></A><H3>
437of</H3>
438<PRE>
439public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>of</B>(E&nbsp;e1,
440                                     E&nbsp;e2)</PRE>
441<DL>
442<DD>Returns an immutable set containing the given elements, in order. Repeated
443 occurrences of an element (according to <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"><CODE>Object.equals(java.lang.Object)</CODE></A>) after the
444 first are ignored.
445<P>
446<DD><DL>
447</DL>
448</DD>
449<DD><DL>
450
451<DT><B>Throws:</B>
452<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 any element is null</DL>
453</DD>
454</DL>
455<HR>
456
457<A NAME="of(java.lang.Object,java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="of(E, E, E)"><!-- --></A><H3>
458of</H3>
459<PRE>
460public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>of</B>(E&nbsp;e1,
461                                     E&nbsp;e2,
462                                     E&nbsp;e3)</PRE>
463<DL>
464<DD>Returns an immutable set containing the given elements, in order. Repeated
465 occurrences of an element (according to <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"><CODE>Object.equals(java.lang.Object)</CODE></A>) after the
466 first are ignored.
467<P>
468<DD><DL>
469</DL>
470</DD>
471<DD><DL>
472
473<DT><B>Throws:</B>
474<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 any element is null</DL>
475</DD>
476</DL>
477<HR>
478
479<A NAME="of(java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="of(E, E, E, E)"><!-- --></A><H3>
480of</H3>
481<PRE>
482public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>of</B>(E&nbsp;e1,
483                                     E&nbsp;e2,
484                                     E&nbsp;e3,
485                                     E&nbsp;e4)</PRE>
486<DL>
487<DD>Returns an immutable set containing the given elements, in order. Repeated
488 occurrences of an element (according to <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"><CODE>Object.equals(java.lang.Object)</CODE></A>) after the
489 first are ignored.
490<P>
491<DD><DL>
492</DL>
493</DD>
494<DD><DL>
495
496<DT><B>Throws:</B>
497<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 any element is null</DL>
498</DD>
499</DL>
500<HR>
501
502<A NAME="of(java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="of(E, E, E, E, E)"><!-- --></A><H3>
503of</H3>
504<PRE>
505public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>of</B>(E&nbsp;e1,
506                                     E&nbsp;e2,
507                                     E&nbsp;e3,
508                                     E&nbsp;e4,
509                                     E&nbsp;e5)</PRE>
510<DL>
511<DD>Returns an immutable set containing the given elements, in order. Repeated
512 occurrences of an element (according to <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"><CODE>Object.equals(java.lang.Object)</CODE></A>) after the
513 first are ignored.
514<P>
515<DD><DL>
516</DL>
517</DD>
518<DD><DL>
519
520<DT><B>Throws:</B>
521<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 any element is null</DL>
522</DD>
523</DL>
524<HR>
525
526<A NAME="of(java.lang.Object[])"><!-- --></A><A NAME="of(E...)"><!-- --></A><H3>
527of</H3>
528<PRE>
529public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>of</B>(E...&nbsp;elements)</PRE>
530<DL>
531<DD>Returns an immutable set containing the given elements, in order. Repeated
532 occurrences of an element (according to <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"><CODE>Object.equals(java.lang.Object)</CODE></A>) after the
533 first are ignored (but too many of these may result in the set being
534 sized inappropriately).
535<P>
536<DD><DL>
537</DL>
538</DD>
539<DD><DL>
540
541<DT><B>Throws:</B>
542<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 any of <code>elements</code> is null</DL>
543</DD>
544</DL>
545<HR>
546
547<A NAME="copyOf(java.lang.Iterable)"><!-- --></A><H3>
548copyOf</H3>
549<PRE>
550public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>copyOf</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 E&gt;&nbsp;elements)</PRE>
551<DL>
552<DD>Returns an immutable set containing the given elements, in order. Repeated
553 occurrences of an element (according to <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"><CODE>Object.equals(java.lang.Object)</CODE></A>) after the
554 first are ignored (but too many of these may result in the set being
555 sized inappropriately). This method iterates over <code>elements</code> at most
556 once.
557
558 <p>Note that if <code>s</code> is a <code>Set&lt;String&gt;</code>, then <code>ImmutableSet.copyOf(s)</code> returns an <code>ImmutableSet&lt;String&gt;</code> containing
559 each of the strings in <code>s</code>, while <code>ImmutableSet.of(s)</code> returns
560 a <code>ImmutableSet&lt;Set&lt;String&gt;&gt;</code> containing one element (the given set
561 itself).
562
563 <p><b>Note:</b> Despite what the method name suggests, if <code>elements</code>
564 is an <code>ImmutableSet</code> (but not an <code>ImmutableSortedSet</code>), no copy
565 will actually be performed, and the given set itself will be returned.
566<P>
567<DD><DL>
568</DL>
569</DD>
570<DD><DL>
571
572<DT><B>Throws:</B>
573<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 any of <code>elements</code> is null</DL>
574</DD>
575</DL>
576<HR>
577
578<A NAME="copyOf(java.util.Iterator)"><!-- --></A><H3>
579copyOf</H3>
580<PRE>
581public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A>&lt;E&gt; <B>copyOf</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 E&gt;&nbsp;elements)</PRE>
582<DL>
583<DD>Returns an immutable set containing the given elements, in order. Repeated
584 occurrences of an element (according to <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"><CODE>Object.equals(java.lang.Object)</CODE></A>) after the
585 first are ignored.
586<P>
587<DD><DL>
588</DL>
589</DD>
590<DD><DL>
591
592<DT><B>Throws:</B>
593<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 any of <code>elements</code> is null</DL>
594</DD>
595</DL>
596<HR>
597
598<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
599equals</H3>
600<PRE>
601public boolean <B>equals</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>
602                      <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;object)</PRE>
603<DL>
604<DD><DL>
605<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE><DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
606</DD>
607<DD><DL>
608</DL>
609</DD>
610</DL>
611<HR>
612
613<A NAME="hashCode()"><!-- --></A><H3>
614hashCode</H3>
615<PRE>
616public int <B>hashCode</B>()</PRE>
617<DL>
618<DD><DL>
619<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE><DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
620</DD>
621<DD><DL>
622</DL>
623</DD>
624</DL>
625<HR>
626
627<A NAME="iterator()"><!-- --></A><H3>
628iterator</H3>
629<PRE>
630public abstract <A HREF="../../../../com/google/common/collect/UnmodifiableIterator.html" title="class in com.google.common.collect">UnmodifiableIterator</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt; <B>iterator</B>()</PRE>
631<DL>
632<DD><B>Description copied from class: <CODE><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#iterator()">ImmutableCollection</A></CODE></B></DD>
633<DD>Returns an unmodifiable iterator across the elements in this collection.
634<P>
635<DD><DL>
636<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang">iterator</A></CODE> in interface <CODE><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;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#iterator()" title="class or interface in java.util">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true#iterator()" title="class or interface in java.util">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#iterator()">iterator</A></CODE> in class <CODE><A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="class in com.google.common.collect">ImmutableCollection</A>&lt;<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="type parameter in ImmutableSet">E</A>&gt;</CODE></DL>
637</DD>
638<DD><DL>
639</DL>
640</DD>
641</DL>
642<HR>
643
644<A NAME="builder()"><!-- --></A><H3>
645builder</H3>
646<PRE>
647public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</A>&lt;E&gt; <B>builder</B>()</PRE>
648<DL>
649<DD>Returns a new builder. The generated builder is equivalent to the builder
650 created by the <A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect"><CODE>ImmutableSet.Builder</CODE></A> constructor.
651<P>
652<DD><DL>
653</DL>
654</DD>
655<DD><DL>
656</DL>
657</DD>
658</DL>
659<!-- ========= END OF CLASS DATA ========= -->
660<HR>
661
662
663<!-- ======= START OF BOTTOM NAVBAR ====== -->
664<A NAME="navbar_bottom"><!-- --></A>
665<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
666<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
667<TR>
668<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
669<A NAME="navbar_bottom_firstrow"><!-- --></A>
670<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
671  <TR ALIGN="center" VALIGN="top">
672  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
673  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
674  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
675  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ImmutableSet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
676  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
677  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
678  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
679  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
680  </TR>
681</TABLE>
682</TD>
683<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
684</EM>
685</TD>
686</TR>
687
688<TR>
689<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
690&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableMultiset.Builder.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
691&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD>
692<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
693  <A HREF="../../../../index.html?com/google/common/collect/ImmutableSet.html" target="_top"><B>FRAMES</B></A>  &nbsp;
694&nbsp;<A HREF="ImmutableSet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
695&nbsp;<SCRIPT type="text/javascript">
696  <!--
697  if(window==top) {
698    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
699  }
700  //-->
701</SCRIPT>
702<NOSCRIPT>
703  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
704</NOSCRIPT>
705
706
707</FONT></TD>
708</TR>
709<TR>
710<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
711  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
712<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
713DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
714</TR>
715</TABLE>
716<A NAME="skip-navbar_bottom"></A>
717<!-- ======== END OF BOTTOM NAVBAR ======= -->
718
719<HR>
720
721</BODY>
722</HTML>
723