• 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>
7SetMultimap (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="SetMultimap (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/SetMultimap.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/PeekingIterator.html" title="interface in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../com/google/common/collect/Sets.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/SetMultimap.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="SetMultimap.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>
93Interface SetMultimap&lt;K,V&gt;</H2>
94<DL>
95<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;</DD>
96</DL>
97<DL>
98<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A>&lt;K,V&gt;</DD>
99</DL>
100<DL>
101<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../com/google/common/collect/HashMultimap.html" title="class in com.google.common.collect">HashMultimap</A>, <A HREF="../../../../com/google/common/collect/ImmutableSetMultimap.html" title="class in com.google.common.collect">ImmutableSetMultimap</A>, <A HREF="../../../../com/google/common/collect/LinkedHashMultimap.html" title="class in com.google.common.collect">LinkedHashMultimap</A>, <A HREF="../../../../com/google/common/collect/TreeMultimap.html" title="class in com.google.common.collect">TreeMultimap</A></DD>
102</DL>
103<HR>
104<DL>
105<DT><PRE>public interface <B>SetMultimap&lt;K,V&gt;</B><DT>extends <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A>&lt;K,V&gt;</DL>
106</PRE>
107
108<P>
109A <code>Multimap</code> that cannot hold duplicate key-value pairs. Adding a
110 key-value pair that's already in the multimap has no effect.
111
112 <p>The <A HREF="../../../../com/google/common/collect/SetMultimap.html#get(K)"><CODE>get(K)</CODE></A>, <A HREF="../../../../com/google/common/collect/SetMultimap.html#removeAll(java.lang.Object)"><CODE>removeAll(java.lang.Object)</CODE></A>, and <A HREF="../../../../com/google/common/collect/SetMultimap.html#replaceValues(K, java.lang.Iterable)"><CODE>replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods
113 each return a <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> of values, while <A HREF="../../../../com/google/common/collect/SetMultimap.html#entries()"><CODE>entries()</CODE></A> returns a <code>Set</code> of map entries. Though the method signature doesn't say so explicitly,
114 the map returned by <A HREF="../../../../com/google/common/collect/SetMultimap.html#asMap()"><CODE>asMap()</CODE></A> has <code>Set</code> values.
115<P>
116
117<P>
118<DL>
119<DT><B>Since:</B></DT>
120  <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD>
121<DT><B>Author:</B></DT>
122  <DD>Jared Levy</DD>
123</DL>
124<HR>
125
126<P>
127
128<!-- ========== METHOD SUMMARY =========== -->
129
130<A NAME="method_summary"><!-- --></A>
131<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
132<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
133<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
134<B>Method Summary</B></FONT></TH>
135</TR>
136<TR BGCOLOR="white" CLASS="TableRowColor">
137<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
138<CODE>&nbsp;<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;&gt;</CODE></FONT></TD>
139<TD><CODE><B><A HREF="../../../../com/google/common/collect/SetMultimap.html#asMap()">asMap</A></B>()</CODE>
140
141<BR>
142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a map view that associates each key with the corresponding values
143 in the multimap.</TD>
144</TR>
145<TR BGCOLOR="white" CLASS="TableRowColor">
146<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147<CODE>&nbsp;<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;<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>&lt;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;&gt;</CODE></FONT></TD>
148<TD><CODE><B><A HREF="../../../../com/google/common/collect/SetMultimap.html#entries()">entries</A></B>()</CODE>
149
150<BR>
151&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a collection of all key-value pairs.</TD>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155<CODE>&nbsp;boolean</CODE></FONT></TD>
156<TD><CODE><B><A HREF="../../../../com/google/common/collect/SetMultimap.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>&nbsp;obj)</CODE>
157
158<BR>
159&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares the specified object to this multimap for equality.</TD>
160</TR>
161<TR BGCOLOR="white" CLASS="TableRowColor">
162<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163<CODE>&nbsp;<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE></FONT></TD>
164<TD><CODE><B><A HREF="../../../../com/google/common/collect/SetMultimap.html#get(K)">get</A></B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>&nbsp;key)</CODE>
165
166<BR>
167&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a collection view of all values associated with a key.</TD>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171<CODE>&nbsp;<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE></FONT></TD>
172<TD><CODE><B><A HREF="../../../../com/google/common/collect/SetMultimap.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>&nbsp;key)</CODE>
173
174<BR>
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all values associated with a given key.</TD>
176</TR>
177<TR BGCOLOR="white" CLASS="TableRowColor">
178<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179<CODE>&nbsp;<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE></FONT></TD>
180<TD><CODE><B><A HREF="../../../../com/google/common/collect/SetMultimap.html#replaceValues(K, java.lang.Iterable)">replaceValues</A></B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>&nbsp;key,
181              <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;? extends <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;&nbsp;values)</CODE>
182
183<BR>
184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stores a collection of values with the same key, replacing any existing
185 values for that key.</TD>
186</TR>
187</TABLE>
188&nbsp;<A NAME="methods_inherited_from_class_com.google.common.collect.Multimap"><!-- --></A>
189<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
190<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
191<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>
192</TR>
193<TR BGCOLOR="white" CLASS="TableRowColor">
194<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#put(K, V)">put</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>
195</TR>
196</TABLE>
197&nbsp;
198<P>
199
200<!-- ============ METHOD DETAIL ========== -->
201
202<A NAME="method_detail"><!-- --></A>
203<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
204<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
205<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
206<B>Method Detail</B></FONT></TH>
207</TR>
208</TABLE>
209
210<A NAME="get(java.lang.Object)"><!-- --></A><A NAME="get(K)"><!-- --></A><H3>
211get</H3>
212<PRE>
213<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt; <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>
214           <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>&nbsp;key)</PRE>
215<DL>
216<DD>Returns a collection view of all values associated with a key. If no
217 mappings in the multimap have the provided key, an empty collection is
218 returned.
219
220 <p>Changes to the returned collection will update the underlying multimap,
221 and vice versa.
222
223 <p>Because a <code>SetMultimap</code> has unique values for a given key, this
224 method returns a <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>, instead of the <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><CODE>Collection</CODE></A>
225 specified in the <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect"><CODE>Multimap</CODE></A> interface.
226<P>
227<DD><DL>
228<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>&lt;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE></DL>
229</DD>
230<DD><DL>
231<DT><B>Parameters:</B><DD><CODE>key</CODE> - key to search for in multimap
232<DT><B>Returns:</B><DD>the collection of values that the key maps to</DL>
233</DD>
234</DL>
235<HR>
236
237<A NAME="removeAll(java.lang.Object)"><!-- --></A><H3>
238removeAll</H3>
239<PRE>
240<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt; <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>
241                 <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>&nbsp;key)</PRE>
242<DL>
243<DD>Removes all values associated with a given key.
244
245 <p>Because a <code>SetMultimap</code> has unique values for a given key, this
246 method returns a <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>, instead of the <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><CODE>Collection</CODE></A>
247 specified in the <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect"><CODE>Multimap</CODE></A> interface.
248<P>
249<DD><DL>
250<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>&lt;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE></DL>
251</DD>
252<DD><DL>
253<DT><B>Parameters:</B><DD><CODE>key</CODE> - key of entries to remove from the multimap
254<DT><B>Returns:</B><DD>the collection of removed values, or an empty collection if no
255     values were associated with the provided key. The collection
256     <i>may</i> be modifiable, but updating it will have no effect on the
257     multimap.</DL>
258</DD>
259</DL>
260<HR>
261
262<A NAME="replaceValues(java.lang.Object,java.lang.Iterable)"><!-- --></A><A NAME="replaceValues(K, java.lang.Iterable)"><!-- --></A><H3>
263replaceValues</H3>
264<PRE>
265<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt; <B>replaceValues</B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>&nbsp;key,
266                     <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;? extends <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;&nbsp;values)</PRE>
267<DL>
268<DD>Stores a collection of values with the same key, replacing any existing
269 values for that key.
270
271 <p>Because a <code>SetMultimap</code> has unique values for a given key, this
272 method returns a <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>, instead of the <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><CODE>Collection</CODE></A>
273 specified in the <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect"><CODE>Multimap</CODE></A> interface.
274
275 <p>Any duplicates in <code>values</code> will be stored in the multimap once.
276<P>
277<DD><DL>
278<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>&lt;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE></DL>
279</DD>
280<DD><DL>
281<DT><B>Parameters:</B><DD><CODE>key</CODE> - key to store in the multimap<DD><CODE>values</CODE> - values to store in the multimap
282<DT><B>Returns:</B><DD>the collection of replaced values, or an empty collection if no
283     values were previously associated with the key. The collection
284     <i>may</i> be modifiable, but updating it will have no effect on the
285     multimap.</DL>
286</DD>
287</DL>
288<HR>
289
290<A NAME="entries()"><!-- --></A><H3>
291entries</H3>
292<PRE>
293<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;<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>&lt;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;&gt; <B>entries</B>()</PRE>
294<DL>
295<DD>Returns a collection of all key-value pairs. Changes to the returned
296 collection will update the underlying multimap, and vice versa. The entries
297 collection does not support the <code>add</code> or <code>addAll</code> operations.
298
299 <p>Because a <code>SetMultimap</code> has unique values for a given key, this
300 method returns a <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>, instead of the <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><CODE>Collection</CODE></A>
301 specified in the <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect"><CODE>Multimap</CODE></A> interface.
302<P>
303<DD><DL>
304<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>&lt;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE></DL>
305</DD>
306<DD><DL>
307
308<DT><B>Returns:</B><DD>collection of map entries consisting of key-value pairs</DL>
309</DD>
310</DL>
311<HR>
312
313<A NAME="asMap()"><!-- --></A><H3>
314asMap</H3>
315<PRE>
316<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<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;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;&gt; <B>asMap</B>()</PRE>
317<DL>
318<DD>Returns a map view that associates each key with the corresponding values
319 in the multimap. Changes to the returned map, such as element removal,
320 will update the underlying multimap. The map does not support
321 <code>setValue()</code> on its entries, <code>put</code>, or <code>putAll</code>.
322
323 <p>The collections returned by <code>asMap().get(Object)</code> have the same
324 behavior as those returned by <A HREF="../../../../com/google/common/collect/Multimap.html#get(K)"><CODE>Multimap.get(K)</CODE></A>.
325
326 <p>Though the method signature doesn't say so explicitly, the returned map
327 has <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> values.
328<P>
329<DD><DL>
330<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>&lt;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE></DL>
331</DD>
332<DD><DL>
333
334<DT><B>Returns:</B><DD>a map view from a key to its collection of values</DL>
335</DD>
336</DL>
337<HR>
338
339<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
340equals</H3>
341<PRE>
342boolean <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>
343               <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>&nbsp;obj)</PRE>
344<DL>
345<DD>Compares the specified object to this multimap for equality.
346
347 <p>Two <code>SetMultimap</code> instances are equal if, for each key, they
348 contain the same values. Equality does not depend on the ordering of keys
349 or values.
350<P>
351<DD><DL>
352<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>&lt;<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">K</A>,<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="type parameter in SetMultimap">V</A>&gt;</CODE><DT><B>Overrides:</B><DD><CODE><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></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>
353</DD>
354<DD><DL>
355</DL>
356</DD>
357</DL>
358<!-- ========= END OF CLASS DATA ========= -->
359<HR>
360
361
362<!-- ======= START OF BOTTOM NAVBAR ====== -->
363<A NAME="navbar_bottom"><!-- --></A>
364<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
365<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
366<TR>
367<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
368<A NAME="navbar_bottom_firstrow"><!-- --></A>
369<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
370  <TR ALIGN="center" VALIGN="top">
371  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
372  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
373  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
374  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SetMultimap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
375  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
376  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
377  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
378  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
379  </TR>
380</TABLE>
381</TD>
382<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
383</EM>
384</TD>
385</TR>
386
387<TR>
388<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
389&nbsp;<A HREF="../../../../com/google/common/collect/PeekingIterator.html" title="interface in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
390&nbsp;<A HREF="../../../../com/google/common/collect/Sets.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD>
391<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
392  <A HREF="../../../../index.html?com/google/common/collect/SetMultimap.html" target="_top"><B>FRAMES</B></A>  &nbsp;
393&nbsp;<A HREF="SetMultimap.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
394&nbsp;<SCRIPT type="text/javascript">
395  <!--
396  if(window==top) {
397    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
398  }
399  //-->
400</SCRIPT>
401<NOSCRIPT>
402  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
403</NOSCRIPT>
404
405
406</FONT></TD>
407</TR>
408<TR>
409<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
410  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
411<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
412DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
413</TR>
414</TABLE>
415<A NAME="skip-navbar_bottom"></A>
416<!-- ======== END OF BOTTOM NAVBAR ======= -->
417
418<HR>
419
420</BODY>
421</HTML>
422