1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 <!--NewPage--> 3 <HTML> 4 <HEAD> 5 <!-- Generated by javadoc (build 1.6.0-google-internal) on Mon Jan 04 20:47:58 PST 2010 --> 6 <TITLE> 7 ImmutableCollection (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="ImmutableCollection (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/ImmutableCollection.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/ImmutableClassToInstanceMap.Builder.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/collect/ImmutableList.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/ImmutableCollection.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="ImmutableCollection.html" target="_top"><B>NO FRAMES</B></A> 63 <SCRIPT type="text/javascript"> 64 <!-- 65 if(window==top) { 66 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 67 } 68 //--> 69 </SCRIPT> 70 <NOSCRIPT> 71 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 72 </NOSCRIPT> 73 74 75 </FONT></TD> 76 </TR> 77 <TR> 78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 79 SUMMARY: NESTED | FIELD | 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 ImmutableCollection<E></H2> 94 <PRE> 95 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> 96 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.collect.ImmutableCollection<E></B> 97 </PRE> 98 <DL> 99 <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></DD> 100 </DL> 101 <DL> 102 <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/google/common/collect/ImmutableList.html" title="class in com.google.common.collect">ImmutableList</A>, <A HREF="../../../../com/google/common/collect/ImmutableMultiset.html" title="class in com.google.common.collect">ImmutableMultiset</A>, <A HREF="../../../../com/google/common/collect/ImmutableSet.html" title="class in com.google.common.collect">ImmutableSet</A></DD> 103 </DL> 104 <HR> 105 <DL> 106 <DT><PRE>public abstract class <B>ImmutableCollection<E></B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <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/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL> 107 </PRE> 108 109 <P> 110 An immutable collection. Does not permit null elements. 111 112 <p>In addition to the <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><CODE>Collection</CODE></A> methods, this class has an <A HREF="../../../../com/google/common/collect/ImmutableCollection.html#asList()"><CODE>asList()</CODE></A> method, which returns a list view of the collection's elements. 113 114 <p><b>Note</b>: Although this class is not final, it cannot be subclassed 115 outside of this package as it has no public or protected constructors. Thus, 116 instances of this type are guaranteed to be immutable. 117 <P> 118 119 <P> 120 <DL> 121 <DT><B>Since:</B></DT> 122 <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD> 123 <DT><B>Author:</B></DT> 124 <DD>Jesse Wilson</DD> 125 <DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.google.common.collect.ImmutableCollection">Serialized Form</A></DL> 126 <HR> 127 128 <P> 129 130 <!-- ========== METHOD SUMMARY =========== --> 131 132 <A NAME="method_summary"><!-- --></A> 133 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 134 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 135 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 136 <B>Method Summary</B></FONT></TH> 137 </TR> 138 <TR BGCOLOR="white" CLASS="TableRowColor"> 139 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 140 <CODE> boolean</CODE></FONT></TD> 141 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#add(E)">add</A></B>(<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A> e)</CODE> 142 143 <BR> 144 Guaranteed to throw an exception and leave the collection unmodified.</TD> 145 </TR> 146 <TR BGCOLOR="white" CLASS="TableRowColor"> 147 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 148 <CODE> boolean</CODE></FONT></TD> 149 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#addAll(java.util.Collection)">addAll</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><? extends <A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>> newElements)</CODE> 150 151 <BR> 152 Guaranteed to throw an exception and leave the collection unmodified.</TD> 153 </TR> 154 <TR BGCOLOR="white" CLASS="TableRowColor"> 155 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 156 <CODE> <A HREF="../../../../com/google/common/collect/ImmutableList.html" title="class in com.google.common.collect">ImmutableList</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></FONT></TD> 157 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#asList()">asList</A></B>()</CODE> 158 159 <BR> 160 Returns a list view of the collection.</TD> 161 </TR> 162 <TR BGCOLOR="white" CLASS="TableRowColor"> 163 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 164 <CODE> void</CODE></FONT></TD> 165 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#clear()">clear</A></B>()</CODE> 166 167 <BR> 168 Guaranteed to throw an exception and leave the collection unmodified.</TD> 169 </TR> 170 <TR BGCOLOR="white" CLASS="TableRowColor"> 171 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 172 <CODE> boolean</CODE></FONT></TD> 173 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#contains(java.lang.Object)">contains</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> object)</CODE> 174 175 <BR> 176 </TD> 177 </TR> 178 <TR BGCOLOR="white" CLASS="TableRowColor"> 179 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 180 <CODE> boolean</CODE></FONT></TD> 181 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#containsAll(java.util.Collection)">containsAll</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><?> targets)</CODE> 182 183 <BR> 184 </TD> 185 </TR> 186 <TR BGCOLOR="white" CLASS="TableRowColor"> 187 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 188 <CODE> boolean</CODE></FONT></TD> 189 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#isEmpty()">isEmpty</A></B>()</CODE> 190 191 <BR> 192 </TD> 193 </TR> 194 <TR BGCOLOR="white" CLASS="TableRowColor"> 195 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 196 <CODE>abstract <A HREF="../../../../com/google/common/collect/UnmodifiableIterator.html" title="class in com.google.common.collect">UnmodifiableIterator</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></FONT></TD> 197 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#iterator()">iterator</A></B>()</CODE> 198 199 <BR> 200 Returns an unmodifiable iterator across the elements in this collection.</TD> 201 </TR> 202 <TR BGCOLOR="white" CLASS="TableRowColor"> 203 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 204 <CODE> boolean</CODE></FONT></TD> 205 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#remove(java.lang.Object)">remove</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> object)</CODE> 206 207 <BR> 208 Guaranteed to throw an exception and leave the collection unmodified.</TD> 209 </TR> 210 <TR BGCOLOR="white" CLASS="TableRowColor"> 211 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 212 <CODE> boolean</CODE></FONT></TD> 213 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#removeAll(java.util.Collection)">removeAll</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><?> oldElements)</CODE> 214 215 <BR> 216 Guaranteed to throw an exception and leave the collection unmodified.</TD> 217 </TR> 218 <TR BGCOLOR="white" CLASS="TableRowColor"> 219 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 220 <CODE> boolean</CODE></FONT></TD> 221 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#retainAll(java.util.Collection)">retainAll</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><?> elementsToKeep)</CODE> 222 223 <BR> 224 Guaranteed to throw an exception and leave the collection unmodified.</TD> 225 </TR> 226 <TR BGCOLOR="white" CLASS="TableRowColor"> 227 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 228 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD> 229 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#toArray()">toArray</A></B>()</CODE> 230 231 <BR> 232 </TD> 233 </TR> 234 <TR BGCOLOR="white" CLASS="TableRowColor"> 235 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 236 <CODE> 237 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 238 <TR ALIGN="right" VALIGN=""> 239 <TD NOWRAP><FONT SIZE="-1"> 240 <CODE><T> T[]</CODE></FONT></TD> 241 </TR> 242 </TABLE> 243 </CODE></FONT></TD> 244 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#toArray(T[])">toArray</A></B>(T[] other)</CODE> 245 246 <BR> 247 </TD> 248 </TR> 249 <TR BGCOLOR="white" CLASS="TableRowColor"> 250 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 251 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> 252 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableCollection.html#toString()">toString</A></B>()</CODE> 253 254 <BR> 255 </TD> 256 </TR> 257 </TABLE> 258 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 259 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 260 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 261 <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> 262 </TR> 263 <TR BGCOLOR="white" CLASS="TableRowColor"> 264 <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#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> 265 </TR> 266 </TABLE> 267 <A NAME="methods_inherited_from_class_java.util.Collection"><!-- --></A> 268 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 269 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 270 <TH ALIGN="left"><B>Methods inherited from interface java.util.<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></B></TH> 271 </TR> 272 <TR BGCOLOR="white" CLASS="TableRowColor"> 273 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#size()" title="class or interface in java.util">size</A></CODE></TD> 274 </TR> 275 </TABLE> 276 277 <P> 278 279 <!-- ============ METHOD DETAIL ========== --> 280 281 <A NAME="method_detail"><!-- --></A> 282 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 283 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 284 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 285 <B>Method Detail</B></FONT></TH> 286 </TR> 287 </TABLE> 288 289 <A NAME="iterator()"><!-- --></A><H3> 290 iterator</H3> 291 <PRE> 292 public abstract <A HREF="../../../../com/google/common/collect/UnmodifiableIterator.html" title="class in com.google.common.collect">UnmodifiableIterator</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>> <B>iterator</B>()</PRE> 293 <DL> 294 <DD>Returns an unmodifiable iterator across the elements in this collection. 295 <P> 296 <DD><DL> 297 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#iterator()" title="class or interface in java.util">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 298 </DD> 299 <DD><DL> 300 </DL> 301 </DD> 302 </DL> 303 <HR> 304 305 <A NAME="toArray()"><!-- --></A><H3> 306 toArray</H3> 307 <PRE> 308 public <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>toArray</B>()</PRE> 309 <DL> 310 <DD><DL> 311 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#toArray()" title="class or interface in java.util">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 312 </DD> 313 <DD><DL> 314 </DL> 315 </DD> 316 </DL> 317 <HR> 318 319 <A NAME="toArray(java.lang.Object[])"><!-- --></A><A NAME="toArray(T[])"><!-- --></A><H3> 320 toArray</H3> 321 <PRE> 322 public <T> T[] <B>toArray</B>(T[] other)</PRE> 323 <DL> 324 <DD><DL> 325 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#toArray(T[])" title="class or interface in java.util">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 326 </DD> 327 <DD><DL> 328 </DL> 329 </DD> 330 </DL> 331 <HR> 332 333 <A NAME="contains(java.lang.Object)"><!-- --></A><H3> 334 contains</H3> 335 <PRE> 336 public boolean <B>contains</B>(<FONT SIZE="-1"><A HREF="http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</A></FONT> 337 <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> object)</PRE> 338 <DL> 339 <DD><DL> 340 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util">contains</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 341 </DD> 342 <DD><DL> 343 </DL> 344 </DD> 345 </DL> 346 <HR> 347 348 <A NAME="containsAll(java.util.Collection)"><!-- --></A><H3> 349 containsAll</H3> 350 <PRE> 351 public boolean <B>containsAll</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><?> targets)</PRE> 352 <DL> 353 <DD><DL> 354 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 355 </DD> 356 <DD><DL> 357 </DL> 358 </DD> 359 </DL> 360 <HR> 361 362 <A NAME="isEmpty()"><!-- --></A><H3> 363 isEmpty</H3> 364 <PRE> 365 public boolean <B>isEmpty</B>()</PRE> 366 <DL> 367 <DD><DL> 368 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#isEmpty()" title="class or interface in java.util">isEmpty</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 369 </DD> 370 <DD><DL> 371 </DL> 372 </DD> 373 </DL> 374 <HR> 375 376 <A NAME="toString()"><!-- --></A><H3> 377 toString</H3> 378 <PRE> 379 public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> 380 <DL> 381 <DD><DL> 382 <DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> 383 </DD> 384 <DD><DL> 385 </DL> 386 </DD> 387 </DL> 388 <HR> 389 390 <A NAME="add(java.lang.Object)"><!-- --></A><A NAME="add(E)"><!-- --></A><H3> 391 add</H3> 392 <PRE> 393 public final boolean <B>add</B>(<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A> e)</PRE> 394 <DL> 395 <DD>Guaranteed to throw an exception and leave the collection unmodified. 396 <P> 397 <DD><DL> 398 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#add(E)" title="class or interface in java.util">add</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 399 </DD> 400 <DD><DL> 401 402 <DT><B>Throws:</B> 403 <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> 404 </DD> 405 </DL> 406 <HR> 407 408 <A NAME="remove(java.lang.Object)"><!-- --></A><H3> 409 remove</H3> 410 <PRE> 411 public final boolean <B>remove</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> object)</PRE> 412 <DL> 413 <DD>Guaranteed to throw an exception and leave the collection unmodified. 414 <P> 415 <DD><DL> 416 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 417 </DD> 418 <DD><DL> 419 420 <DT><B>Throws:</B> 421 <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> 422 </DD> 423 </DL> 424 <HR> 425 426 <A NAME="addAll(java.util.Collection)"><!-- --></A><H3> 427 addAll</H3> 428 <PRE> 429 public final boolean <B>addAll</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><? extends <A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>> newElements)</PRE> 430 <DL> 431 <DD>Guaranteed to throw an exception and leave the collection unmodified. 432 <P> 433 <DD><DL> 434 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 435 </DD> 436 <DD><DL> 437 438 <DT><B>Throws:</B> 439 <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> 440 </DD> 441 </DL> 442 <HR> 443 444 <A NAME="removeAll(java.util.Collection)"><!-- --></A><H3> 445 removeAll</H3> 446 <PRE> 447 public final boolean <B>removeAll</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><?> oldElements)</PRE> 448 <DL> 449 <DD>Guaranteed to throw an exception and leave the collection unmodified. 450 <P> 451 <DD><DL> 452 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 453 </DD> 454 <DD><DL> 455 456 <DT><B>Throws:</B> 457 <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> 458 </DD> 459 </DL> 460 <HR> 461 462 <A NAME="retainAll(java.util.Collection)"><!-- --></A><H3> 463 retainAll</H3> 464 <PRE> 465 public final boolean <B>retainAll</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><?> elementsToKeep)</PRE> 466 <DL> 467 <DD>Guaranteed to throw an exception and leave the collection unmodified. 468 <P> 469 <DD><DL> 470 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 471 </DD> 472 <DD><DL> 473 474 <DT><B>Throws:</B> 475 <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> 476 </DD> 477 </DL> 478 <HR> 479 480 <A NAME="clear()"><!-- --></A><H3> 481 clear</H3> 482 <PRE> 483 public final void <B>clear</B>()</PRE> 484 <DL> 485 <DD>Guaranteed to throw an exception and leave the collection unmodified. 486 <P> 487 <DD><DL> 488 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#clear()" title="class or interface in java.util">clear</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>></CODE></DL> 489 </DD> 490 <DD><DL> 491 492 <DT><B>Throws:</B> 493 <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> 494 </DD> 495 </DL> 496 <HR> 497 498 <A NAME="asList()"><!-- --></A><H3> 499 asList</H3> 500 <PRE> 501 public <A HREF="../../../../com/google/common/collect/ImmutableList.html" title="class in com.google.common.collect">ImmutableList</A><<A HREF="../../../../com/google/common/collect/ImmutableCollection.html" title="type parameter in ImmutableCollection">E</A>> <B>asList</B>()</PRE> 502 <DL> 503 <DD>Returns a list view of the collection. 504 <P> 505 <DD><DL> 506 </DL> 507 </DD> 508 <DD><DL> 509 <DT><B>Since:</B></DT> 510 <DD>2010.01.04 <b>tentative</b></DD> 511 </DL> 512 </DD> 513 </DL> 514 <!-- ========= END OF CLASS DATA ========= --> 515 <HR> 516 517 518 <!-- ======= START OF BOTTOM NAVBAR ====== --> 519 <A NAME="navbar_bottom"><!-- --></A> 520 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 521 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 522 <TR> 523 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 524 <A NAME="navbar_bottom_firstrow"><!-- --></A> 525 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 526 <TR ALIGN="center" VALIGN="top"> 527 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 528 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 529 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 530 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ImmutableCollection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 531 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 532 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 533 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 534 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 535 </TR> 536 </TABLE> 537 </TD> 538 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 539 </EM> 540 </TD> 541 </TR> 542 543 <TR> 544 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 545 <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.Builder.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 546 <A HREF="../../../../com/google/common/collect/ImmutableList.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 547 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 548 <A HREF="../../../../index.html?com/google/common/collect/ImmutableCollection.html" target="_top"><B>FRAMES</B></A> 549 <A HREF="ImmutableCollection.html" target="_top"><B>NO FRAMES</B></A> 550 <SCRIPT type="text/javascript"> 551 <!-- 552 if(window==top) { 553 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 554 } 555 //--> 556 </SCRIPT> 557 <NOSCRIPT> 558 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 559 </NOSCRIPT> 560 561 562 </FONT></TD> 563 </TR> 564 <TR> 565 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 566 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 567 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 568 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 569 </TR> 570 </TABLE> 571 <A NAME="skip-navbar_bottom"></A> 572 <!-- ======== END OF BOTTOM NAVBAR ======= --> 573 574 <HR> 575 576 </BODY> 577 </HTML> 578