Lines Matching full:code
104 Static utility methods pertaining to <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><CODE>Set</CODE></A> instances. Also see this
105 class's counterparts <A HREF="../../../../com/google/common/collect/Lists.html" title="class in com.google.common.collect"><CODE>Lists</CODE></A> and <A HREF="../../../../com/google/common/collect/Maps.html" title="class in com.google.common.collect"><CODE>Maps</CODE></A>.
128 <CODE>static class</CODE></FONT></TD>
129 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A><<A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="type parameter in Sets.SetView">E</A>></B></CODE>
147 <CODE>static
151 <CODE><B> <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><<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><B>></CODE></FONT></TD>
154 </CODE></FONT></TD>
155 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#cartesianProduct(java.util.List)">cartesianProduct</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><? extends <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><? extends B>> sets)</CODE>
165 <CODE>static
169 <CODE><B> <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><<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><B>></CODE></FONT></TD>
172 </CODE></FONT></TD>
173 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#cartesianProduct(java.util.Set...)">cartesianProduct</A></B>(<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><? extends B>... sets)</CODE>
183 <CODE>static
187 <CODE><E extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A><E>>
189 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A><E></CODE></FONT></TD>
192 </CODE></FONT></TD>
193 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#complementOf(java.util.Collection)">complementOf</A></B>(<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><E> collection)</CODE>
196 Creates an <code>EnumSet</code> consisting of all enum values that are not in
201 <CODE>static
205 <CODE><E extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A><E>>
207 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A><E></CODE></FONT></TD>
210 </CODE></FONT></TD>
211 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#complementOf(java.util.Collection, java.lang.Class)">complementOf</A></B>(<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><E> collection,
212 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><E> type)</CODE>
215 Creates an <code>EnumSet</code> consisting of all enum values that are not in
220 <CODE>static
224 <CODE><E> <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A><E></CODE></FONT></TD>
227 </CODE></FONT></TD>
228 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#difference(java.util.Set, java.util.Set)">difference</A></B>(<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><E> set1,
229 <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><?> set2)</CODE>
236 <CODE>static
240 <CODE><E> <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><E></CODE></FONT></TD>
243 </CODE></FONT></TD>
244 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#filter(java.util.Set, com.google.common.base.Predicate)">filter</A></B>(<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><E> unfiltered,
245 <A HREF="../../../../com/google/common/base/Predicate.html" title="interface in com.google.common.base">Predicate</A><? super E> predicate)</CODE>
248 Returns the elements of <code>unfiltered</code> that satisfy a predicate.</TD>
252 <CODE>static
256 <CODE><E extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A><E>>
258 <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A><E></CODE></FONT></TD>
261 </CODE></FONT></TD>
262 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#immutableEnumSet(E, E...)">immutableEnumSet</A></B>(E anElement,
263 E... otherElements)</CODE>
270 <CODE>static
274 <CODE><E extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A><E>>
276 <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A><E></CODE></FONT></TD>
279 </CODE></FONT></TD>
280 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#immutableEnumSet(java.lang.Iterable)">immutableEnumSet</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><E> elements)</CODE>
287 <CODE>static
291 <CODE><E> <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A><E></CODE></FONT></TD>
294 </CODE></FONT></TD>
295 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#intersection(java.util.Set, java.util.Set)">intersection</A></B>(<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><E> set1,
296 <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><?> set2)</CODE>
303 <CODE>static
307 <CODE><E extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A><E>>
309 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</A><E></CODE></FONT></TD>
312 </CODE></FONT></TD>
313 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newEnumSet(java.lang.Iterable, java.lang.Class)">newEnumSet</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><E> iterable,
314 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><E> elementType)</CODE>
317 Returns a new <code>EnumSet</code> instance containing the given elements.</TD>
321 <CODE>static
325 <CODE><E> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A><E></CODE></FONT></TD>
328 </CODE></FONT></TD>
329 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSet()">newHashSet</A></B>()</CODE>
332 Creates a <i>mutable</i>, empty <code>HashSet</code> instance.</TD>
336 <CODE>static
340 <CODE><E> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A><E></CODE></FONT></TD>
343 </CODE></FONT></TD>
344 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSet(E...)">newHashSet</A></B>(E... elements)</CODE>
347 Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
352 <CODE>static
356 <CODE><E> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A><E></CODE></FONT></TD>
359 </CODE></FONT></TD>
360 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSet(java.lang.Iterable)">newHashSet</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 E> elements)</CODE>
363 Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
368 <CODE>static
372 <CODE><E> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A><E></CODE></FONT></TD>
375 </CODE></FONT></TD>
376 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSet(java.util.Iterator)">newHashSet</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 E> elements)</CODE>
379 Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
384 <CODE>static
388 <CODE><E> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashSet.html?is-external=true" title="class or interface in java.util">HashSet</A><E></CODE></FONT></TD>
391 </CODE></FONT></TD>
392 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newHashSetWithExpectedSize(int)">newHashSetWithExpectedSize</A></B>(int expectedSize)</CODE>
395 Creates an empty <code>HashSet</code> instance with enough capacity to hold the
400 <CODE>static
404 <CODE><E> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/LinkedHashSet.html?is-external=true" title="class or interface in java.util">LinkedHashSet</A><E></CODE></FONT></TD>
407 </CODE></FONT></TD>
408 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newLinkedHashSet()">newLinkedHashSet</A></B>()</CODE>
411 Creates a <i>mutable</i>, empty <code>LinkedHashSet</code> instance.</TD>
415 <CODE>static
419 <CODE><E> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/LinkedHashSet.html?is-external=true" title="class or interface in java.util">LinkedHashSet</A><E></CODE></FONT></TD>
422 </CODE></FONT></TD>
423 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newLinkedHashSet(java.lang.Iterable)">newLinkedHashSet</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 E> elements)</CODE>
426 Creates a <i>mutable</i> <code>LinkedHashSet</code> instance containing the
431 <CODE>static
435 <CODE><E> <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><E></CODE></FONT></TD>
438 </CODE></FONT></TD>
439 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newSetFromMap(java.util.Map)">newSetFromMap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><E,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A>> map)</CODE>
446 <CODE>static
450 <CODE><E extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A>>
452 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A><E></CODE></FONT></TD>
455 </CODE></FONT></TD>
456 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newTreeSet()">newTreeSet</A></B>()</CODE>
459 Creates a <i>mutable</i>, empty <code>TreeSet</code> instance sorted by the
464 <CODE>static
468 <CODE><E> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A><E></CODE></FONT></TD>
471 </CODE></FONT></TD>
472 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newTreeSet(java.util.Comparator)">newTreeSet</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A><? super E> comparator)</CODE>
475 Creates a <i>mutable</i>, empty <code>TreeSet</code> instance with the given
480 <CODE>static
484 <CODE><E extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A>>
486 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util">TreeSet</A><E></CODE></FONT></TD>
489 </CODE></FONT></TD>
490 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#newTreeSet(java.lang.Iterable)">newTreeSet</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 E> elements)</CODE>
493 Creates a <i>mutable</i> <code>TreeSet</code> instance containing the given
498 <CODE>static
502 <CODE><E> <A HREF="../../../../com/google/common/collect/Sets.SetView.html" title="class in com.google.common.collect">Sets.SetView</A><E></CODE></FONT></TD>
505 </CODE></FONT></TD>
506 <TD><CODE><B><A HREF="../../../../com/google/common/collect/Sets.html#union(java.util.Set, java.util.Set)">union</A></B>(<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><? extends E> set1,
507 <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><? extends E> set2)</CODE>
519 <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>
542 Internally, the returned set will be backed by an <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util"><CODE>EnumSet</CODE></A>.
548 <DT><B>Parameters:</B><DD><CODE>anElement</CODE> - one of the elements the set should contain<DD><CODE>otherElements</CODE> - the rest of the elements the set should contain
560 Internally, the returned set will be backed by an <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util"><CODE>EnumSet</CODE></A>.
566 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements, all of the same <code>enum</code> type, that the
579 <DD>Returns a new <code>EnumSet</code> instance containing the given elements.
580 Unlike <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#copyOf(java.util.Collection)" title="class or interface in java.util"><CODE>EnumSet.copyOf(Collection)</CODE></A>, this method does not produce an
582 just a <code>Collection</code>.
595 <DD>Creates a <i>mutable</i>, empty <code>HashSet</code> instance.
597 <p><b>Note:</b> if mutability is not required, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#of()"><CODE>ImmutableSet.of()</CODE></A> instead.
599 <p><b>Note:</b> if <code>E</code> is an <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><CODE>Enum</CODE></A> type, use <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#noneOf(java.lang.Class)" title="class or interface in java.util"><CODE>EnumSet.noneOf(java.lang.Class<E>)</CODE></A> instead.
603 <DT><B>Returns:</B><DD>a new, empty <code>HashSet</code></DL>
613 <DD>Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
617 non-null, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#of(E...)"><CODE>ImmutableSet.of(Object[])</CODE></A> instead.
619 <p><b>Note:</b> if <code>E</code> is an <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><CODE>Enum</CODE></A> type, use <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#of(E, E...)" title="class or interface in java.util"><CODE>EnumSet.of(Enum, Enum[])</CODE></A> instead.
622 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain
623 <DT><B>Returns:</B><DD>a new <code>HashSet</code> containing those elements (minus duplicates)</DL>
633 <DD>Creates an empty <code>HashSet</code> instance with enough capacity to hold the
637 <DT><B>Parameters:</B><DD><CODE>expectedSize</CODE> - the expected size
638 <DT><B>Returns:</B><DD>a new, empty <code>HashSet</code> with enough capacity to hold <code>expectedSize</code> elements without rehashing
640 <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>expectedSize</code> is negative</DL>
650 <DD>Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
654 non-null, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(java.lang.Iterable)"><CODE>ImmutableSet.copyOf(Iterable)</CODE></A> instead.
656 <p><b>Note:</b> if <code>E</code> is an <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><CODE>Enum</CODE></A> type, use
657 <A HREF="../../../../com/google/common/collect/Sets.html#newEnumSet(java.lang.Iterable, java.lang.Class)"><CODE>newEnumSet(Iterable, Class)</CODE></A> instead.
660 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain
661 <DT><B>Returns:</B><DD>a new <code>HashSet</code> containing those elements (minus duplicates)</DL>
671 <DD>Creates a <i>mutable</i> <code>HashSet</code> instance containing the given
675 non-null, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(java.lang.Iterable)"><CODE>ImmutableSet.copyOf(Iterable)</CODE></A> instead.
677 <p><b>Note:</b> if <code>E</code> is an <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><CODE>Enum</CODE></A> type, you should create an
678 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util"><CODE>EnumSet</CODE></A> instead.
681 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain
682 <DT><B>Returns:</B><DD>a new <code>HashSet</code> containing those elements (minus duplicates)</DL>
692 <DD>Creates a <i>mutable</i>, empty <code>LinkedHashSet</code> instance.
694 <p><b>Note:</b> if mutability is not required, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#of()"><CODE>ImmutableSet.of()</CODE></A> instead.
698 <DT><B>Returns:</B><DD>a new, empty <code>LinkedHashSet</code></DL>
708 <DD>Creates a <i>mutable</i> <code>LinkedHashSet</code> instance containing the
712 non-null, use <A HREF="../../../../com/google/common/collect/ImmutableSet.html#copyOf(java.lang.Iterable)"><CODE>ImmutableSet.copyOf(Iterable)</CODE></A> instead.
715 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain, in order
716 <DT><B>Returns:</B><DD>a new <code>LinkedHashSet</code> containing those elements (minus
727 <DD>Creates a <i>mutable</i>, empty <code>TreeSet</code> instance sorted by the
730 <p><b>Note:</b> if mutability is not required, use <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of()"><CODE>ImmutableSortedSet.of()</CODE></A> instead.
734 <DT><B>Returns:</B><DD>a new, empty <code>TreeSet</code></DL>
744 <DD>Creates a <i>mutable</i> <code>TreeSet</code> instance containing the given
747 <p><b>Note:</b> if mutability is not required, use <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#copyOf(java.lang.Iterable)"><CODE>ImmutableSortedSet.copyOf(Iterable)</CODE></A> instead.
749 <p><b>Note:</b> If <code>elements</code> is a <code>SortedSet</code> with an explicit
751 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true#TreeSet(java.util.SortedSet)" title="class or interface in java.util"><CODE>TreeSet.TreeSet(SortedSet)</CODE></A>, which returns a <code>TreeSet</code> with
755 <DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the set should contain
756 <DT><B>Returns:</B><DD>a new <code>TreeSet</code> containing those elements (minus duplicates)</DL>
766 <DD>Creates a <i>mutable</i>, empty <code>TreeSet</code> instance with the given
769 <p><b>Note:</b> if mutability is not required, use <code>ImmutableSortedSet.orderedBy(comparator).build()</code> instead.
772 <DT><B>Parameters:</B><DD><CODE>comparator</CODE> - the comparator to use to sort the set
773 <DT><B>Returns:</B><DD>a new, empty <code>TreeSet</code>
775 <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>comparator</code> is null</DL>
785 <DD>Creates an <code>EnumSet</code> consisting of all enum values that are not in
786 the specified collection. If the collection is an <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util"><CODE>EnumSet</CODE></A>, this
787 method has the same behavior as <A HREF="http://java.sun.com/javase/6/docs/api/java/util/EnumSet.html?is-external=true#complementOf(java.util.EnumSet)" title="class or interface in java.util"><CODE>EnumSet.complementOf(java.util.EnumSet<E>)</CODE></A>. Otherwise,
790 <A HREF="../../../../com/google/common/collect/Sets.html#complementOf(java.util.Collection, java.lang.Class)"><CODE>complementOf(Collection, Class)</CODE></A> instead of this method.
793 <DT><B>Parameters:</B><DD><CODE>collection</CODE> - the collection whose complement should be stored in the
795 <DT><B>Returns:</B><DD>a new, modifiable <code>EnumSet</code> containing all values of the enum
798 <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>collection</code> is not an
799 <code>EnumSet</code> instance and contains no elements</DL>
810 <DD>Creates an <code>EnumSet</code> consisting of all enum values that are not in
812 CODE>EnumSet.complementOf(java.util.EnumSet<E>)</CODE></A>, but can act on any input collection, as long
816 <DT><B>Parameters:</B><DD><CODE>collection</CODE> - the collection whose complement should be stored in the
817 <code>EnumSet</code><DD><CODE>type</CODE> - the type of the elements in the set
818 <DT><B>Returns:</B><DD>a new, modifiable <code>EnumSet</code> initially containing all the
831 backing map. In essence, this factory method provides a <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><CODE>Set</CODE></A>
832 implementation corresponding to any <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> implementation. There is no
833 need to use this method on a <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> implementation that already has a
834 corresponding <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><CODE>Set</CODE></A> implementation (such as <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><CODE>HashMap</CODE></A> or
835 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/TreeMap.html?is-external=true" title="class or interface in java.util"><CODE>TreeMap</CODE></A>).
846 in the following code fragment: <pre> <code>Set<Object> identityHashSet = Sets.newSetFromMap(
847 new IdentityHashMap<Object, Boolean>());</code></pre>
850 <code>Collections.newSetFromMap()</code>. The returned set is serializable if
854 <DT><B>Parameters:</B><DD><CODE>map</CODE> - the backing map
857 <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 <tt>map</tt> is not empty</DL>
871 <code>set1</code>, then over each element of <code>set2</code>, in order, that is not
872 contained in <code>set1</code>.
874 <p>Results are undefined if <code>set1</code> and <code>set2</code> are sets based on
875 different equivalence relations (as <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>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/TreeSet.html?is-external=true" title="class or interface in java.util"><CODE>TreeSet</CODE></A>, and
876 the <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#keySet()" title="class or interface in java.util"><CODE>Map.keySet()</CODE></A> of an <A HREF="http://java.sun.com/javase/6/docs/api/java/util/IdentityHashMap.html?is-external=true" title="class or interface in java.util"><CODE>IdentityHashMap</CODE></A> all are).
878 <p><b>Note:</b> The returned view performs better when <code>set1</code> is the
896 The iteration order of the returned set matches that of <code>set1</code>.
898 <p>Results are undefined if <code>set1</code> and <code>set2</code> are sets based
899 on different equivalence relations (as <code>HashSet</code>, <code>TreeSet</code>,
900 and the keySet of an <code>IdentityHashMap</code> all are).
902 <p><b>Note:</b> The returned view performs slightly better when <code>set1</code> is the smaller of the two sets. If you have reason to believe one of
906 you to make a cast, for example: <pre> <code>Set<Object> aFewBadObjects = ...
912 aFewBadObjects, manyBadStrings);</code></pre>
929 returned set contains all elements that are contained by <code>set1</code> and
930 not contained by <code>set2</code>. <code>set2</code> may also contain elements not
931 present in <code>set1</code>; these are simply ignored. The iteration order of
932 the returned set matches that of <code>set1</code>.
934 <p>Results are undefined if <code>set1</code> and <code>set2</code> are sets based
935 on different equivalence relations (as <code>HashSet</code>, <code>TreeSet</code>,
936 and the keySet of an <code>IdentityHashMap</code> all are).
950 <DD>Returns the elements of <code>unfiltered</code> that satisfy a predicate. The
951 returned set is a live view of <code>unfiltered</code>; changes to one affect
954 <p>The resulting set's iterator does not support <code>remove()</code>, but all
955 other set methods are supported. The set's <code>add()</code> and
956 <code>addAll()</code> methods throw an <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalArgumentException</CODE></A> if an
958 as <code>removeAll()</code> and <code>clear()</code> are called on the filtered set,
963 <code>unfiltered</code> is.
965 <p>Many of the filtered set's methods, such as <code>size()</code>, iterate
968 to copy <code>Iterables.filter(unfiltered, predicate)</code> and use the copy.
984 product</a>" of the sets. For example: <pre class="code"> <code>cartesianProduct(ImmutableList.of(
986 ImmutableSet.of("A", "B", "C")))</code></pre>
991 <li><code>ImmutableList.of(1, "A")</code>
992 <li><code>ImmutableList.of(1, "B")</code>
993 <li><code>ImmutableList.of(1, "C")</code>
994 <li><code>ImmutableList.of(2, "A")</code>
995 <li><code>ImmutableList.of(2, "B")</code>
996 <li><code>ImmutableList.of(2, "C")</code>
1007 <DT><B>Type Parameters:</B><DD><CODE>B</CODE> - any common base class shared by all axes (often just <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><CODE>Object</CODE></A>)<DT><B>Parameters:</B><DD><CODE>sets</CODE> - the sets to choose elements from, in the order that
1013 <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>sets</code>, any one of the <code>sets</code>,
1029 product</a>" of the sets. For example: <pre class="code"> <code>cartesianProduct(
1031 ImmutableSet.of("A", "B", "C"))</code></pre>
1036 <li><code>ImmutableList.of(1, "A")</code>
1037 <li><code>ImmutableList.of(1, "B")</code>
1038 <li><code>ImmutableList.of(1, "C")</code>
1039 <li><code>ImmutableList.of(2, "A")</code>
1040 <li><code>ImmutableList.of(2, "B")</code>
1041 <li><code>ImmutableList.of(2, "C")</code>
1052 <DT><B>Type Parameters:</B><DD><CODE>B</CODE> - any common base class shared by all axes (often just <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><CODE>Object</CODE></A>)<DT><B>Parameters:</B><DD><CODE>sets</CODE> - the sets to choose elements from, in the order that
1058 <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>sets</code>, any one of the <code>sets</code>,