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:59 PST 2010 --> 6 <TITLE> 7 ImmutableSortedSet (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="ImmutableSortedSet (Guava Libraries 2010.01.04)"; 19 } 20 } 21 </SCRIPT> 22 <NOSCRIPT> 23 </NOSCRIPT> 24 25 </HEAD> 26 27 <BODY BGCOLOR="white" onload="windowTitle();"> 28 <HR> 29 30 31 <!-- ========= START OF TOP NAVBAR ======= --> 32 <A NAME="navbar_top"><!-- --></A> 33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A> 34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 35 <TR> 36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 37 <A NAME="navbar_top_firstrow"><!-- --></A> 38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 39 <TR ALIGN="center" VALIGN="top"> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ImmutableSortedSet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 48 </TR> 49 </TABLE> 50 </TD> 51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 52 </EM> 53 </TD> 54 </TR> 55 56 <TR> 57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 58 <A HREF="../../../../com/google/common/collect/ImmutableSortedMap.Builder.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.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/ImmutableSortedSet.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="ImmutableSortedSet.html" target="_top"><B>NO FRAMES</B></A> 63 <SCRIPT type="text/javascript"> 64 <!-- 65 if(window==top) { 66 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 67 } 68 //--> 69 </SCRIPT> 70 <NOSCRIPT> 71 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 72 </NOSCRIPT> 73 74 75 </FONT></TD> 76 </TR> 77 <TR> 78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 79 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 82 </TR> 83 </TABLE> 84 <A NAME="skip-navbar_top"></A> 85 <!-- ========= END OF TOP NAVBAR ========= --> 86 87 <HR> 88 <!-- ======== START OF CLASS DATA ======== --> 89 <H2> 90 <FONT SIZE="-1"> 91 com.google.common.collect</FONT> 92 <BR> 93 Class ImmutableSortedSet<E></H2> 94 <PRE> 95 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> 96 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="class in com.google.common.collect">com.google.common.collect.ImmutableCollection</A><E> 97 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">com.google.common.collect.ImmutableSet</A><E> 98 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.collect.ImmutableSortedSet<E></B> 99 </PRE> 100 <DL> 101 <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><E>, <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>, <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>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><E></DD> 102 </DL> 103 <HR> 104 <DL> 105 <DT><PRE>public abstract class <B>ImmutableSortedSet<E></B><DT>extends <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A><E><DT>implements <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><E></DL> 106 </PRE> 107 108 <P> 109 An immutable <code>SortedSet</code> that stores its elements in a sorted array. 110 Some instances are ordered by an explicit comparator, while others follow the 111 natural sort ordering of their elements. Either way, null elements are not 112 supported. 113 114 <p>Unlike <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collections.html?is-external=true#unmodifiableSortedSet(java.util.SortedSet)" title="class or interface in java.util"><CODE>Collections.unmodifiableSortedSet(java.util.SortedSet<T>)</CODE></A>, which is a <i>view</i> 115 of a separate collection that can still change, an instance of <code>ImmutableSortedSet</code> contains its own private data and will <i>never</i> 116 change. This class is convenient for <code>public static final</code> sets 117 ("constant sets") and also lets you easily make a "defensive copy" of a set 118 provided to your class by a caller. 119 120 <p>The sets returned by <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#headSet(E)"><CODE>headSet(E)</CODE></A>, <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#tailSet(E)"><CODE>tailSet(E)</CODE></A>, and 121 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#subSet(E, E)"><CODE>subSet(E, E)</CODE></A> methods share the same array as the original set, preventing 122 that array from being garbage collected. If this is a concern, the data may 123 be copied into a correctly-sized array by calling <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#copyOfSorted(java.util.SortedSet)"><CODE>copyOfSorted(java.util.SortedSet<E>)</CODE></A>. 124 125 <p><b>Note on element equivalence:</b> The <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#contains(java.lang.Object)"><CODE>ImmutableCollection.contains(Object)</CODE></A>, 126 <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#containsAll(java.util.Collection)"><CODE>ImmutableCollection.containsAll(Collection)</CODE></A>, and <A HREF="../../../../com/google/common/collect/ImmutableSet.html#equals(java.lang.Object)"><CODE>ImmutableSet.equals(Object)</CODE></A> 127 implementations must check whether a provided object is equivalent to an 128 element in the collection. Unlike most collections, an 129 <code>ImmutableSortedSet</code> doesn't use <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> to determine if 130 two elements are equivalent. Instead, with an explicit comparator, the 131 following relation determines whether elements <code>x</code> and <code>y</code> are 132 equivalent: <pre> <code>{(x, y) | comparator.compare(x, y) == 0}</code></pre> 133 134 With natural ordering of elements, the following relation determines whether 135 two elements are equivalent: <pre> <code>{(x, y) | x.compareTo(y) == 0}</code></pre> 136 137 <b>Warning:</b> Like most sets, an <code>ImmutableSortedSet</code> will not 138 function correctly if an element is modified after being placed in the set. 139 For this reason, and to avoid general confusion, it is strongly recommended 140 to place only immutable objects into this collection. 141 142 <p><b>Note</b>: Although this class is not final, it cannot be subclassed as 143 it has no public or protected constructors. Thus, instances of this type are 144 guaranteed to be immutable. 145 <P> 146 147 <P> 148 <DL> 149 <DT><B>Since:</B></DT> 150 <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD> 151 <DT><B>Author:</B></DT> 152 <DD>Jared Levy</DD> 153 <DT><B>See Also:</B><DD><A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect"><CODE>ImmutableSet</CODE></A>, 154 <A HREF="../../../../serialized-form.html#com.google.common.collect.ImmutableSortedSet">Serialized Form</A></DL> 155 <HR> 156 157 <P> 158 <!-- ======== NESTED CLASS SUMMARY ======== --> 159 160 <A NAME="nested_class_summary"><!-- --></A> 161 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 162 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 163 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 164 <B>Nested Class Summary</B></FONT></TH> 165 </TR> 166 <TR BGCOLOR="white" CLASS="TableRowColor"> 167 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 168 <CODE>static class</CODE></FONT></TD> 169 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="type parameter in ImmutableSortedSet.Builder">E</A>></B></CODE> 170 171 <BR> 172 A builder for creating immutable sorted set instances, especially 173 <code>public static final</code> sets ("constant sets"), with a given 174 comparator.</TD> 175 </TR> 176 </TABLE> 177 178 <!-- ========== METHOD SUMMARY =========== --> 179 180 <A NAME="method_summary"><!-- --></A> 181 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 182 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 183 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 184 <B>Method Summary</B></FONT></TH> 185 </TR> 186 <TR BGCOLOR="white" CLASS="TableRowColor"> 187 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 188 <CODE>static 189 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 190 <TR ALIGN="right" VALIGN=""> 191 <TD NOWRAP><FONT SIZE="-1"> 192 <CODE><E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><E></CODE></FONT></TD> 193 </TR> 194 </TABLE> 195 </CODE></FONT></TD> 196 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#builder()">builder</A></B>()</CODE> 197 198 <BR> 199 <B>Deprecated.</B> <I>Use <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#naturalOrder()"><CODE>naturalOrder()</CODE></A>, which offers 200 better type-safety.</I></TD> 201 </TR> 202 <TR BGCOLOR="white" CLASS="TableRowColor"> 203 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 204 <CODE> <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 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>></CODE></FONT></TD> 205 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#comparator()">comparator</A></B>()</CODE> 206 207 <BR> 208 Returns the comparator that orders the elements, which is 209 <A HREF="../../../../com/google/common/collect/Ordering.html#natural()"><CODE>Ordering.natural()</CODE></A> when the natural ordering of the 210 elements is used.</TD> 211 </TR> 212 <TR BGCOLOR="white" CLASS="TableRowColor"> 213 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 214 <CODE>static 215 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 216 <TR ALIGN="right" VALIGN=""> 217 <TD NOWRAP><FONT SIZE="-1"> 218 <CODE><E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 219 </TR> 220 </TABLE> 221 </CODE></FONT></TD> 222 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#copyOf(java.util.Comparator, java.lang.Iterable)">copyOf</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, 223 <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> 224 225 <BR> 226 Returns an immutable sorted set containing the given elements sorted by 227 the given <code>Comparator</code>.</TD> 228 </TR> 229 <TR BGCOLOR="white" CLASS="TableRowColor"> 230 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 231 <CODE>static 232 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 233 <TR ALIGN="right" VALIGN=""> 234 <TD NOWRAP><FONT SIZE="-1"> 235 <CODE><E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 236 </TR> 237 </TABLE> 238 </CODE></FONT></TD> 239 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#copyOf(java.util.Comparator, java.util.Iterator)">copyOf</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, 240 <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> 241 242 <BR> 243 Returns an immutable sorted set containing the given elements sorted by 244 the given <code>Comparator</code>.</TD> 245 </TR> 246 <TR BGCOLOR="white" CLASS="TableRowColor"> 247 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 248 <CODE>static 249 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 250 <TR ALIGN="right" VALIGN=""> 251 <TD NOWRAP><FONT SIZE="-1"> 252 <CODE><E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 253 </TR> 254 </TABLE> 255 </CODE></FONT></TD> 256 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.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><? extends E> elements)</CODE> 257 258 <BR> 259 Returns an immutable sorted set containing the given elements sorted by 260 their natural ordering.</TD> 261 </TR> 262 <TR BGCOLOR="white" CLASS="TableRowColor"> 263 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 264 <CODE>static 265 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 266 <TR ALIGN="right" VALIGN=""> 267 <TD NOWRAP><FONT SIZE="-1"> 268 <CODE><E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 269 </TR> 270 </TABLE> 271 </CODE></FONT></TD> 272 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.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><? extends E> elements)</CODE> 273 274 <BR> 275 Returns an immutable sorted set containing the given elements sorted by 276 their natural ordering.</TD> 277 </TR> 278 <TR BGCOLOR="white" CLASS="TableRowColor"> 279 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 280 <CODE>static 281 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 282 <TR ALIGN="right" VALIGN=""> 283 <TD NOWRAP><FONT SIZE="-1"> 284 <CODE><E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 285 </TR> 286 </TABLE> 287 </CODE></FONT></TD> 288 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#copyOfSorted(java.util.SortedSet)">copyOfSorted</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><E> sortedSet)</CODE> 289 290 <BR> 291 Returns an immutable sorted set containing the elements of a sorted set, 292 sorted by the same <code>Comparator</code>.</TD> 293 </TR> 294 <TR BGCOLOR="white" CLASS="TableRowColor"> 295 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 296 <CODE> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>></CODE></FONT></TD> 297 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#headSet(E)">headSet</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A> toElement)</CODE> 298 299 <BR> 300 </TD> 301 </TR> 302 <TR BGCOLOR="white" CLASS="TableRowColor"> 303 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 304 <CODE>static 305 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 306 <TR ALIGN="right" VALIGN=""> 307 <TD NOWRAP><FONT SIZE="-1"> 308 <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><E>> 309 <BR> 310 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><E></CODE></FONT></TD> 311 </TR> 312 </TABLE> 313 </CODE></FONT></TD> 314 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#naturalOrder()">naturalOrder</A></B>()</CODE> 315 316 <BR> 317 Returns a builder that creates immutable sorted sets whose elements are 318 ordered by their natural ordering.</TD> 319 </TR> 320 <TR BGCOLOR="white" CLASS="TableRowColor"> 321 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 322 <CODE>static 323 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 324 <TR ALIGN="right" VALIGN=""> 325 <TD NOWRAP><FONT SIZE="-1"> 326 <CODE><E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 327 </TR> 328 </TABLE> 329 </CODE></FONT></TD> 330 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of()">of</A></B>()</CODE> 331 332 <BR> 333 Returns the empty immutable sorted set.</TD> 334 </TR> 335 <TR BGCOLOR="white" CLASS="TableRowColor"> 336 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 337 <CODE>static 338 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 339 <TR ALIGN="right" VALIGN=""> 340 <TD NOWRAP><FONT SIZE="-1"> 341 <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><? super E>> 342 <BR> 343 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 344 </TR> 345 </TABLE> 346 </CODE></FONT></TD> 347 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of(E...)">of</A></B>(E... elements)</CODE> 348 349 <BR> 350 Returns an immutable sorted set containing the given elements sorted by 351 their natural ordering.</TD> 352 </TR> 353 <TR BGCOLOR="white" CLASS="TableRowColor"> 354 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 355 <CODE>static 356 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 357 <TR ALIGN="right" VALIGN=""> 358 <TD NOWRAP><FONT SIZE="-1"> 359 <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><? super E>> 360 <BR> 361 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 362 </TR> 363 </TABLE> 364 </CODE></FONT></TD> 365 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of(E)">of</A></B>(E element)</CODE> 366 367 <BR> 368 Returns an immutable sorted set containing a single element.</TD> 369 </TR> 370 <TR BGCOLOR="white" CLASS="TableRowColor"> 371 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 372 <CODE>static 373 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 374 <TR ALIGN="right" VALIGN=""> 375 <TD NOWRAP><FONT SIZE="-1"> 376 <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><? super E>> 377 <BR> 378 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 379 </TR> 380 </TABLE> 381 </CODE></FONT></TD> 382 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of(E, E)">of</A></B>(E e1, 383 E e2)</CODE> 384 385 <BR> 386 Returns an immutable sorted set containing the given elements sorted by 387 their natural ordering.</TD> 388 </TR> 389 <TR BGCOLOR="white" CLASS="TableRowColor"> 390 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 391 <CODE>static 392 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 393 <TR ALIGN="right" VALIGN=""> 394 <TD NOWRAP><FONT SIZE="-1"> 395 <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><? super E>> 396 <BR> 397 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 398 </TR> 399 </TABLE> 400 </CODE></FONT></TD> 401 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of(E, E, E)">of</A></B>(E e1, 402 E e2, 403 E e3)</CODE> 404 405 <BR> 406 Returns an immutable sorted set containing the given elements sorted by 407 their natural ordering.</TD> 408 </TR> 409 <TR BGCOLOR="white" CLASS="TableRowColor"> 410 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 411 <CODE>static 412 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 413 <TR ALIGN="right" VALIGN=""> 414 <TD NOWRAP><FONT SIZE="-1"> 415 <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><? super E>> 416 <BR> 417 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 418 </TR> 419 </TABLE> 420 </CODE></FONT></TD> 421 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of(E, E, E, E)">of</A></B>(E e1, 422 E e2, 423 E e3, 424 E e4)</CODE> 425 426 <BR> 427 Returns an immutable sorted set containing the given elements sorted by 428 their natural ordering.</TD> 429 </TR> 430 <TR BGCOLOR="white" CLASS="TableRowColor"> 431 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 432 <CODE>static 433 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 434 <TR ALIGN="right" VALIGN=""> 435 <TD NOWRAP><FONT SIZE="-1"> 436 <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><? super E>> 437 <BR> 438 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E></CODE></FONT></TD> 439 </TR> 440 </TABLE> 441 </CODE></FONT></TD> 442 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#of(E, E, E, E, E)">of</A></B>(E e1, 443 E e2, 444 E e3, 445 E e4, 446 E e5)</CODE> 447 448 <BR> 449 Returns an immutable sorted set containing the given elements sorted by 450 their natural ordering.</TD> 451 </TR> 452 <TR BGCOLOR="white" CLASS="TableRowColor"> 453 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 454 <CODE>static 455 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 456 <TR ALIGN="right" VALIGN=""> 457 <TD NOWRAP><FONT SIZE="-1"> 458 <CODE><E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><E></CODE></FONT></TD> 459 </TR> 460 </TABLE> 461 </CODE></FONT></TD> 462 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#orderedBy(java.util.Comparator)">orderedBy</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><E> comparator)</CODE> 463 464 <BR> 465 Returns a builder that creates immutable sorted sets with an explicit 466 comparator.</TD> 467 </TR> 468 <TR BGCOLOR="white" CLASS="TableRowColor"> 469 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 470 <CODE>static 471 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 472 <TR ALIGN="right" VALIGN=""> 473 <TD NOWRAP><FONT SIZE="-1"> 474 <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><E>> 475 <BR> 476 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><E></CODE></FONT></TD> 477 </TR> 478 </TABLE> 479 </CODE></FONT></TD> 480 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#reverseOrder()">reverseOrder</A></B>()</CODE> 481 482 <BR> 483 Returns a builder that creates immutable sorted sets whose elements are 484 ordered by the reverse of their natural ordering.</TD> 485 </TR> 486 <TR BGCOLOR="white" CLASS="TableRowColor"> 487 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 488 <CODE> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>></CODE></FONT></TD> 489 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#subSet(E, E)">subSet</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A> fromElement, 490 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A> toElement)</CODE> 491 492 <BR> 493 </TD> 494 </TR> 495 <TR BGCOLOR="white" CLASS="TableRowColor"> 496 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 497 <CODE> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>></CODE></FONT></TD> 498 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#tailSet(E)">tailSet</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A> fromElement)</CODE> 499 500 <BR> 501 </TD> 502 </TR> 503 </TABLE> 504 <A NAME="methods_inherited_from_class_com.google.common.collect.ImmutableSet"><!-- --></A> 505 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 506 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 507 <TH ALIGN="left"><B>Methods inherited from class com.google.common.collect.<A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A></B></TH> 508 </TR> 509 <TR BGCOLOR="white" CLASS="TableRowColor"> 510 <TD><CODE><A HREF="../../../../com/google/common/collect/ImmutableSet.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../../com/google/common/collect/ImmutableSet.html#hashCode()">hashCode</A>, <A HREF="../../../../com/google/common/collect/ImmutableSet.html#iterator()">iterator</A></CODE></TD> 511 </TR> 512 </TABLE> 513 <A NAME="methods_inherited_from_class_com.google.common.collect.ImmutableCollection"><!-- --></A> 514 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 515 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 516 <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> 517 </TR> 518 <TR BGCOLOR="white" CLASS="TableRowColor"> 519 <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> 520 </TR> 521 </TABLE> 522 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 523 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 524 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 525 <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> 526 </TR> 527 <TR BGCOLOR="white" CLASS="TableRowColor"> 528 <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> 529 </TR> 530 </TABLE> 531 <A NAME="methods_inherited_from_class_java.util.SortedSet"><!-- --></A> 532 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 533 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 534 <TH ALIGN="left"><B>Methods inherited from interface java.util.<A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A></B></TH> 535 </TR> 536 <TR BGCOLOR="white" CLASS="TableRowColor"> 537 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#first()" title="class or interface in java.util">first</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#last()" title="class or interface in java.util">last</A></CODE></TD> 538 </TR> 539 </TABLE> 540 <A NAME="methods_inherited_from_class_java.util.Set"><!-- --></A> 541 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 542 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 543 <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> 544 </TR> 545 <TR BGCOLOR="white" CLASS="TableRowColor"> 546 <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#equals(java.lang.Object)" title="class or interface in java.util">equals</A>, <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>, <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#iterator()" title="class or interface in java.util">iterator</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> 547 </TR> 548 </TABLE> 549 550 <P> 551 552 <!-- ============ METHOD DETAIL ========== --> 553 554 <A NAME="method_detail"><!-- --></A> 555 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 556 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 557 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 558 <B>Method Detail</B></FONT></TH> 559 </TR> 560 </TABLE> 561 562 <A NAME="of()"><!-- --></A><H3> 563 of</H3> 564 <PRE> 565 public static <E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>of</B>()</PRE> 566 <DL> 567 <DD>Returns the empty immutable sorted set. 568 <P> 569 <DD><DL> 570 </DL> 571 </DD> 572 <DD><DL> 573 </DL> 574 </DD> 575 </DL> 576 <HR> 577 578 <A NAME="of(java.lang.Comparable)"><!-- --></A><A NAME="of(E)"><!-- --></A><H3> 579 of</H3> 580 <PRE> 581 public static <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><? super E>> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>of</B>(E element)</PRE> 582 <DL> 583 <DD>Returns an immutable sorted set containing a single element. 584 <P> 585 <DD><DL> 586 </DL> 587 </DD> 588 <DD><DL> 589 </DL> 590 </DD> 591 </DL> 592 <HR> 593 594 <A NAME="of(java.lang.Comparable,java.lang.Comparable)"><!-- --></A><A NAME="of(E, E)"><!-- --></A><H3> 595 of</H3> 596 <PRE> 597 public static <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><? super E>> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>of</B>(E e1, 598 E e2)</PRE> 599 <DL> 600 <DD>Returns an immutable sorted set containing the given elements sorted by 601 their natural ordering. When multiple elements are equivalent according to 602 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><CODE>Comparable.compareTo(T)</CODE></A>, only the first one specified is included. 603 <P> 604 <DD><DL> 605 </DL> 606 </DD> 607 <DD><DL> 608 609 <DT><B>Throws:</B> 610 <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> 611 </DD> 612 </DL> 613 <HR> 614 615 <A NAME="of(java.lang.Comparable,java.lang.Comparable,java.lang.Comparable)"><!-- --></A><A NAME="of(E, E, E)"><!-- --></A><H3> 616 of</H3> 617 <PRE> 618 public static <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><? super E>> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>of</B>(E e1, 619 E e2, 620 E e3)</PRE> 621 <DL> 622 <DD>Returns an immutable sorted set containing the given elements sorted by 623 their natural ordering. When multiple elements are equivalent according to 624 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><CODE>Comparable.compareTo(T)</CODE></A>, only the first one specified is included. 625 <P> 626 <DD><DL> 627 </DL> 628 </DD> 629 <DD><DL> 630 631 <DT><B>Throws:</B> 632 <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> 633 </DD> 634 </DL> 635 <HR> 636 637 <A NAME="of(java.lang.Comparable,java.lang.Comparable,java.lang.Comparable,java.lang.Comparable)"><!-- --></A><A NAME="of(E, E, E, E)"><!-- --></A><H3> 638 of</H3> 639 <PRE> 640 public static <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><? super E>> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>of</B>(E e1, 641 E e2, 642 E e3, 643 E e4)</PRE> 644 <DL> 645 <DD>Returns an immutable sorted set containing the given elements sorted by 646 their natural ordering. When multiple elements are equivalent according to 647 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><CODE>Comparable.compareTo(T)</CODE></A>, only the first one specified is included. 648 <P> 649 <DD><DL> 650 </DL> 651 </DD> 652 <DD><DL> 653 654 <DT><B>Throws:</B> 655 <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> 656 </DD> 657 </DL> 658 <HR> 659 660 <A NAME="of(java.lang.Comparable,java.lang.Comparable,java.lang.Comparable,java.lang.Comparable,java.lang.Comparable)"><!-- --></A><A NAME="of(E, E, E, E, E)"><!-- --></A><H3> 661 of</H3> 662 <PRE> 663 public static <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><? super E>> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>of</B>(E e1, 664 E e2, 665 E e3, 666 E e4, 667 E e5)</PRE> 668 <DL> 669 <DD>Returns an immutable sorted set containing the given elements sorted by 670 their natural ordering. When multiple elements are equivalent according to 671 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><CODE>Comparable.compareTo(T)</CODE></A>, only the first one specified is included. 672 <P> 673 <DD><DL> 674 </DL> 675 </DD> 676 <DD><DL> 677 678 <DT><B>Throws:</B> 679 <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> 680 </DD> 681 </DL> 682 <HR> 683 684 <A NAME="of(java.lang.Comparable[])"><!-- --></A><A NAME="of(E...)"><!-- --></A><H3> 685 of</H3> 686 <PRE> 687 public static <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><? super E>> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>of</B>(E... elements)</PRE> 688 <DL> 689 <DD>Returns an immutable sorted set containing the given elements sorted by 690 their natural ordering. When multiple elements are equivalent according to 691 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><CODE>Comparable.compareTo(T)</CODE></A>, only the first one specified is included. 692 <P> 693 <DD><DL> 694 </DL> 695 </DD> 696 <DD><DL> 697 698 <DT><B>Throws:</B> 699 <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> 700 </DD> 701 </DL> 702 <HR> 703 704 <A NAME="copyOf(java.lang.Iterable)"><!-- --></A><H3> 705 copyOf</H3> 706 <PRE> 707 public static <E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <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><? extends E> elements)</PRE> 708 <DL> 709 <DD>Returns an immutable sorted set containing the given elements sorted by 710 their natural ordering. When multiple elements are equivalent according to 711 <code>compareTo()</code>, only the first one specified is included. To create a 712 copy of a <code>SortedSet</code> that preserves the comparator, call 713 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#copyOfSorted(java.util.SortedSet)"><CODE>copyOfSorted(java.util.SortedSet<E>)</CODE></A> instead. This method iterates over <code>elements</code> 714 at most once. 715 716 <p>Note that if <code>s</code> is a <code>Set<String></code>, then 717 <code>ImmutableSortedSet.copyOf(s)</code> returns an 718 <code>ImmutableSortedSet<String></code> containing each of the strings in 719 <code>s</code>, while <code>ImmutableSortedSet.of(s)</code> returns an 720 <code>ImmutableSortedSet<Set<String>></code> containing one element (the given 721 set itself). 722 723 <p><b>Note:</b> Despite what the method name suggests, if <code>elements</code> 724 is an <code>ImmutableSortedSet</code>, it may be returned instead of a copy. 725 726 <p>This method is not type-safe, as it may be called on elements that are 727 not mutually comparable. 728 <P> 729 <DD><DL> 730 </DL> 731 </DD> 732 <DD><DL> 733 734 <DT><B>Throws:</B> 735 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the elements are not mutually comparable 736 <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> 737 </DD> 738 </DL> 739 <HR> 740 741 <A NAME="copyOf(java.util.Iterator)"><!-- --></A><H3> 742 copyOf</H3> 743 <PRE> 744 public static <E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <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><? extends E> elements)</PRE> 745 <DL> 746 <DD>Returns an immutable sorted set containing the given elements sorted by 747 their natural ordering. When multiple elements are equivalent according to 748 <code>compareTo()</code>, only the first one specified is included. 749 750 <p>This method is not type-safe, as it may be called on elements that are 751 not mutually comparable. 752 <P> 753 <DD><DL> 754 </DL> 755 </DD> 756 <DD><DL> 757 758 <DT><B>Throws:</B> 759 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if the elements are not mutually comparable 760 <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> 761 </DD> 762 </DL> 763 <HR> 764 765 <A NAME="copyOf(java.util.Comparator, java.lang.Iterable)"><!-- --></A><H3> 766 copyOf</H3> 767 <PRE> 768 public static <E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>copyOf</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, 769 <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)</PRE> 770 <DL> 771 <DD>Returns an immutable sorted set containing the given elements sorted by 772 the given <code>Comparator</code>. When multiple elements are equivalent 773 according to <code>compare()</code>, only the first one specified is 774 included. This method iterates over <code>elements</code> at most once. 775 776 <p><b>Note:</b> Despite what the method name suggests, if <code>elements</code> 777 is an <code>ImmutableSortedSet</code>, it may be returned instead of a copy. 778 <P> 779 <DD><DL> 780 </DL> 781 </DD> 782 <DD><DL> 783 784 <DT><B>Throws:</B> 785 <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> or any of 786 <code>elements</code> is null</DL> 787 </DD> 788 </DL> 789 <HR> 790 791 <A NAME="copyOf(java.util.Comparator, java.util.Iterator)"><!-- --></A><H3> 792 copyOf</H3> 793 <PRE> 794 public static <E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>copyOf</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, 795 <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)</PRE> 796 <DL> 797 <DD>Returns an immutable sorted set containing the given elements sorted by 798 the given <code>Comparator</code>. When multiple elements are equivalent 799 according to <code>compareTo()</code>, only the first one specified is 800 included. 801 <P> 802 <DD><DL> 803 </DL> 804 </DD> 805 <DD><DL> 806 807 <DT><B>Throws:</B> 808 <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> or any of 809 <code>elements</code> is null</DL> 810 </DD> 811 </DL> 812 <HR> 813 814 <A NAME="copyOfSorted(java.util.SortedSet)"><!-- --></A><H3> 815 copyOfSorted</H3> 816 <PRE> 817 public static <E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><E> <B>copyOfSorted</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><E> sortedSet)</PRE> 818 <DL> 819 <DD>Returns an immutable sorted set containing the elements of a sorted set, 820 sorted by the same <code>Comparator</code>. That behavior differs from 821 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#copyOf(java.lang.Iterable)"><CODE>copyOf(Iterable)</CODE></A>, which always uses the natural ordering of the 822 elements. 823 824 <p><b>Note:</b> Despite what the method name suggests, if <code>sortedSet</code> 825 is an <code>ImmutableSortedSet</code>, it may be returned instead of a copy. 826 <P> 827 <DD><DL> 828 </DL> 829 </DD> 830 <DD><DL> 831 832 <DT><B>Throws:</B> 833 <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> 834 </DD> 835 </DL> 836 <HR> 837 838 <A NAME="orderedBy(java.util.Comparator)"><!-- --></A><H3> 839 orderedBy</H3> 840 <PRE> 841 public static <E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><E> <B>orderedBy</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><E> comparator)</PRE> 842 <DL> 843 <DD>Returns a builder that creates immutable sorted sets with an explicit 844 comparator. If the comparator has a more general type than the set being 845 generated, such as creating a <code>SortedSet<Integer></code> with a 846 <code>Comparator<Number></code>, use the <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect"><CODE>ImmutableSortedSet.Builder</CODE></A> constructor instead. 847 <P> 848 <DD><DL> 849 </DL> 850 </DD> 851 <DD><DL> 852 853 <DT><B>Throws:</B> 854 <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> 855 </DD> 856 </DL> 857 <HR> 858 859 <A NAME="reverseOrder()"><!-- --></A><H3> 860 reverseOrder</H3> 861 <PRE> 862 public static <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><E>> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><E> <B>reverseOrder</B>()</PRE> 863 <DL> 864 <DD>Returns a builder that creates immutable sorted sets whose elements are 865 ordered by the reverse of their natural ordering. 866 867 <p>Note: the type parameter <code>E</code> extends <code>Comparable<E></code> rather 868 than <code>Comparable<? super E></code> as a workaround for javac <a 869 href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468354">bug 870 6468354</a>. 871 <P> 872 <DD><DL> 873 </DL> 874 </DD> 875 <DD><DL> 876 </DL> 877 </DD> 878 </DL> 879 <HR> 880 881 <A NAME="naturalOrder()"><!-- --></A><H3> 882 naturalOrder</H3> 883 <PRE> 884 public static <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><E>> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><E> <B>naturalOrder</B>()</PRE> 885 <DL> 886 <DD>Returns a builder that creates immutable sorted sets whose elements are 887 ordered by their natural ordering. The sorted sets use <A HREF="../../../../com/google/common/collect/Ordering.html#natural()"><CODE>Ordering.natural()</CODE></A> as the comparator. This method provides more 888 type-safety than <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#builder()"><CODE>builder()</CODE></A>, as it can be called only for classes 889 that implement <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang"><CODE>Comparable</CODE></A>. 890 891 <p>Note: the type parameter <code>E</code> extends <code>Comparable<E></code> rather 892 than <code>Comparable<? super E></code> as a workaround for javac <a 893 href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468354">bug 894 6468354</a>. 895 <P> 896 <DD><DL> 897 </DL> 898 </DD> 899 <DD><DL> 900 </DL> 901 </DD> 902 </DL> 903 <HR> 904 905 <A NAME="comparator()"><!-- --></A><H3> 906 comparator</H3> 907 <PRE> 908 public <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 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>> <B>comparator</B>()</PRE> 909 <DL> 910 <DD>Returns the comparator that orders the elements, which is 911 <A HREF="../../../../com/google/common/collect/Ordering.html#natural()"><CODE>Ordering.natural()</CODE></A> when the natural ordering of the 912 elements is used. Note that its behavior is not consistent with 913 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#comparator()" title="class or interface in java.util"><CODE>SortedSet.comparator()</CODE></A>, which returns <code>null</code> to indicate 914 natural ordering. 915 <P> 916 <DD><DL> 917 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#comparator()" title="class or interface in java.util">comparator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>></CODE></DL> 918 </DD> 919 <DD><DL> 920 </DL> 921 </DD> 922 </DL> 923 <HR> 924 925 <A NAME="headSet(java.lang.Object)"><!-- --></A><A NAME="headSet(E)"><!-- --></A><H3> 926 headSet</H3> 927 <PRE> 928 public <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>> <B>headSet</B>(<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A> toElement)</PRE> 929 <DL> 930 <DD> 931 932 <p>This method returns a serializable <code>ImmutableSortedSet</code>. 933 934 <p>The <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#headSet(E)" title="class or interface in java.util"><CODE>SortedSet.headSet(E)</CODE></A> documentation states that a subset of a 935 subset throws 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 passed a 936 <code>toElement</code> greater than an earlier <code>toElement</code>. However, this 937 method doesn't throw an exception in that situation, but instead keeps the 938 original <code>toElement</code>. 939 <P> 940 <DD><DL> 941 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#headSet(E)" title="class or interface in java.util">headSet</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>></CODE></DL> 942 </DD> 943 <DD><DL> 944 </DL> 945 </DD> 946 </DL> 947 <HR> 948 949 <A NAME="subSet(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="subSet(E, E)"><!-- --></A><H3> 950 subSet</H3> 951 <PRE> 952 public <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>> <B>subSet</B>(<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A> fromElement, 953 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A> toElement)</PRE> 954 <DL> 955 <DD> 956 957 <p>This method returns a serializable <code>ImmutableSortedSet</code>. 958 959 <p>The <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#subSet(E, E)" title="class or interface in java.util"><CODE>SortedSet.subSet(E, E)</CODE></A> documentation states that a subset of a 960 subset throws 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 passed a 961 <code>fromElement</code> smaller than an earlier <code>fromElement</code>. However, 962 this method doesn't throw an exception in that situation, but instead keeps 963 the original <code>fromElement</code>. Similarly, this method keeps the 964 original <code>toElement</code>, instead of throwing an exception, if passed a 965 <code>toElement</code> greater than an earlier <code>toElement</code>. 966 <P> 967 <DD><DL> 968 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#subSet(E, E)" title="class or interface in java.util">subSet</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>></CODE></DL> 969 </DD> 970 <DD><DL> 971 </DL> 972 </DD> 973 </DL> 974 <HR> 975 976 <A NAME="tailSet(java.lang.Object)"><!-- --></A><A NAME="tailSet(E)"><!-- --></A><H3> 977 tailSet</H3> 978 <PRE> 979 public <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="class in com.google.common.collect">ImmutableSortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>> <B>tailSet</B>(<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A> fromElement)</PRE> 980 <DL> 981 <DD> 982 983 <p>This method returns a serializable <code>ImmutableSortedSet</code>. 984 985 <p>The <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#tailSet(E)" title="class or interface in java.util"><CODE>SortedSet.tailSet(E)</CODE></A> documentation states that a subset of a 986 subset throws 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 passed a 987 <code>fromElement</code> smaller than an earlier <code>fromElement</code>. However, 988 this method doesn't throw an exception in that situation, but instead keeps 989 the original <code>fromElement</code>. 990 <P> 991 <DD><DL> 992 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true#tailSet(E)" title="class or interface in java.util">tailSet</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><<A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html" title="type parameter in ImmutableSortedSet">E</A>></CODE></DL> 993 </DD> 994 <DD><DL> 995 </DL> 996 </DD> 997 </DL> 998 <HR> 999 1000 <A NAME="builder()"><!-- --></A><H3> 1001 builder</H3> 1002 <PRE> 1003 <FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A> 1004 </FONT>public static <E> <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect">ImmutableSortedSet.Builder</A><E> <B>builder</B>()</PRE> 1005 <DL> 1006 <DD><B>Deprecated.</B> <I>Use <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#naturalOrder()"><CODE>naturalOrder()</CODE></A>, which offers 1007 better type-safety.</I> 1008 <P> 1009 <DD>Not supported. Use <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.html#naturalOrder()"><CODE>naturalOrder()</CODE></A>, which offers 1010 better type-safety, instead. This method exists only to hide 1011 <A HREF="../../../../com/google/common/collect/ImmutableSet.html#builder()"><CODE>ImmutableSet.builder()</CODE></A> from consumers of <code>ImmutableSortedSet</code>. 1012 <P> 1013 <DD><DL> 1014 1015 <DT><B>Throws:</B> 1016 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - always</DL> 1017 </DD> 1018 </DL> 1019 <!-- ========= END OF CLASS DATA ========= --> 1020 <HR> 1021 1022 1023 <!-- ======= START OF BOTTOM NAVBAR ====== --> 1024 <A NAME="navbar_bottom"><!-- --></A> 1025 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 1026 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 1027 <TR> 1028 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 1029 <A NAME="navbar_bottom_firstrow"><!-- --></A> 1030 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 1031 <TR ALIGN="center" VALIGN="top"> 1032 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 1033 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 1034 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 1035 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ImmutableSortedSet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 1036 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 1037 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 1038 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 1039 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 1040 </TR> 1041 </TABLE> 1042 </TD> 1043 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 1044 </EM> 1045 </TD> 1046 </TR> 1047 1048 <TR> 1049 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 1050 <A HREF="../../../../com/google/common/collect/ImmutableSortedMap.Builder.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 1051 <A HREF="../../../../com/google/common/collect/ImmutableSortedSet.Builder.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 1052 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 1053 <A HREF="../../../../index.html?com/google/common/collect/ImmutableSortedSet.html" target="_top"><B>FRAMES</B></A> 1054 <A HREF="ImmutableSortedSet.html" target="_top"><B>NO FRAMES</B></A> 1055 <SCRIPT type="text/javascript"> 1056 <!-- 1057 if(window==top) { 1058 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 1059 } 1060 //--> 1061 </SCRIPT> 1062 <NOSCRIPT> 1063 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 1064 </NOSCRIPT> 1065 1066 1067 </FONT></TD> 1068 </TR> 1069 <TR> 1070 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 1071 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 1072 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 1073 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 1074 </TR> 1075 </TABLE> 1076 <A NAME="skip-navbar_bottom"></A> 1077 <!-- ======== END OF BOTTOM NAVBAR ======= --> 1078 1079 <HR> 1080 1081 </BODY> 1082 </HTML> 1083