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:57 PST 2010 --> 6 <TITLE> 7 ArrayListMultimap (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="ArrayListMultimap (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/ArrayListMultimap.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/AbstractIterator.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/collect/AsynchronousComputationException.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/ArrayListMultimap.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="ArrayListMultimap.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 ArrayListMultimap<K,V></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.ArrayListMultimap<K,V></B> 97 </PRE> 98 <DL> 99 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V>, <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V>, <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></DD> 100 </DL> 101 <HR> 102 <DL> 103 <DT><PRE>public final class <B>ArrayListMultimap<K,V></B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> 104 </PRE> 105 106 <P> 107 Implementation of <code>Multimap</code> that uses an <code>ArrayList</code> to store 108 the values for a given key. A <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><CODE>HashMap</CODE></A> associates each key with an 109 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util"><CODE>ArrayList</CODE></A> of values. 110 111 <p>When iterating through the collections supplied by this class, the 112 ordering of values for a given key agrees with the order in which the values 113 were added. 114 115 <p>This multimap allows duplicate key-value pairs. After adding a new 116 key-value pair equal to an existing key-value pair, the <code>ArrayListMultimap</code> will contain entries for both the new value and the old 117 value. 118 119 <p>Keys and values may be null. All optional multimap methods are supported, 120 and all returned views are modifiable. 121 122 <p>The lists returned by <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#get(K)"><CODE>get(K)</CODE></A>, <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#removeAll(java.lang.Object)"><CODE>removeAll(java.lang.Object)</CODE></A>, and <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#replaceValues(K, java.lang.Iterable)"><CODE>replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> all implement <A HREF="http://java.sun.com/javase/6/docs/api/java/util/RandomAccess.html?is-external=true" title="class or interface in java.util"><CODE>RandomAccess</CODE></A>. 123 124 <p>This class is not threadsafe when any concurrent operations update the 125 multimap. Concurrent read operations will work correctly. To allow concurrent 126 update operations, wrap your multimap with a call to <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedListMultimap(com.google.common.collect.ListMultimap)"><CODE>Multimaps.synchronizedListMultimap(com.google.common.collect.ListMultimap<K, V>)</CODE></A>. 127 <P> 128 129 <P> 130 <DL> 131 <DT><B>Since:</B></DT> 132 <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD> 133 <DT><B>Author:</B></DT> 134 <DD>Jared Levy</DD> 135 <DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.google.common.collect.ArrayListMultimap">Serialized Form</A></DL> 136 <HR> 137 138 <P> 139 140 <!-- ========== METHOD SUMMARY =========== --> 141 142 <A NAME="method_summary"><!-- --></A> 143 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 144 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 145 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 146 <B>Method Summary</B></FONT></TH> 147 </TR> 148 <TR BGCOLOR="white" CLASS="TableRowColor"> 149 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 150 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<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><V>></CODE></FONT></TD> 151 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#asMap()">asMap</A></B>()</CODE> 152 153 <BR> 154 Returns a map view that associates each key with the corresponding values 155 in the multimap.</TD> 156 </TR> 157 <TR BGCOLOR="white" CLASS="TableRowColor"> 158 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 159 <CODE> void</CODE></FONT></TD> 160 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#clear()">clear</A></B>()</CODE> 161 162 <BR> 163 Removes all key-value pairs from the multimap.</TD> 164 </TR> 165 <TR BGCOLOR="white" CLASS="TableRowColor"> 166 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 167 <CODE> boolean</CODE></FONT></TD> 168 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#containsEntry(java.lang.Object, java.lang.Object)">containsEntry</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> key, 169 <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> value)</CODE> 170 171 <BR> 172 Returns <code>true</code> if the multimap contains the specified key-value pair.</TD> 173 </TR> 174 <TR BGCOLOR="white" CLASS="TableRowColor"> 175 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 176 <CODE> boolean</CODE></FONT></TD> 177 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#containsKey(java.lang.Object)">containsKey</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> key)</CODE> 178 179 <BR> 180 Returns <code>true</code> if the multimap contains any values for the specified 181 key.</TD> 182 </TR> 183 <TR BGCOLOR="white" CLASS="TableRowColor"> 184 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 185 <CODE> boolean</CODE></FONT></TD> 186 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#containsValue(java.lang.Object)">containsValue</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> value)</CODE> 187 188 <BR> 189 Returns <code>true</code> if the multimap contains the specified value for any 190 key.</TD> 191 </TR> 192 <TR BGCOLOR="white" CLASS="TableRowColor"> 193 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 194 <CODE>static 195 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 196 <TR ALIGN="right" VALIGN=""> 197 <TD NOWRAP><FONT SIZE="-1"> 198 <CODE><K,V> <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html" title="class in com.google.common.collect">ArrayListMultimap</A><K,V></CODE></FONT></TD> 199 </TR> 200 </TABLE> 201 </CODE></FONT></TD> 202 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#create()">create</A></B>()</CODE> 203 204 <BR> 205 Creates a new, empty <code>ArrayListMultimap</code> with the default initial 206 capacities.</TD> 207 </TR> 208 <TR BGCOLOR="white" CLASS="TableRowColor"> 209 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 210 <CODE>static 211 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 212 <TR ALIGN="right" VALIGN=""> 213 <TD NOWRAP><FONT SIZE="-1"> 214 <CODE><K,V> <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html" title="class in com.google.common.collect">ArrayListMultimap</A><K,V></CODE></FONT></TD> 215 </TR> 216 </TABLE> 217 </CODE></FONT></TD> 218 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#create(int, int)">create</A></B>(int expectedKeys, 219 int expectedValuesPerKey)</CODE> 220 221 <BR> 222 Constructs an empty <code>ArrayListMultimap</code> with enough capacity to hold 223 the specified numbers of keys and values without resizing.</TD> 224 </TR> 225 <TR BGCOLOR="white" CLASS="TableRowColor"> 226 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 227 <CODE>static 228 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 229 <TR ALIGN="right" VALIGN=""> 230 <TD NOWRAP><FONT SIZE="-1"> 231 <CODE><K,V> <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html" title="class in com.google.common.collect">ArrayListMultimap</A><K,V></CODE></FONT></TD> 232 </TR> 233 </TABLE> 234 </CODE></FONT></TD> 235 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#create(com.google.common.collect.Multimap)">create</A></B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><? extends K,? extends V> multimap)</CODE> 236 237 <BR> 238 Constructs an <code>ArrayListMultimap</code> with the same mappings as the 239 specified multimap.</TD> 240 </TR> 241 <TR BGCOLOR="white" CLASS="TableRowColor"> 242 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 243 <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="http://java.sun.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</A><K,V>></CODE></FONT></TD> 244 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#entries()">entries</A></B>()</CODE> 245 246 <BR> 247 Returns a collection of all key-value pairs.</TD> 248 </TR> 249 <TR BGCOLOR="white" CLASS="TableRowColor"> 250 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 251 <CODE> boolean</CODE></FONT></TD> 252 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> object)</CODE> 253 254 <BR> 255 Compares the specified object to this multimap for equality.</TD> 256 </TR> 257 <TR BGCOLOR="white" CLASS="TableRowColor"> 258 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 259 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><V></CODE></FONT></TD> 260 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#get(K)">get</A></B>(K key)</CODE> 261 262 <BR> 263 Returns a collection view of all values associated with a key.</TD> 264 </TR> 265 <TR BGCOLOR="white" CLASS="TableRowColor"> 266 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 267 <CODE> int</CODE></FONT></TD> 268 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#hashCode()">hashCode</A></B>()</CODE> 269 270 <BR> 271 Returns the hash code for this multimap.</TD> 272 </TR> 273 <TR BGCOLOR="white" CLASS="TableRowColor"> 274 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 275 <CODE> boolean</CODE></FONT></TD> 276 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#isEmpty()">isEmpty</A></B>()</CODE> 277 278 <BR> 279 Returns <code>true</code> if the multimap contains no key-value pairs.</TD> 280 </TR> 281 <TR BGCOLOR="white" CLASS="TableRowColor"> 282 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 283 <CODE> <A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A><K></CODE></FONT></TD> 284 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#keys()">keys</A></B>()</CODE> 285 286 <BR> 287 Returns a collection, which may contain duplicates, of all keys.</TD> 288 </TR> 289 <TR BGCOLOR="white" CLASS="TableRowColor"> 290 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 291 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A><K></CODE></FONT></TD> 292 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#keySet()">keySet</A></B>()</CODE> 293 294 <BR> 295 Returns the set of all keys, each appearing once in the returned set.</TD> 296 </TR> 297 <TR BGCOLOR="white" CLASS="TableRowColor"> 298 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 299 <CODE> boolean</CODE></FONT></TD> 300 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#put(K, V)">put</A></B>(K key, 301 V value)</CODE> 302 303 <BR> 304 Stores a key-value pair in the multimap.</TD> 305 </TR> 306 <TR BGCOLOR="white" CLASS="TableRowColor"> 307 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 308 <CODE> boolean</CODE></FONT></TD> 309 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#putAll(K, java.lang.Iterable)">putAll</A></B>(K key, 310 <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 V> values)</CODE> 311 312 <BR> 313 Stores a collection of values with the same key.</TD> 314 </TR> 315 <TR BGCOLOR="white" CLASS="TableRowColor"> 316 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 317 <CODE> boolean</CODE></FONT></TD> 318 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#putAll(com.google.common.collect.Multimap)">putAll</A></B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><? extends K,? extends V> multimap)</CODE> 319 320 <BR> 321 Copies all of another multimap's key-value pairs into this multimap.</TD> 322 </TR> 323 <TR BGCOLOR="white" CLASS="TableRowColor"> 324 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 325 <CODE> boolean</CODE></FONT></TD> 326 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#remove(java.lang.Object, 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> key, 327 <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> value)</CODE> 328 329 <BR> 330 Removes a key-value pair from the multimap.</TD> 331 </TR> 332 <TR BGCOLOR="white" CLASS="TableRowColor"> 333 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 334 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><V></CODE></FONT></TD> 335 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#removeAll(java.lang.Object)">removeAll</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> key)</CODE> 336 337 <BR> 338 Removes all values associated with a given key.</TD> 339 </TR> 340 <TR BGCOLOR="white" CLASS="TableRowColor"> 341 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 342 <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><V></CODE></FONT></TD> 343 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#replaceValues(K, java.lang.Iterable)">replaceValues</A></B>(K key, 344 <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 V> values)</CODE> 345 346 <BR> 347 Stores a collection of values with the same key, replacing any existing 348 values for that key.</TD> 349 </TR> 350 <TR BGCOLOR="white" CLASS="TableRowColor"> 351 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 352 <CODE> int</CODE></FONT></TD> 353 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#size()">size</A></B>()</CODE> 354 355 <BR> 356 Returns the number of key-value pairs in the multimap.</TD> 357 </TR> 358 <TR BGCOLOR="white" CLASS="TableRowColor"> 359 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 360 <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> 361 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#toString()">toString</A></B>()</CODE> 362 363 <BR> 364 Returns a string representation of the multimap, generated by calling 365 <code>toString</code> on the map returned by <A HREF="../../../../com/google/common/collect/Multimap.html#asMap()"><CODE>Multimap.asMap()</CODE></A>.</TD> 366 </TR> 367 <TR BGCOLOR="white" CLASS="TableRowColor"> 368 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 369 <CODE> void</CODE></FONT></TD> 370 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#trimToSize()">trimToSize</A></B>()</CODE> 371 372 <BR> 373 Reduces the memory used by this <code>ArrayListMultimap</code>, if feasible.</TD> 374 </TR> 375 <TR BGCOLOR="white" CLASS="TableRowColor"> 376 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 377 <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><V></CODE></FONT></TD> 378 <TD><CODE><B><A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#values()">values</A></B>()</CODE> 379 380 <BR> 381 Returns a collection of all values in the multimap.</TD> 382 </TR> 383 </TABLE> 384 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 385 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 386 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 387 <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> 388 </TR> 389 <TR BGCOLOR="white" CLASS="TableRowColor"> 390 <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> 391 </TR> 392 </TABLE> 393 <A NAME="methods_inherited_from_class_com.google.common.collect.ListMultimap"><!-- --></A> 394 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 395 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 396 <TH ALIGN="left"><B>Methods inherited from interface com.google.common.collect.<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A></B></TH> 397 </TR> 398 <TR BGCOLOR="white" CLASS="TableRowColor"> 399 <TD><CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html#asMap()">asMap</A></CODE></TD> 400 </TR> 401 </TABLE> 402 <A NAME="methods_inherited_from_class_com.google.common.collect.Multimap"><!-- --></A> 403 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 404 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 405 <TH ALIGN="left"><B>Methods inherited from interface com.google.common.collect.<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A></B></TH> 406 </TR> 407 <TR BGCOLOR="white" CLASS="TableRowColor"> 408 <TD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#clear()">clear</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#containsEntry(java.lang.Object, java.lang.Object)">containsEntry</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#containsKey(java.lang.Object)">containsKey</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#containsValue(java.lang.Object)">containsValue</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#entries()">entries</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#hashCode()">hashCode</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#isEmpty()">isEmpty</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#keys()">keys</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#keySet()">keySet</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#putAll(K, java.lang.Iterable)">putAll</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#putAll(com.google.common.collect.Multimap)">putAll</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#remove(java.lang.Object, java.lang.Object)">remove</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#size()">size</A>, <A HREF="../../../../com/google/common/collect/Multimap.html#values()">values</A></CODE></TD> 409 </TR> 410 </TABLE> 411 412 <P> 413 414 <!-- ============ METHOD DETAIL ========== --> 415 416 <A NAME="method_detail"><!-- --></A> 417 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 418 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 419 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 420 <B>Method Detail</B></FONT></TH> 421 </TR> 422 </TABLE> 423 424 <A NAME="create()"><!-- --></A><H3> 425 create</H3> 426 <PRE> 427 public static <K,V> <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html" title="class in com.google.common.collect">ArrayListMultimap</A><K,V> <B>create</B>()</PRE> 428 <DL> 429 <DD>Creates a new, empty <code>ArrayListMultimap</code> with the default initial 430 capacities. 431 <P> 432 <DD><DL> 433 </DL> 434 </DD> 435 </DL> 436 <HR> 437 438 <A NAME="create(int, int)"><!-- --></A><H3> 439 create</H3> 440 <PRE> 441 public static <K,V> <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html" title="class in com.google.common.collect">ArrayListMultimap</A><K,V> <B>create</B>(int expectedKeys, 442 int expectedValuesPerKey)</PRE> 443 <DL> 444 <DD>Constructs an empty <code>ArrayListMultimap</code> with enough capacity to hold 445 the specified numbers of keys and values without resizing. 446 <P> 447 <DD><DL> 448 <DT><B>Parameters:</B><DD><CODE>expectedKeys</CODE> - the expected number of distinct keys<DD><CODE>expectedValuesPerKey</CODE> - the expected average number of values per key 449 <DT><B>Throws:</B> 450 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>expectedKeys</code> or <code>expectedValuesPerKey</code> is negative</DL> 451 </DD> 452 </DL> 453 <HR> 454 455 <A NAME="create(com.google.common.collect.Multimap)"><!-- --></A><H3> 456 create</H3> 457 <PRE> 458 public static <K,V> <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html" title="class in com.google.common.collect">ArrayListMultimap</A><K,V> <B>create</B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><? extends K,? extends V> multimap)</PRE> 459 <DL> 460 <DD>Constructs an <code>ArrayListMultimap</code> with the same mappings as the 461 specified multimap. 462 <P> 463 <DD><DL> 464 <DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap whose contents are copied to this multimap</DL> 465 </DD> 466 </DL> 467 <HR> 468 469 <A NAME="trimToSize()"><!-- --></A><H3> 470 trimToSize</H3> 471 <PRE> 472 public void <B>trimToSize</B>()</PRE> 473 <DL> 474 <DD>Reduces the memory used by this <code>ArrayListMultimap</code>, if feasible. 475 <P> 476 <DD><DL> 477 </DL> 478 </DD> 479 </DL> 480 <HR> 481 482 <A NAME="get(java.lang.Object)"><!-- --></A><A NAME="get(K)"><!-- --></A><H3> 483 get</H3> 484 <PRE> 485 public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><V> <B>get</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> 486 K key)</PRE> 487 <DL> 488 <DD>Returns a collection view of all values associated with a key. If no 489 mappings in the multimap have the provided key, an empty collection is 490 returned. 491 492 <p>Changes to the returned collection will update the underlying multimap, 493 and vice versa. 494 495 <p>The returned collection is not serializable. 496 <P> 497 <DD><DL> 498 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html#get(K)">get</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#get(K)">get</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 499 </DD> 500 <DD><DL> 501 <DT><B>Parameters:</B><DD><CODE>key</CODE> - key to search for in multimap 502 <DT><B>Returns:</B><DD>the collection of values that the key maps to</DL> 503 </DD> 504 </DL> 505 <HR> 506 507 <A NAME="removeAll(java.lang.Object)"><!-- --></A><H3> 508 removeAll</H3> 509 <PRE> 510 public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><V> <B>removeAll</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> 511 <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> key)</PRE> 512 <DL> 513 <DD>Removes all values associated with a given key. 514 515 <p>The returned collection is immutable. 516 <P> 517 <DD><DL> 518 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html#removeAll(java.lang.Object)">removeAll</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)">removeAll</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 519 </DD> 520 <DD><DL> 521 <DT><B>Parameters:</B><DD><CODE>key</CODE> - key of entries to remove from the multimap 522 <DT><B>Returns:</B><DD>the collection of removed values, or an empty collection if no 523 values were associated with the provided key. The collection 524 <i>may</i> be modifiable, but updating it will have no effect on the 525 multimap.</DL> 526 </DD> 527 </DL> 528 <HR> 529 530 <A NAME="replaceValues(java.lang.Object,java.lang.Iterable)"><!-- --></A><A NAME="replaceValues(K, java.lang.Iterable)"><!-- --></A><H3> 531 replaceValues</H3> 532 <PRE> 533 public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><V> <B>replaceValues</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> 534 K key, 535 <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 V> values)</PRE> 536 <DL> 537 <DD>Stores a collection of values with the same key, replacing any existing 538 values for that key. 539 540 <p>The returned collection is immutable. 541 <P> 542 <DD><DL> 543 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html#replaceValues(K, java.lang.Iterable)">replaceValues</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)">replaceValues</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 544 </DD> 545 <DD><DL> 546 <DT><B>Parameters:</B><DD><CODE>key</CODE> - key to store in the multimap<DD><CODE>values</CODE> - values to store in the multimap 547 <DT><B>Returns:</B><DD>the collection of replaced values, or an empty collection if no 548 values were previously associated with the key. The collection 549 <i>may</i> be modifiable, but updating it will have no effect on the 550 multimap.</DL> 551 </DD> 552 </DL> 553 <HR> 554 555 <A NAME="put(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="put(K, V)"><!-- --></A><H3> 556 put</H3> 557 <PRE> 558 public boolean <B>put</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> 559 K key, 560 <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> 561 V value)</PRE> 562 <DL> 563 <DD>Stores a key-value pair in the multimap. 564 <P> 565 <DD><DL> 566 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#put(K, V)">put</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 567 </DD> 568 <DD><DL> 569 <DT><B>Parameters:</B><DD><CODE>key</CODE> - key to store in the multimap<DD><CODE>value</CODE> - value to store in the multimap 570 <DT><B>Returns:</B><DD><code>true</code> always</DL> 571 </DD> 572 </DL> 573 <HR> 574 575 <A NAME="equals(java.lang.Object)"><!-- --></A><H3> 576 equals</H3> 577 <PRE> 578 public boolean <B>equals</B>(<FONT SIZE="-1"><A HREF="http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</A></FONT> 579 <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> 580 <DL> 581 <DD>Compares the specified object to this multimap for equality. 582 583 <p>Two <code>ListMultimap</code> instances are equal if, for each key, they 584 contain the same values in the same order. If the value orderings disagree, 585 the multimaps will not be considered equal. 586 <P> 587 <DD><DL> 588 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html#equals(java.lang.Object)">equals</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#equals(java.lang.Object)">equals</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 589 </DD> 590 <DD><DL> 591 </DL> 592 </DD> 593 </DL> 594 <HR> 595 596 <A NAME="size()"><!-- --></A><H3> 597 size</H3> 598 <PRE> 599 public int <B>size</B>()</PRE> 600 <DL> 601 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#size()">Multimap</A></CODE></B></DD> 602 <DD>Returns the number of key-value pairs in the multimap. 603 <P> 604 <DD><DL> 605 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#size()">size</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 606 </DD> 607 <DD><DL> 608 </DL> 609 </DD> 610 </DL> 611 <HR> 612 613 <A NAME="isEmpty()"><!-- --></A><H3> 614 isEmpty</H3> 615 <PRE> 616 public boolean <B>isEmpty</B>()</PRE> 617 <DL> 618 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#isEmpty()">Multimap</A></CODE></B></DD> 619 <DD>Returns <code>true</code> if the multimap contains no key-value pairs. 620 <P> 621 <DD><DL> 622 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#isEmpty()">isEmpty</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 623 </DD> 624 <DD><DL> 625 </DL> 626 </DD> 627 </DL> 628 <HR> 629 630 <A NAME="containsKey(java.lang.Object)"><!-- --></A><H3> 631 containsKey</H3> 632 <PRE> 633 public boolean <B>containsKey</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> 634 <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> key)</PRE> 635 <DL> 636 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#containsKey(java.lang.Object)">Multimap</A></CODE></B></DD> 637 <DD>Returns <code>true</code> if the multimap contains any values for the specified 638 key. 639 <P> 640 <DD><DL> 641 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#containsKey(java.lang.Object)">containsKey</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 642 </DD> 643 <DD><DL> 644 <DT><B>Parameters:</B><DD><CODE>key</CODE> - key to search for in multimap</DL> 645 </DD> 646 </DL> 647 <HR> 648 649 <A NAME="containsValue(java.lang.Object)"><!-- --></A><H3> 650 containsValue</H3> 651 <PRE> 652 public boolean <B>containsValue</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> 653 <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> value)</PRE> 654 <DL> 655 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#containsValue(java.lang.Object)">Multimap</A></CODE></B></DD> 656 <DD>Returns <code>true</code> if the multimap contains the specified value for any 657 key. 658 <P> 659 <DD><DL> 660 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#containsValue(java.lang.Object)">containsValue</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 661 </DD> 662 <DD><DL> 663 <DT><B>Parameters:</B><DD><CODE>value</CODE> - value to search for in multimap</DL> 664 </DD> 665 </DL> 666 <HR> 667 668 <A NAME="containsEntry(java.lang.Object, java.lang.Object)"><!-- --></A><H3> 669 containsEntry</H3> 670 <PRE> 671 public boolean <B>containsEntry</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> 672 <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> key, 673 <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> 674 <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> value)</PRE> 675 <DL> 676 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#containsEntry(java.lang.Object, java.lang.Object)">Multimap</A></CODE></B></DD> 677 <DD>Returns <code>true</code> if the multimap contains the specified key-value pair. 678 <P> 679 <DD><DL> 680 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#containsEntry(java.lang.Object, java.lang.Object)">containsEntry</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 681 </DD> 682 <DD><DL> 683 <DT><B>Parameters:</B><DD><CODE>key</CODE> - key to search for in multimap<DD><CODE>value</CODE> - value to search for in multimap</DL> 684 </DD> 685 </DL> 686 <HR> 687 688 <A NAME="remove(java.lang.Object, java.lang.Object)"><!-- --></A><H3> 689 remove</H3> 690 <PRE> 691 public boolean <B>remove</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> 692 <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> key, 693 <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> 694 <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> value)</PRE> 695 <DL> 696 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#remove(java.lang.Object, java.lang.Object)">Multimap</A></CODE></B></DD> 697 <DD>Removes a key-value pair from the multimap. 698 <P> 699 <DD><DL> 700 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#remove(java.lang.Object, java.lang.Object)">remove</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 701 </DD> 702 <DD><DL> 703 <DT><B>Parameters:</B><DD><CODE>key</CODE> - key of entry to remove from the multimap<DD><CODE>value</CODE> - value of entry to remove the multimap 704 <DT><B>Returns:</B><DD><code>true</code> if the multimap changed</DL> 705 </DD> 706 </DL> 707 <HR> 708 709 <A NAME="putAll(java.lang.Object,java.lang.Iterable)"><!-- --></A><A NAME="putAll(K, java.lang.Iterable)"><!-- --></A><H3> 710 putAll</H3> 711 <PRE> 712 public boolean <B>putAll</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> 713 K key, 714 <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 V> values)</PRE> 715 <DL> 716 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#putAll(K, java.lang.Iterable)">Multimap</A></CODE></B></DD> 717 <DD>Stores a collection of values with the same key. 718 <P> 719 <DD><DL> 720 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#putAll(K, java.lang.Iterable)">putAll</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 721 </DD> 722 <DD><DL> 723 <DT><B>Parameters:</B><DD><CODE>key</CODE> - key to store in the multimap<DD><CODE>values</CODE> - values to store in the multimap 724 <DT><B>Returns:</B><DD><code>true</code> if the multimap changed</DL> 725 </DD> 726 </DL> 727 <HR> 728 729 <A NAME="putAll(com.google.common.collect.Multimap)"><!-- --></A><H3> 730 putAll</H3> 731 <PRE> 732 public boolean <B>putAll</B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><? extends K,? extends V> multimap)</PRE> 733 <DL> 734 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#putAll(com.google.common.collect.Multimap)">Multimap</A></CODE></B></DD> 735 <DD>Copies all of another multimap's key-value pairs into this multimap. The 736 order in which the mappings are added is determined by 737 <code>multimap.entries()</code>. 738 <P> 739 <DD><DL> 740 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#putAll(com.google.common.collect.Multimap)">putAll</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 741 </DD> 742 <DD><DL> 743 <DT><B>Parameters:</B><DD><CODE>multimap</CODE> - mappings to store in this multimap 744 <DT><B>Returns:</B><DD><code>true</code> if the multimap changed</DL> 745 </DD> 746 </DL> 747 <HR> 748 749 <A NAME="clear()"><!-- --></A><H3> 750 clear</H3> 751 <PRE> 752 public void <B>clear</B>()</PRE> 753 <DL> 754 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#clear()">Multimap</A></CODE></B></DD> 755 <DD>Removes all key-value pairs from the multimap. 756 <P> 757 <DD><DL> 758 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#clear()">clear</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 759 </DD> 760 <DD><DL> 761 </DL> 762 </DD> 763 </DL> 764 <HR> 765 766 <A NAME="keySet()"><!-- --></A><H3> 767 keySet</H3> 768 <PRE> 769 public <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><K> <B>keySet</B>()</PRE> 770 <DL> 771 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#keySet()">Multimap</A></CODE></B></DD> 772 <DD>Returns the set of all keys, each appearing once in the returned set. 773 Changes to the returned set will update the underlying multimap, and vice 774 versa. 775 <P> 776 <DD><DL> 777 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#keySet()">keySet</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 778 </DD> 779 <DD><DL> 780 781 <DT><B>Returns:</B><DD>the collection of distinct keys</DL> 782 </DD> 783 </DL> 784 <HR> 785 786 <A NAME="keys()"><!-- --></A><H3> 787 keys</H3> 788 <PRE> 789 public <A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A><K> <B>keys</B>()</PRE> 790 <DL> 791 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#keys()">Multimap</A></CODE></B></DD> 792 <DD>Returns a collection, which may contain duplicates, of all keys. The number 793 of times of key appears in the returned multiset equals the number of 794 mappings the key has in the multimap. Changes to the returned multiset will 795 update the underlying multimap, and vice versa. 796 <P> 797 <DD><DL> 798 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#keys()">keys</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 799 </DD> 800 <DD><DL> 801 802 <DT><B>Returns:</B><DD>a multiset with keys corresponding to the distinct keys of the 803 multimap and frequencies corresponding to the number of values that 804 each key maps to</DL> 805 </DD> 806 </DL> 807 <HR> 808 809 <A NAME="values()"><!-- --></A><H3> 810 values</H3> 811 <PRE> 812 public <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><V> <B>values</B>()</PRE> 813 <DL> 814 <DD>Returns a collection of all values in the multimap. Changes to the returned 815 collection will update the underlying multimap, and vice versa. 816 817 <p>The iterator generated by the returned collection traverses the values 818 for one key, followed by the values of a second key, and so on. 819 <P> 820 <DD><DL> 821 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#values()">values</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 822 </DD> 823 <DD><DL> 824 825 <DT><B>Returns:</B><DD>collection of values, which may include the same value multiple 826 times if it occurs in multiple mappings</DL> 827 </DD> 828 </DL> 829 <HR> 830 831 <A NAME="entries()"><!-- --></A><H3> 832 entries</H3> 833 <PRE> 834 public <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="http://java.sun.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</A><K,V>> <B>entries</B>()</PRE> 835 <DL> 836 <DD>Returns a collection of all key-value pairs. Changes to the returned 837 collection will update the underlying multimap, and vice versa. The entries 838 collection does not support the <code>add</code> or <code>addAll</code> operations. 839 840 <p>The iterator generated by the returned collection traverses the values 841 for one key, followed by the values of a second key, and so on. 842 843 <p>Each entry is an immutable snapshot of a key-value mapping in the 844 multimap, taken at the time the entry is returned by a method call to the 845 collection or its iterator. 846 <P> 847 <DD><DL> 848 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#entries()">entries</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 849 </DD> 850 <DD><DL> 851 852 <DT><B>Returns:</B><DD>collection of map entries consisting of key-value pairs</DL> 853 </DD> 854 </DL> 855 <HR> 856 857 <A NAME="asMap()"><!-- --></A><H3> 858 asMap</H3> 859 <PRE> 860 public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<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><V>> <B>asMap</B>()</PRE> 861 <DL> 862 <DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multimap.html#asMap()">Multimap</A></CODE></B></DD> 863 <DD>Returns a map view that associates each key with the corresponding values 864 in the multimap. Changes to the returned map, such as element removal, 865 will update the underlying multimap. The map does not support 866 <code>setValue()</code> on its entries, <code>put</code>, or <code>putAll</code>. 867 868 <p>The collections returned by <code>asMap().get(Object)</code> have the same 869 behavior as those returned by <A HREF="../../../../com/google/common/collect/Multimap.html#get(K)"><CODE>Multimap.get(K)</CODE></A>. 870 <P> 871 <DD><DL> 872 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#asMap()">asMap</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></DL> 873 </DD> 874 <DD><DL> 875 876 <DT><B>Returns:</B><DD>a map view from a key to its collection of values</DL> 877 </DD> 878 </DL> 879 <HR> 880 881 <A NAME="hashCode()"><!-- --></A><H3> 882 hashCode</H3> 883 <PRE> 884 public int <B>hashCode</B>()</PRE> 885 <DL> 886 <DD>Returns the hash code for this multimap. 887 888 <p>The hash code of a multimap is defined as the hash code of the map view, 889 as returned by <A HREF="../../../../com/google/common/collect/Multimap.html#asMap()"><CODE>Multimap.asMap()</CODE></A>. 890 <P> 891 <DD><DL> 892 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multimap.html#hashCode()">hashCode</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> 893 </DD> 894 <DD><DL> 895 <DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#hashCode()" title="class or interface in java.util"><CODE>Map.hashCode()</CODE></A></DL> 896 </DD> 897 </DL> 898 <HR> 899 900 <A NAME="toString()"><!-- --></A><H3> 901 toString</H3> 902 <PRE> 903 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> 904 <DL> 905 <DD>Returns a string representation of the multimap, generated by calling 906 <code>toString</code> on the map returned by <A HREF="../../../../com/google/common/collect/Multimap.html#asMap()"><CODE>Multimap.asMap()</CODE></A>. 907 <P> 908 <DD><DL> 909 <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> 910 </DD> 911 <DD><DL> 912 913 <DT><B>Returns:</B><DD>a string representation of the multimap</DL> 914 </DD> 915 </DL> 916 <!-- ========= END OF CLASS DATA ========= --> 917 <HR> 918 919 920 <!-- ======= START OF BOTTOM NAVBAR ====== --> 921 <A NAME="navbar_bottom"><!-- --></A> 922 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 923 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 924 <TR> 925 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 926 <A NAME="navbar_bottom_firstrow"><!-- --></A> 927 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 928 <TR ALIGN="center" VALIGN="top"> 929 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 930 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 931 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 932 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ArrayListMultimap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 933 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 934 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 935 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 936 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 937 </TR> 938 </TABLE> 939 </TD> 940 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 941 </EM> 942 </TD> 943 </TR> 944 945 <TR> 946 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 947 <A HREF="../../../../com/google/common/collect/AbstractIterator.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 948 <A HREF="../../../../com/google/common/collect/AsynchronousComputationException.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 949 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 950 <A HREF="../../../../index.html?com/google/common/collect/ArrayListMultimap.html" target="_top"><B>FRAMES</B></A> 951 <A HREF="ArrayListMultimap.html" target="_top"><B>NO FRAMES</B></A> 952 <SCRIPT type="text/javascript"> 953 <!-- 954 if(window==top) { 955 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 956 } 957 //--> 958 </SCRIPT> 959 <NOSCRIPT> 960 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 961 </NOSCRIPT> 962 963 964 </FONT></TD> 965 </TR> 966 <TR> 967 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 968 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 969 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 970 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 971 </TR> 972 </TABLE> 973 <A NAME="skip-navbar_bottom"></A> 974 <!-- ======== END OF BOTTOM NAVBAR ======= --> 975 976 <HR> 977 978 </BODY> 979 </HTML> 980