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