• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0-google-internal) on Mon Jan 04 20:47:59 PST 2010 -->
6<TITLE>
7Multimaps (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">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="Multimaps (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>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Multimaps.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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&nbsp;<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../com/google/common/collect/Multiset.html" title="interface 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/Multimaps.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="Multimaps.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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">
91com.google.common.collect</FONT>
92<BR>
93Class Multimaps</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.Multimaps</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public final class <B>Multimaps</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>
101</PRE>
102
103<P>
104Provides static methods acting on or generating a <code>Multimap</code>.
105<P>
106
107<P>
108<DL>
109<DT><B>Since:</B></DT>
110  <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD>
111<DT><B>Author:</B></DT>
112  <DD>Jared Levy, Robert Konigsberg, Mike Bostock</DD>
113</DL>
114<HR>
115
116<P>
117
118<!-- ========== METHOD SUMMARY =========== -->
119
120<A NAME="method_summary"><!-- --></A>
121<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
122<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
123<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
124<B>Method Summary</B></FONT></TH>
125</TR>
126<TR BGCOLOR="white" CLASS="TableRowColor">
127<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
128<CODE>static
129<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
130<TR ALIGN="right" VALIGN="">
131<TD NOWRAP><FONT SIZE="-1">
132<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
133</TR>
134</TABLE>
135</CODE></FONT></TD>
136<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#forMap(java.util.Map)">forMap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;K,V&gt;&nbsp;map)</CODE>
137
138<BR>
139&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a multimap view of the specified map.</TD>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143<CODE>static
144<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
145<TR ALIGN="right" VALIGN="">
146<TD NOWRAP><FONT SIZE="-1">
147<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/ImmutableListMultimap.html" title="class in com.google.common.collect">ImmutableListMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
148</TR>
149</TABLE>
150</CODE></FONT></TD>
151<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#index(java.lang.Iterable, com.google.common.base.Function)">index</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;V&gt;&nbsp;values,
152      <A HREF="../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A>&lt;? super V,K&gt;&nbsp;keyFunction)</CODE>
153
154<BR>
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an index <code>ImmutableMultimap</code> that contains the results of
156 applying a specified function to each item in an <code>Iterable</code> of
157 values.</TD>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161<CODE>static
162<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
163<TR ALIGN="right" VALIGN="">
164<TD NOWRAP><FONT SIZE="-1">
165<CODE>&lt;K,V,M extends <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;&gt;
166<BR>
167M</CODE></FONT></TD>
168</TR>
169</TABLE>
170</CODE></FONT></TD>
171<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#invertFrom(com.google.common.collect.Multimap, M)">invertFrom</A></B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;? extends V,? extends K&gt;&nbsp;source,
172           M&nbsp;dest)</CODE>
173
174<BR>
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies each key-value mapping in <code>source</code> into <code>dest</code>, with
176 its key and value reversed.</TD>
177</TR>
178<TR BGCOLOR="white" CLASS="TableRowColor">
179<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
180<CODE>static
181<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
182<TR ALIGN="right" VALIGN="">
183<TD NOWRAP><FONT SIZE="-1">
184<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
185</TR>
186</TABLE>
187</CODE></FONT></TD>
188<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#newListMultimap(java.util.Map, com.google.common.base.Supplier)">newListMultimap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;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>&lt;V&gt;&gt;&nbsp;map,
189                <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A>&lt;? extends <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>&lt;V&gt;&gt;&nbsp;factory)</CODE>
190
191<BR>
192&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>ListMultimap</code> that uses the provided map and factory.</TD>
193</TR>
194<TR BGCOLOR="white" CLASS="TableRowColor">
195<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
196<CODE>static
197<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
198<TR ALIGN="right" VALIGN="">
199<TD NOWRAP><FONT SIZE="-1">
200<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;</CODE></FONT></TD>
201</TR>
202</TABLE>
203</CODE></FONT></TD>
204<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#newMultimap(java.util.Map, com.google.common.base.Supplier)">newMultimap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;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>&lt;V&gt;&gt;&nbsp;map,
205            <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A>&lt;? extends <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>&lt;V&gt;&gt;&nbsp;factory)</CODE>
206
207<BR>
208&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>Multimap</code> that uses the provided map and factory.</TD>
209</TR>
210<TR BGCOLOR="white" CLASS="TableRowColor">
211<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
212<CODE>static
213<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
214<TR ALIGN="right" VALIGN="">
215<TD NOWRAP><FONT SIZE="-1">
216<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
217</TR>
218</TABLE>
219</CODE></FONT></TD>
220<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#newSetMultimap(java.util.Map, com.google.common.base.Supplier)">newSetMultimap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;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>&lt;V&gt;&gt;&nbsp;map,
221               <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;V&gt;&gt;&nbsp;factory)</CODE>
222
223<BR>
224&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>SetMultimap</code> that uses the provided map and factory.</TD>
225</TR>
226<TR BGCOLOR="white" CLASS="TableRowColor">
227<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
228<CODE>static
229<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
230<TR ALIGN="right" VALIGN="">
231<TD NOWRAP><FONT SIZE="-1">
232<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
233</TR>
234</TABLE>
235</CODE></FONT></TD>
236<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#newSortedSetMultimap(java.util.Map, com.google.common.base.Supplier)">newSortedSetMultimap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;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>&lt;V&gt;&gt;&nbsp;map,
237                     <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A>&lt;V&gt;&gt;&nbsp;factory)</CODE>
238
239<BR>
240&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>SortedSetMultimap</code> that uses the provided map and
241 factory.</TD>
242</TR>
243<TR BGCOLOR="white" CLASS="TableRowColor">
244<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
245<CODE>static
246<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
247<TR ALIGN="right" VALIGN="">
248<TD NOWRAP><FONT SIZE="-1">
249<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
250</TR>
251</TABLE>
252</CODE></FONT></TD>
253<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedListMultimap(com.google.common.collect.ListMultimap)">synchronizedListMultimap</A></B>(<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt;&nbsp;multimap)</CODE>
254
255<BR>
256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a synchronized (thread-safe) <code>ListMultimap</code> backed by the
257 specified multimap.</TD>
258</TR>
259<TR BGCOLOR="white" CLASS="TableRowColor">
260<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
261<CODE>static
262<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
263<TR ALIGN="right" VALIGN="">
264<TD NOWRAP><FONT SIZE="-1">
265<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;</CODE></FONT></TD>
266</TR>
267</TABLE>
268</CODE></FONT></TD>
269<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)">synchronizedMultimap</A></B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;&nbsp;multimap)</CODE>
270
271<BR>
272&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a synchronized (thread-safe) multimap backed by the specified
273 multimap.</TD>
274</TR>
275<TR BGCOLOR="white" CLASS="TableRowColor">
276<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
277<CODE>static
278<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
279<TR ALIGN="right" VALIGN="">
280<TD NOWRAP><FONT SIZE="-1">
281<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
282</TR>
283</TABLE>
284</CODE></FONT></TD>
285<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedSetMultimap(com.google.common.collect.SetMultimap)">synchronizedSetMultimap</A></B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt;&nbsp;multimap)</CODE>
286
287<BR>
288&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a synchronized (thread-safe) <code>SetMultimap</code> backed by the
289 specified multimap.</TD>
290</TR>
291<TR BGCOLOR="white" CLASS="TableRowColor">
292<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
293<CODE>static
294<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
295<TR ALIGN="right" VALIGN="">
296<TD NOWRAP><FONT SIZE="-1">
297<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
298</TR>
299</TABLE>
300</CODE></FONT></TD>
301<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedSortedSetMultimap(com.google.common.collect.SortedSetMultimap)">synchronizedSortedSetMultimap</A></B>(<A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt;&nbsp;multimap)</CODE>
302
303<BR>
304&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a synchronized (thread-safe) <code>SortedSetMultimap</code> backed by
305 the specified multimap.</TD>
306</TR>
307<TR BGCOLOR="white" CLASS="TableRowColor">
308<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
309<CODE>static
310<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
311<TR ALIGN="right" VALIGN="">
312<TD NOWRAP><FONT SIZE="-1">
313<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
314</TR>
315</TABLE>
316</CODE></FONT></TD>
317<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#unmodifiableListMultimap(com.google.common.collect.ListMultimap)">unmodifiableListMultimap</A></B>(<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt;&nbsp;delegate)</CODE>
318
319<BR>
320&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable view of the specified <code>ListMultimap</code>.</TD>
321</TR>
322<TR BGCOLOR="white" CLASS="TableRowColor">
323<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
324<CODE>static
325<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
326<TR ALIGN="right" VALIGN="">
327<TD NOWRAP><FONT SIZE="-1">
328<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;</CODE></FONT></TD>
329</TR>
330</TABLE>
331</CODE></FONT></TD>
332<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#unmodifiableMultimap(com.google.common.collect.Multimap)">unmodifiableMultimap</A></B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;&nbsp;delegate)</CODE>
333
334<BR>
335&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable view of the specified multimap.</TD>
336</TR>
337<TR BGCOLOR="white" CLASS="TableRowColor">
338<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
339<CODE>static
340<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
341<TR ALIGN="right" VALIGN="">
342<TD NOWRAP><FONT SIZE="-1">
343<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
344</TR>
345</TABLE>
346</CODE></FONT></TD>
347<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#unmodifiableSetMultimap(com.google.common.collect.SetMultimap)">unmodifiableSetMultimap</A></B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt;&nbsp;delegate)</CODE>
348
349<BR>
350&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable view of the specified <code>SetMultimap</code>.</TD>
351</TR>
352<TR BGCOLOR="white" CLASS="TableRowColor">
353<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
354<CODE>static
355<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
356<TR ALIGN="right" VALIGN="">
357<TD NOWRAP><FONT SIZE="-1">
358<CODE>&lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt;</CODE></FONT></TD>
359</TR>
360</TABLE>
361</CODE></FONT></TD>
362<TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#unmodifiableSortedSetMultimap(com.google.common.collect.SortedSetMultimap)">unmodifiableSortedSetMultimap</A></B>(<A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt;&nbsp;delegate)</CODE>
363
364<BR>
365&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an unmodifiable view of the specified <code>SortedSetMultimap</code>.</TD>
366</TR>
367</TABLE>
368&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
369<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
370<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
371<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>
372</TR>
373<TR BGCOLOR="white" CLASS="TableRowColor">
374<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
375</TR>
376</TABLE>
377&nbsp;
378<P>
379
380<!-- ============ METHOD DETAIL ========== -->
381
382<A NAME="method_detail"><!-- --></A>
383<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
384<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
385<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
386<B>Method Detail</B></FONT></TH>
387</TR>
388</TABLE>
389
390<A NAME="newMultimap(java.util.Map, com.google.common.base.Supplier)"><!-- --></A><H3>
391newMultimap</H3>
392<PRE>
393public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt; <B>newMultimap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;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>&lt;V&gt;&gt;&nbsp;map,
394                                              <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A>&lt;? extends <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>&lt;V&gt;&gt;&nbsp;factory)</PRE>
395<DL>
396<DD>Creates a new <code>Multimap</code> that uses the provided map and factory. It
397 can generate a multimap based on arbitrary <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> and
398 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><CODE>Collection</CODE></A> classes.
399
400 <p>The <code>factory</code>-generated and <code>map</code> classes determine the
401 multimap iteration order. They also specify the behavior of the
402 <code>equals</code>, <code>hashCode</code>, and <code>toString</code> methods for the
403 multimap and its returned views. However, the multimap's <code>get</code>
404 method returns instances of a different class than <code>factory.get()</code>
405 does.
406
407 <p>The multimap is serializable if <code>map</code>, <code>factory</code>, the
408 collections generated by <code>factory</code>, and the multimap contents are all
409 serializable.
410
411 <p>The multimap is not threadsafe when any concurrent operations update the
412 multimap, even if <code>map</code> and the instances generated by
413 <code>factory</code> are. Concurrent read operations will work correctly. To
414 allow concurrent update operations, wrap the multimap with a call to
415 <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)"><CODE>synchronizedMultimap(com.google.common.collect.Multimap<K, V>)</CODE></A>.
416
417 <p>Call this method only when the simpler methods
418 <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#create()"><CODE>ArrayListMultimap.create()</CODE></A>, <A HREF="../../../../com/google/common/collect/HashMultimap.html#create()"><CODE>HashMultimap.create()</CODE></A>,
419 <A HREF="../../../../com/google/common/collect/LinkedHashMultimap.html#create()"><CODE>LinkedHashMultimap.create()</CODE></A>, <A HREF="../../../../com/google/common/collect/LinkedListMultimap.html#create()"><CODE>LinkedListMultimap.create()</CODE></A>,
420 <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create()"><CODE>TreeMultimap.create()</CODE></A>, and
421 <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create(java.util.Comparator, java.util.Comparator)"><CODE>TreeMultimap.create(Comparator, Comparator)</CODE></A> won't suffice.
422
423 <p>Note: the multimap assumes complete ownership over of <code>map</code> and
424 the collections returned by <code>factory</code>. Those objects should not be
425 manually updated and they should not use soft, weak, or phantom references.
426<P>
427<DD><DL>
428<DT><B>Parameters:</B><DD><CODE>map</CODE> - place to store the mapping from each key to its corresponding
429     values<DD><CODE>factory</CODE> - supplier of new, empty collections that will each hold all
430     values for a given key
431<DT><B>Throws:</B>
432<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>map</code> is not empty</DL>
433</DD>
434</DL>
435<HR>
436
437<A NAME="newListMultimap(java.util.Map, com.google.common.base.Supplier)"><!-- --></A><H3>
438newListMultimap</H3>
439<PRE>
440public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt; <B>newListMultimap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;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>&lt;V&gt;&gt;&nbsp;map,
441                                                      <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A>&lt;? extends <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>&lt;V&gt;&gt;&nbsp;factory)</PRE>
442<DL>
443<DD>Creates a new <code>ListMultimap</code> that uses the provided map and factory.
444 It can generate a multimap based on arbitrary <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><CODE>List</CODE></A>
445 classes.
446
447 <p>The <code>factory</code>-generated and <code>map</code> classes determine the
448 multimap iteration order. They also specify the behavior of the
449 <code>equals</code>, <code>hashCode</code>, and <code>toString</code> methods for the
450 multimap and its returned views. The multimap's <code>get</code>, <code>removeAll</code>, and <code>replaceValues</code> methods return <code>RandomAccess</code>
451 lists if the factory does. However, the multimap's <code>get</code> method
452 returns instances of a different class than does <code>factory.get()</code>.
453
454 <p>The multimap is serializable if <code>map</code>, <code>factory</code>, the
455 lists generated by <code>factory</code>, and the multimap contents are all
456 serializable.
457
458 <p>The multimap is not threadsafe when any concurrent operations update the
459 multimap, even if <code>map</code> and the instances generated by
460 <code>factory</code> are. Concurrent read operations will work correctly. To
461 allow concurrent update operations, wrap the multimap with a call to
462 <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedListMultimap(com.google.common.collect.ListMultimap)"><CODE>synchronizedListMultimap(com.google.common.collect.ListMultimap<K, V>)</CODE></A>.
463
464 <p>Call this method only when the simpler methods
465 <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#create()"><CODE>ArrayListMultimap.create()</CODE></A> and <A HREF="../../../../com/google/common/collect/LinkedListMultimap.html#create()"><CODE>LinkedListMultimap.create()</CODE></A>
466 won't suffice.
467
468 <p>Note: the multimap assumes complete ownership over of <code>map</code> and
469 the lists returned by <code>factory</code>. Those objects should not be manually
470 updated and they should not use soft, weak, or phantom references.
471<P>
472<DD><DL>
473<DT><B>Parameters:</B><DD><CODE>map</CODE> - place to store the mapping from each key to its corresponding
474     values<DD><CODE>factory</CODE> - supplier of new, empty lists that will each hold all values
475     for a given key
476<DT><B>Throws:</B>
477<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>map</code> is not empty</DL>
478</DD>
479</DL>
480<HR>
481
482<A NAME="newSetMultimap(java.util.Map, com.google.common.base.Supplier)"><!-- --></A><H3>
483newSetMultimap</H3>
484<PRE>
485public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt; <B>newSetMultimap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;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>&lt;V&gt;&gt;&nbsp;map,
486                                                    <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;V&gt;&gt;&nbsp;factory)</PRE>
487<DL>
488<DD>Creates a new <code>SetMultimap</code> that uses the provided map and factory.
489 It can generate a multimap based on arbitrary <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><CODE>Set</CODE></A>
490 classes.
491
492 <p>The <code>factory</code>-generated and <code>map</code> classes determine the
493 multimap iteration order. They also specify the behavior of the
494 <code>equals</code>, <code>hashCode</code>, and <code>toString</code> methods for the
495 multimap and its returned views. However, the multimap's <code>get</code>
496 method returns instances of a different class than <code>factory.get()</code>
497 does.
498
499 <p>The multimap is serializable if <code>map</code>, <code>factory</code>, the
500 sets generated by <code>factory</code>, and the multimap contents are all
501 serializable.
502
503 <p>The multimap is not threadsafe when any concurrent operations update the
504 multimap, even if <code>map</code> and the instances generated by
505 <code>factory</code> are. Concurrent read operations will work correctly. To
506 allow concurrent update operations, wrap the multimap with a call to
507 <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedSetMultimap(com.google.common.collect.SetMultimap)"><CODE>synchronizedSetMultimap(com.google.common.collect.SetMultimap<K, V>)</CODE></A>.
508
509 <p>Call this method only when the simpler methods
510 <A HREF="../../../../com/google/common/collect/HashMultimap.html#create()"><CODE>HashMultimap.create()</CODE></A>, <A HREF="../../../../com/google/common/collect/LinkedHashMultimap.html#create()"><CODE>LinkedHashMultimap.create()</CODE></A>,
511 <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create()"><CODE>TreeMultimap.create()</CODE></A>, and
512 <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create(java.util.Comparator, java.util.Comparator)"><CODE>TreeMultimap.create(Comparator, Comparator)</CODE></A> won't suffice.
513
514 <p>Note: the multimap assumes complete ownership over of <code>map</code> and
515 the sets returned by <code>factory</code>. Those objects should not be manually
516 updated and they should not use soft, weak, or phantom references.
517<P>
518<DD><DL>
519<DT><B>Parameters:</B><DD><CODE>map</CODE> - place to store the mapping from each key to its corresponding
520     values<DD><CODE>factory</CODE> - supplier of new, empty sets that will each hold all values
521     for a given key
522<DT><B>Throws:</B>
523<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>map</code> is not empty</DL>
524</DD>
525</DL>
526<HR>
527
528<A NAME="newSortedSetMultimap(java.util.Map, com.google.common.base.Supplier)"><!-- --></A><H3>
529newSortedSetMultimap</H3>
530<PRE>
531public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt; <B>newSortedSetMultimap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;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>&lt;V&gt;&gt;&nbsp;map,
532                                                                <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A>&lt;V&gt;&gt;&nbsp;factory)</PRE>
533<DL>
534<DD>Creates a new <code>SortedSetMultimap</code> that uses the provided map and
535 factory. It can generate a multimap based on arbitrary <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> and
536 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util"><CODE>SortedSet</CODE></A> classes.
537
538 <p>The <code>factory</code>-generated and <code>map</code> classes determine the
539 multimap iteration order. They also specify the behavior of the
540 <code>equals</code>, <code>hashCode</code>, and <code>toString</code> methods for the
541 multimap and its returned views. However, the multimap's <code>get</code>
542 method returns instances of a different class than <code>factory.get()</code>
543 does.
544
545 <p>The multimap is serializable if <code>map</code>, <code>factory</code>, the
546 sets generated by <code>factory</code>, and the multimap contents are all
547 serializable.
548
549 <p>The multimap is not threadsafe when any concurrent operations update the
550 multimap, even if <code>map</code> and the instances generated by
551 <code>factory</code> are. Concurrent read operations will work correctly. To
552 allow concurrent update operations, wrap the multimap with a call to
553 <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedSortedSetMultimap(com.google.common.collect.SortedSetMultimap)"><CODE>synchronizedSortedSetMultimap(com.google.common.collect.SortedSetMultimap<K, V>)</CODE></A>.
554
555 <p>Call this method only when the simpler methods
556 <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create()"><CODE>TreeMultimap.create()</CODE></A> and
557 <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create(java.util.Comparator, java.util.Comparator)"><CODE>TreeMultimap.create(Comparator, Comparator)</CODE></A> won't suffice.
558
559 <p>Note: the multimap assumes complete ownership over of <code>map</code> and
560 the sets returned by <code>factory</code>. Those objects should not be manually
561 updated and they should not use soft, weak, or phantom references.
562<P>
563<DD><DL>
564<DT><B>Parameters:</B><DD><CODE>map</CODE> - place to store the mapping from each key to its corresponding
565     values<DD><CODE>factory</CODE> - supplier of new, empty sorted sets that will each hold
566     all values for a given key
567<DT><B>Throws:</B>
568<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>map</code> is not empty</DL>
569</DD>
570</DL>
571<HR>
572
573<A NAME="invertFrom(com.google.common.collect.Multimap,com.google.common.collect.Multimap)"><!-- --></A><A NAME="invertFrom(com.google.common.collect.Multimap, M)"><!-- --></A><H3>
574invertFrom</H3>
575<PRE>
576public static &lt;K,V,M extends <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;&gt; M <B>invertFrom</B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;? extends V,? extends K&gt;&nbsp;source,
577                                                         M&nbsp;dest)</PRE>
578<DL>
579<DD>Copies each key-value mapping in <code>source</code> into <code>dest</code>, with
580 its key and value reversed.
581<P>
582<DD><DL>
583<DT><B>Parameters:</B><DD><CODE>source</CODE> - any multimap<DD><CODE>dest</CODE> - the multimap to copy into; usually empty
584<DT><B>Returns:</B><DD><code>dest</code></DL>
585</DD>
586</DL>
587<HR>
588
589<A NAME="synchronizedMultimap(com.google.common.collect.Multimap)"><!-- --></A><H3>
590synchronizedMultimap</H3>
591<PRE>
592public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt; <B>synchronizedMultimap</B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;&nbsp;multimap)</PRE>
593<DL>
594<DD>Returns a synchronized (thread-safe) multimap backed by the specified
595 multimap. In order to guarantee serial access, it is critical that
596 <b>all</b> access to the backing multimap is accomplished through the
597 returned multimap.
598
599 <p>It is imperative that the user manually synchronize on the returned
600 multimap when accessing any of its collection views: <pre>  <code>Multimap&lt;K, V&gt; m = Multimaps.synchronizedMultimap(
601      HashMultimap.&lt;K, V&gt;create());
602  ...
603  Set&lt;K&gt; s = m.keySet();  // Needn't be in synchronized block
604  ...
605  synchronized (m) {  // Synchronizing on m, not s!
606    Iterator&lt;K&gt; i = s.iterator(); // Must be in synchronized block
607    while (i.hasNext()) {
608      foo(i.next());
609    }
610  }</code></pre>
611
612 Failure to follow this advice may result in non-deterministic behavior.
613
614 <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and
615 <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that aren't
616 synchronized.
617
618 <p>The returned multimap will be serializable if the specified multimap is
619 serializable.
620<P>
621<DD><DL>
622<DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap to be wrapped in a synchronized view
623<DT><B>Returns:</B><DD>a synchronized view of the specified multimap</DL>
624</DD>
625</DL>
626<HR>
627
628<A NAME="unmodifiableMultimap(com.google.common.collect.Multimap)"><!-- --></A><H3>
629unmodifiableMultimap</H3>
630<PRE>
631public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt; <B>unmodifiableMultimap</B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;&nbsp;delegate)</PRE>
632<DL>
633<DD>Returns an unmodifiable view of the specified multimap. Query operations on
634 the returned multimap "read through" to the specified multimap, and
635 attempts to modify the returned multimap, either directly or through the
636 multimap's views, result in an <code>UnsupportedOperationException</code>.
637
638 <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and
639 <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that are
640 modifiable.
641
642 <p>The returned multimap will be serializable if the specified multimap is
643 serializable.
644<P>
645<DD><DL>
646<DT><B>Parameters:</B><DD><CODE>delegate</CODE> - the multimap for which an unmodifiable view is to be
647     returned
648<DT><B>Returns:</B><DD>an unmodifiable view of the specified multimap</DL>
649</DD>
650</DL>
651<HR>
652
653<A NAME="synchronizedSetMultimap(com.google.common.collect.SetMultimap)"><!-- --></A><H3>
654synchronizedSetMultimap</H3>
655<PRE>
656public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt; <B>synchronizedSetMultimap</B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt;&nbsp;multimap)</PRE>
657<DL>
658<DD>Returns a synchronized (thread-safe) <code>SetMultimap</code> backed by the
659 specified multimap.
660
661 <p>You must follow the warnings described in <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)"><CODE>synchronizedMultimap(com.google.common.collect.Multimap<K, V>)</CODE></A>.
662
663 <p>The returned multimap will be serializable if the specified multimap is
664 serializable.
665<P>
666<DD><DL>
667<DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap to be wrapped
668<DT><B>Returns:</B><DD>a synchronized view of the specified multimap</DL>
669</DD>
670</DL>
671<HR>
672
673<A NAME="unmodifiableSetMultimap(com.google.common.collect.SetMultimap)"><!-- --></A><H3>
674unmodifiableSetMultimap</H3>
675<PRE>
676public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt; <B>unmodifiableSetMultimap</B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt;&nbsp;delegate)</PRE>
677<DL>
678<DD>Returns an unmodifiable view of the specified <code>SetMultimap</code>. Query
679 operations on the returned multimap "read through" to the specified
680 multimap, and attempts to modify the returned multimap, either directly or
681 through the multimap's views, result in an
682 <code>UnsupportedOperationException</code>.
683
684 <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and
685 <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that are
686 modifiable.
687
688 <p>The returned multimap will be serializable if the specified multimap is
689 serializable.
690<P>
691<DD><DL>
692<DT><B>Parameters:</B><DD><CODE>delegate</CODE> - the multimap for which an unmodifiable view is to be
693     returned
694<DT><B>Returns:</B><DD>an unmodifiable view of the specified multimap</DL>
695</DD>
696</DL>
697<HR>
698
699<A NAME="synchronizedSortedSetMultimap(com.google.common.collect.SortedSetMultimap)"><!-- --></A><H3>
700synchronizedSortedSetMultimap</H3>
701<PRE>
702public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt; <B>synchronizedSortedSetMultimap</B>(<A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt;&nbsp;multimap)</PRE>
703<DL>
704<DD>Returns a synchronized (thread-safe) <code>SortedSetMultimap</code> backed by
705 the specified multimap.
706
707 <p>You must follow the warnings described in <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)"><CODE>synchronizedMultimap(com.google.common.collect.Multimap<K, V>)</CODE></A>.
708
709 <p>The returned multimap will be serializable if the specified multimap is
710 serializable.
711<P>
712<DD><DL>
713<DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap to be wrapped
714<DT><B>Returns:</B><DD>a synchronized view of the specified multimap</DL>
715</DD>
716</DL>
717<HR>
718
719<A NAME="unmodifiableSortedSetMultimap(com.google.common.collect.SortedSetMultimap)"><!-- --></A><H3>
720unmodifiableSortedSetMultimap</H3>
721<PRE>
722public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt; <B>unmodifiableSortedSetMultimap</B>(<A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt;&nbsp;delegate)</PRE>
723<DL>
724<DD>Returns an unmodifiable view of the specified <code>SortedSetMultimap</code>.
725 Query operations on the returned multimap "read through" to the specified
726 multimap, and attempts to modify the returned multimap, either directly or
727 through the multimap's views, result in an
728 <code>UnsupportedOperationException</code>.
729
730 <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and
731 <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that are
732 modifiable.
733
734 <p>The returned multimap will be serializable if the specified multimap is
735 serializable.
736<P>
737<DD><DL>
738<DT><B>Parameters:</B><DD><CODE>delegate</CODE> - the multimap for which an unmodifiable view is to be
739     returned
740<DT><B>Returns:</B><DD>an unmodifiable view of the specified multimap</DL>
741</DD>
742</DL>
743<HR>
744
745<A NAME="synchronizedListMultimap(com.google.common.collect.ListMultimap)"><!-- --></A><H3>
746synchronizedListMultimap</H3>
747<PRE>
748public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt; <B>synchronizedListMultimap</B>(<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt;&nbsp;multimap)</PRE>
749<DL>
750<DD>Returns a synchronized (thread-safe) <code>ListMultimap</code> backed by the
751 specified multimap.
752
753 <p>You must follow the warnings described in <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)"><CODE>synchronizedMultimap(com.google.common.collect.Multimap<K, V>)</CODE></A>.
754<P>
755<DD><DL>
756<DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap to be wrapped
757<DT><B>Returns:</B><DD>a synchronized view of the specified multimap</DL>
758</DD>
759</DL>
760<HR>
761
762<A NAME="unmodifiableListMultimap(com.google.common.collect.ListMultimap)"><!-- --></A><H3>
763unmodifiableListMultimap</H3>
764<PRE>
765public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt; <B>unmodifiableListMultimap</B>(<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A>&lt;K,V&gt;&nbsp;delegate)</PRE>
766<DL>
767<DD>Returns an unmodifiable view of the specified <code>ListMultimap</code>. Query
768 operations on the returned multimap "read through" to the specified
769 multimap, and attempts to modify the returned multimap, either directly or
770 through the multimap's views, result in an
771 <code>UnsupportedOperationException</code>.
772
773 <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and
774 <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that are
775 modifiable.
776
777 <p>The returned multimap will be serializable if the specified multimap is
778 serializable.
779<P>
780<DD><DL>
781<DT><B>Parameters:</B><DD><CODE>delegate</CODE> - the multimap for which an unmodifiable view is to be
782     returned
783<DT><B>Returns:</B><DD>an unmodifiable view of the specified multimap</DL>
784</DD>
785</DL>
786<HR>
787
788<A NAME="forMap(java.util.Map)"><!-- --></A><H3>
789forMap</H3>
790<PRE>
791public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A>&lt;K,V&gt; <B>forMap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;K,V&gt;&nbsp;map)</PRE>
792<DL>
793<DD>Returns a multimap view of the specified map. The multimap is backed by the
794 map, so changes to the map are reflected in the multimap, and vice versa.
795 If the map is modified while an iteration over one of the multimap's
796 collection views is in progress (except through the iterator's own <code>remove</code> operation, or through the <code>setValue</code> operation on a map entry
797 returned by the iterator), the results of the iteration are undefined.
798
799 <p>The multimap supports mapping removal, which removes the corresponding
800 mapping from the map. It does not support any operations which might add
801 mappings, such as <code>put</code>, <code>putAll</code> or <code>replaceValues</code>.
802
803 <p>The returned multimap will be serializable if the specified map is
804 serializable.
805<P>
806<DD><DL>
807<DT><B>Parameters:</B><DD><CODE>map</CODE> - the backing map for the returned multimap view</DL>
808</DD>
809</DL>
810<HR>
811
812<A NAME="index(java.lang.Iterable, com.google.common.base.Function)"><!-- --></A><H3>
813index</H3>
814<PRE>
815public static &lt;K,V&gt; <A HREF="../../../../com/google/common/collect/ImmutableListMultimap.html" title="class in com.google.common.collect">ImmutableListMultimap</A>&lt;K,V&gt; <B>index</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;V&gt;&nbsp;values,
816                                                     <A HREF="../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A>&lt;? super V,K&gt;&nbsp;keyFunction)</PRE>
817<DL>
818<DD>Creates an index <code>ImmutableMultimap</code> that contains the results of
819 applying a specified function to each item in an <code>Iterable</code> of
820 values. Each value will be stored as a value in the resulting multimap,
821 yielding a multimap with the same size as the input iterable. The key used
822 to store that value in the multimap will be the result of calling the
823 function on that value. The resulting multimap is created as an immutable
824 snapshot, it does <em>not</em> reflect subsequent changes on the input
825 iterable.
826
827 <p>For example, <pre class="code">  <code>List&lt;String&gt; badGuys
828      = Arrays.asList("Inky", "Blinky", "Pinky", "Pinky", "Clyde");
829  Function&lt;String, Integer&gt; stringLengthFunction = ...;
830  Multimap&lt;Integer, String&gt; index
831      = Multimaps.index(badGuys, stringLengthFunction);
832  System.out.println(index);</code></pre>
833
834 prints <pre class="code">  <code>{4=[Inky], 5=[Pinky, Pinky, Clyde], 6=[Blinky]}</code></pre>
835
836 <p>The returned multimap is serializable if its keys and values are all
837 serializable.
838<P>
839<DD><DL>
840<DT><B>Parameters:</B><DD><CODE>values</CODE> - the values to use when constructing the <code>ImmutableMultimap</code><DD><CODE>keyFunction</CODE> - the function used to produce the key for each value
841<DT><B>Returns:</B><DD><code>ImmutableMultimap</code> mapping the result of evaluating the
842     function <code>keyFunction</code> on each value in the input collection to
843     that value
844<DT><B>Throws:</B>
845<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if any of the following cases is true: <ul>
846 <li> <code>values</code> is null
847 <li> <code>keyFunction</code> is null
848 <li> An element in <code>values</code> is null
849 <li> <code>keyFunction</code> returns null for any element of <code>values</code>
850 </ul></DL>
851</DD>
852</DL>
853<!-- ========= END OF CLASS DATA ========= -->
854<HR>
855
856
857<!-- ======= START OF BOTTOM NAVBAR ====== -->
858<A NAME="navbar_bottom"><!-- --></A>
859<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
860<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
861<TR>
862<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
863<A NAME="navbar_bottom_firstrow"><!-- --></A>
864<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
865  <TR ALIGN="center" VALIGN="top">
866  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
867  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
868  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
869  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Multimaps.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
870  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
871  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
872  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
873  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
874  </TR>
875</TABLE>
876</TD>
877<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
878</EM>
879</TD>
880</TR>
881
882<TR>
883<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
884&nbsp;<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
885&nbsp;<A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD>
886<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
887  <A HREF="../../../../index.html?com/google/common/collect/Multimaps.html" target="_top"><B>FRAMES</B></A>  &nbsp;
888&nbsp;<A HREF="Multimaps.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
889&nbsp;<SCRIPT type="text/javascript">
890  <!--
891  if(window==top) {
892    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
893  }
894  //-->
895</SCRIPT>
896<NOSCRIPT>
897  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
898</NOSCRIPT>
899
900
901</FONT></TD>
902</TR>
903<TR>
904<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
905  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
906<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
907DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
908</TR>
909</TABLE>
910<A NAME="skip-navbar_bottom"></A>
911<!-- ======== END OF BOTTOM NAVBAR ======= -->
912
913<HR>
914
915</BODY>
916</HTML>
917