• 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:58 PST 2010 -->
6<TITLE>
7HashMultiset (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="HashMultiset (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/HashMultiset.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/HashMultimap.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableBiMap.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/HashMultiset.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="HashMultiset.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 HashMultiset&lt;E&gt;</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 "><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">java.util.AbstractCollection</A>&lt;E&gt;
97      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.collect.HashMultiset&lt;E&gt;</B>
98</PRE>
99<DL>
100<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;E&gt;, <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;E&gt;</DD>
101</DL>
102<HR>
103<DL>
104<DT><PRE>public final class <B>HashMultiset&lt;E&gt;</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</DL>
105</PRE>
106
107<P>
108Multiset implementation backed by a <A HREF="http://java.sun.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><CODE>HashMap</CODE></A>.
109<P>
110
111<P>
112<DL>
113<DT><B>Since:</B></DT>
114  <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD>
115<DT><B>Author:</B></DT>
116  <DD>Kevin Bourrillion, Jared Levy</DD>
117<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.google.common.collect.HashMultiset">Serialized Form</A></DL>
118<HR>
119
120<P>
121<!-- ======== NESTED CLASS SUMMARY ======== -->
122
123<A NAME="nested_class_summary"><!-- --></A>
124<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
125<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
126<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
127<B>Nested Class Summary</B></FONT></TH>
128</TR>
129</TABLE>
130&nbsp;<A NAME="nested_classes_inherited_from_class_com.google.common.collect.Multiset"><!-- --></A>
131<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
132<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
133<TH ALIGN="left"><B>Nested classes/interfaces inherited from interface com.google.common.collect.<A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A></B></TH>
134</TR>
135<TR BGCOLOR="white" CLASS="TableRowColor">
136<TD><CODE><A HREF="../../../../com/google/common/collect/Multiset.Entry.html" title="interface in com.google.common.collect">Multiset.Entry</A>&lt;<A HREF="../../../../com/google/common/collect/Multiset.Entry.html" title="type parameter in Multiset.Entry">E</A>&gt;</CODE></TD>
137</TR>
138</TABLE>
139&nbsp;
140
141<!-- ========== METHOD SUMMARY =========== -->
142
143<A NAME="method_summary"><!-- --></A>
144<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
145<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
146<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
147<B>Method Summary</B></FONT></TH>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151<CODE>&nbsp;boolean</CODE></FONT></TD>
152<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#add(E)">add</A></B>(E&nbsp;element)</CODE>
153
154<BR>
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a single occurrence of the specified element to this multiset.</TD>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE>&nbsp;int</CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#add(E, int)">add</A></B>(E&nbsp;element,
161    int&nbsp;occurrences)</CODE>
162
163<BR>
164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a number of occurrences of an element to this multiset.</TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168<CODE>&nbsp;boolean</CODE></FONT></TD>
169<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#addAll(java.util.Collection)">addAll</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;? extends E&gt;&nbsp;elementsToAdd)</CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>&nbsp;void</CODE></FONT></TD>
177<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#clear()">clear</A></B>()</CODE>
178
179<BR>
180&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184<CODE>&nbsp;boolean</CODE></FONT></TD>
185<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#contains(java.lang.Object)">contains</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;element)</CODE>
186
187<BR>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether this multiset contains the specified element.</TD>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192<CODE>&nbsp;boolean</CODE></FONT></TD>
193<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#containsAll(java.util.Collection)">containsAll</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;?&gt;&nbsp;elements)</CODE>
194
195<BR>
196&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this multiset contains at least one occurrence of
197 each element in the specified collection.</TD>
198</TR>
199<TR BGCOLOR="white" CLASS="TableRowColor">
200<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
201<CODE>&nbsp;int</CODE></FONT></TD>
202<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#count(java.lang.Object)">count</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;element)</CODE>
203
204<BR>
205&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of occurrences of an element in this multiset (the
206 <i>count</i> of the element).</TD>
207</TR>
208<TR BGCOLOR="white" CLASS="TableRowColor">
209<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
210<CODE>static
211<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
212<TR ALIGN="right" VALIGN="">
213<TD NOWRAP><FONT SIZE="-1">
214<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/HashMultiset.html" title="class in com.google.common.collect">HashMultiset</A>&lt;E&gt;</CODE></FONT></TD>
215</TR>
216</TABLE>
217</CODE></FONT></TD>
218<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#create()">create</A></B>()</CODE>
219
220<BR>
221&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new, empty <code>HashMultiset</code> using the default initial
222 capacity.</TD>
223</TR>
224<TR BGCOLOR="white" CLASS="TableRowColor">
225<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
226<CODE>static
227<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
228<TR ALIGN="right" VALIGN="">
229<TD NOWRAP><FONT SIZE="-1">
230<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/HashMultiset.html" title="class in com.google.common.collect">HashMultiset</A>&lt;E&gt;</CODE></FONT></TD>
231</TR>
232</TABLE>
233</CODE></FONT></TD>
234<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#create(int)">create</A></B>(int&nbsp;distinctElements)</CODE>
235
236<BR>
237&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new, empty <code>HashMultiset</code> with the specified expected
238 number of distinct elements.</TD>
239</TR>
240<TR BGCOLOR="white" CLASS="TableRowColor">
241<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
242<CODE>static
243<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
244<TR ALIGN="right" VALIGN="">
245<TD NOWRAP><FONT SIZE="-1">
246<CODE>&lt;E&gt; <A HREF="../../../../com/google/common/collect/HashMultiset.html" title="class in com.google.common.collect">HashMultiset</A>&lt;E&gt;</CODE></FONT></TD>
247</TR>
248</TABLE>
249</CODE></FONT></TD>
250<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#create(java.lang.Iterable)">create</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;? extends E&gt;&nbsp;elements)</CODE>
251
252<BR>
253&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>HashMultiset</code> containing the specified elements.</TD>
254</TR>
255<TR BGCOLOR="white" CLASS="TableRowColor">
256<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
257<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;E&gt;</CODE></FONT></TD>
258<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#elementSet()">elementSet</A></B>()</CODE>
259
260<BR>
261&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the set of distinct elements contained in this multiset.</TD>
262</TR>
263<TR BGCOLOR="white" CLASS="TableRowColor">
264<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
265<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/Multiset.Entry.html" title="interface in com.google.common.collect">Multiset.Entry</A>&lt;E&gt;&gt;</CODE></FONT></TD>
266<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#entrySet()">entrySet</A></B>()</CODE>
267
268<BR>
269&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a view of the contents of this multiset, grouped into <code>Multiset.Entry</code> instances, each providing an element of the multiset and
270 the count of that element.</TD>
271</TR>
272<TR BGCOLOR="white" CLASS="TableRowColor">
273<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274<CODE>&nbsp;boolean</CODE></FONT></TD>
275<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.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;object)</CODE>
276
277<BR>
278&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares the specified object with this multiset for equality.</TD>
279</TR>
280<TR BGCOLOR="white" CLASS="TableRowColor">
281<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282<CODE>&nbsp;int</CODE></FONT></TD>
283<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#hashCode()">hashCode</A></B>()</CODE>
284
285<BR>
286&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the hash code for this multiset.</TD>
287</TR>
288<TR BGCOLOR="white" CLASS="TableRowColor">
289<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290<CODE>&nbsp;boolean</CODE></FONT></TD>
291<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#isEmpty()">isEmpty</A></B>()</CODE>
292
293<BR>
294&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
295</TR>
296<TR BGCOLOR="white" CLASS="TableRowColor">
297<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
298<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A>&lt;E&gt;</CODE></FONT></TD>
299<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#iterator()">iterator</A></B>()</CODE>
300
301<BR>
302&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
303</TR>
304<TR BGCOLOR="white" CLASS="TableRowColor">
305<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
306<CODE>&nbsp;boolean</CODE></FONT></TD>
307<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#remove(java.lang.Object)">remove</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;element)</CODE>
308
309<BR>
310&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a <i>single</i> occurrence of the specified element from this
311 multiset, if present.</TD>
312</TR>
313<TR BGCOLOR="white" CLASS="TableRowColor">
314<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
315<CODE>&nbsp;int</CODE></FONT></TD>
316<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#remove(java.lang.Object, int)">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>&nbsp;element,
317       int&nbsp;occurrences)</CODE>
318
319<BR>
320&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a number of occurrences of the specified element from this
321 multiset.</TD>
322</TR>
323<TR BGCOLOR="white" CLASS="TableRowColor">
324<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
325<CODE>&nbsp;boolean</CODE></FONT></TD>
326<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#removeAll(java.util.Collection)">removeAll</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;?&gt;&nbsp;elementsToRemove)</CODE>
327
328<BR>
329&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
330</TR>
331<TR BGCOLOR="white" CLASS="TableRowColor">
332<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
333<CODE>&nbsp;boolean</CODE></FONT></TD>
334<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#retainAll(java.util.Collection)">retainAll</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;?&gt;&nbsp;elementsToRetain)</CODE>
335
336<BR>
337&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
338</TR>
339<TR BGCOLOR="white" CLASS="TableRowColor">
340<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
341<CODE>&nbsp;int</CODE></FONT></TD>
342<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#setCount(E, int)">setCount</A></B>(E&nbsp;element,
343         int&nbsp;count)</CODE>
344
345<BR>
346&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds or removes the necessary occurrences of an element such that the
347 element attains the desired count.</TD>
348</TR>
349<TR BGCOLOR="white" CLASS="TableRowColor">
350<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
351<CODE>&nbsp;boolean</CODE></FONT></TD>
352<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#setCount(E, int, int)">setCount</A></B>(E&nbsp;element,
353         int&nbsp;oldCount,
354         int&nbsp;newCount)</CODE>
355
356<BR>
357&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Conditionally sets the count of an element to a new value, as described in
358 <A HREF="../../../../com/google/common/collect/Multiset.html#setCount(E, int)"><CODE>Multiset.setCount(Object, int)</CODE></A>, provided that the element has the expected
359 current count.</TD>
360</TR>
361<TR BGCOLOR="white" CLASS="TableRowColor">
362<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
363<CODE>&nbsp;int</CODE></FONT></TD>
364<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#size()">size</A></B>()</CODE>
365
366<BR>
367&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
368</TR>
369<TR BGCOLOR="white" CLASS="TableRowColor">
370<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
371<CODE>&nbsp;<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>
372<TD><CODE><B><A HREF="../../../../com/google/common/collect/HashMultiset.html#toString()">toString</A></B>()</CODE>
373
374<BR>
375&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
376</TR>
377</TABLE>
378&nbsp;<A NAME="methods_inherited_from_class_java.util.AbstractCollection"><!-- --></A>
379<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
380<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
381<TH ALIGN="left"><B>Methods inherited from class java.util.<A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A></B></TH>
382</TR>
383<TR BGCOLOR="white" CLASS="TableRowColor">
384<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#toArray()" title="class or interface in java.util">toArray</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#toArray(T[])" title="class or interface in java.util">toArray</A></CODE></TD>
385</TR>
386</TABLE>
387&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
388<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
389<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
390<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>
391</TR>
392<TR BGCOLOR="white" CLASS="TableRowColor">
393<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>
394</TR>
395</TABLE>
396&nbsp;<A NAME="methods_inherited_from_class_java.util.Collection"><!-- --></A>
397<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
398<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
399<TH ALIGN="left"><B>Methods inherited from interface java.util.<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A></B></TH>
400</TR>
401<TR BGCOLOR="white" CLASS="TableRowColor">
402<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#toArray()" title="class or interface in java.util">toArray</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#toArray(T[])" title="class or interface in java.util">toArray</A></CODE></TD>
403</TR>
404</TABLE>
405&nbsp;
406<P>
407
408<!-- ============ METHOD DETAIL ========== -->
409
410<A NAME="method_detail"><!-- --></A>
411<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
412<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
413<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
414<B>Method Detail</B></FONT></TH>
415</TR>
416</TABLE>
417
418<A NAME="create()"><!-- --></A><H3>
419create</H3>
420<PRE>
421public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/HashMultiset.html" title="class in com.google.common.collect">HashMultiset</A>&lt;E&gt; <B>create</B>()</PRE>
422<DL>
423<DD>Creates a new, empty <code>HashMultiset</code> using the default initial
424 capacity.
425<P>
426<DD><DL>
427</DL>
428</DD>
429</DL>
430<HR>
431
432<A NAME="create(int)"><!-- --></A><H3>
433create</H3>
434<PRE>
435public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/HashMultiset.html" title="class in com.google.common.collect">HashMultiset</A>&lt;E&gt; <B>create</B>(int&nbsp;distinctElements)</PRE>
436<DL>
437<DD>Creates a new, empty <code>HashMultiset</code> with the specified expected
438 number of distinct elements.
439<P>
440<DD><DL>
441<DT><B>Parameters:</B><DD><CODE>distinctElements</CODE> - the expected number of distinct elements
442<DT><B>Throws:</B>
443<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>distinctElements</code> is negative</DL>
444</DD>
445</DL>
446<HR>
447
448<A NAME="create(java.lang.Iterable)"><!-- --></A><H3>
449create</H3>
450<PRE>
451public static &lt;E&gt; <A HREF="../../../../com/google/common/collect/HashMultiset.html" title="class in com.google.common.collect">HashMultiset</A>&lt;E&gt; <B>create</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;? extends E&gt;&nbsp;elements)</PRE>
452<DL>
453<DD>Creates a new <code>HashMultiset</code> containing the specified elements.
454<P>
455<DD><DL>
456<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the elements that the multiset should contain</DL>
457</DD>
458</DL>
459<HR>
460
461<A NAME="entrySet()"><!-- --></A><H3>
462entrySet</H3>
463<PRE>
464public <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/Multiset.Entry.html" title="interface in com.google.common.collect">Multiset.Entry</A>&lt;E&gt;&gt; <B>entrySet</B>()</PRE>
465<DL>
466<DD>Returns a view of the contents of this multiset, grouped into <code>Multiset.Entry</code> instances, each providing an element of the multiset and
467 the count of that element. This set contains exactly one entry for each
468 distinct element in the multiset (thus it always has the same size as the
469 <A HREF="../../../../com/google/common/collect/Multiset.html#elementSet()"><CODE>Multiset.elementSet()</CODE></A>). The order of the elements in the element set is
470 unspecified.
471
472 <p>The entry set is backed by the same data as the multiset, so any change
473 to either is immediately reflected in the other. However, multiset changes
474 may or may not be reflected in any <code>Entry</code> instances already
475 retrieved from the entry set (this is implementation-dependent).
476 Furthermore, implementations are not required to support modifications to
477 the entry set at all, and the <code>Entry</code> instances themselves don't
478 even have methods for modification. See the specific implementation class
479 for more details on how its entry set handles modifications.
480
481 <p>Invoking <A HREF="../../../../com/google/common/collect/Multiset.Entry.html#getCount()"><CODE>Multiset.Entry.getCount()</CODE></A> on an entry in the returned
482 set always returns the current count of that element in the multiset, as
483 opposed to the count at the time the entry was retrieved.
484<P>
485<DD><DL>
486<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#entrySet()">entrySet</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE></DL>
487</DD>
488<DD><DL>
489
490<DT><B>Returns:</B><DD>a set of entries representing the data of this multiset</DL>
491</DD>
492</DL>
493<HR>
494
495<A NAME="size()"><!-- --></A><H3>
496size</H3>
497<PRE>
498public int <B>size</B>()</PRE>
499<DL>
500<DD><DL>
501<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#size()" title="class or interface in java.util">size</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE></DL>
502</DD>
503<DD><DL>
504</DL>
505</DD>
506</DL>
507<HR>
508
509<A NAME="iterator()"><!-- --></A><H3>
510iterator</H3>
511<PRE>
512public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A>&lt;E&gt; <B>iterator</B>()</PRE>
513<DL>
514<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#iterator()">Multiset</A></CODE></B></DD>
515<DD>
516
517 <p>Elements that occur multiple times in the multiset will appear
518 multiple times in this iterator, though not necessarily sequentially.
519<P>
520<DD><DL>
521<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#iterator()" title="class or interface in java.util">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE></DL>
522</DD>
523<DD><DL>
524</DL>
525</DD>
526</DL>
527<HR>
528
529<A NAME="count(java.lang.Object)"><!-- --></A><H3>
530count</H3>
531<PRE>
532public int <B>count</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>
533                 <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;element)</PRE>
534<DL>
535<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#count(java.lang.Object)">Multiset</A></CODE></B></DD>
536<DD>Returns the number of occurrences of an element in this multiset (the
537 <i>count</i> of the element). Note that for an <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"><CODE>Object.equals(java.lang.Object)</CODE></A>-based
538 multiset, this gives the same result as <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collections.html?is-external=true#frequency(java.util.Collection, java.lang.Object)" title="class or interface in java.util"><CODE>Collections.frequency(java.util.Collection<?>, java.lang.Object)</CODE></A>
539 (which would presumably perform more poorly).
540
541 <p><b>Note:</b> the utility method <A HREF="../../../../com/google/common/collect/Iterables.html#frequency(java.lang.Iterable, java.lang.Object)"><CODE>Iterables.frequency(java.lang.Iterable<?>, java.lang.Object)</CODE></A> generalizes
542 this operation; it correctly delegates to this method when dealing with a
543 multiset, but it can also accept any other iterable type.
544<P>
545<DD><DL>
546<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#count(java.lang.Object)">count</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE></DL>
547</DD>
548<DD><DL>
549<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to count occurrences of
550<DT><B>Returns:</B><DD>the number of occurrences of the element in this multiset; possibly
551     zero but never negative</DL>
552</DD>
553</DL>
554<HR>
555
556<A NAME="add(java.lang.Object,int)"><!-- --></A><A NAME="add(E, int)"><!-- --></A><H3>
557add</H3>
558<PRE>
559public int <B>add</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>
560               E&nbsp;element,
561               int&nbsp;occurrences)</PRE>
562<DL>
563<DD>Adds a number of occurrences of an element to this multiset. Note that if
564 <code>occurrences == 1</code>, this method has the identical effect to <A HREF="../../../../com/google/common/collect/Multiset.html#add(E)"><CODE>Multiset.add(Object)</CODE></A>. This method is functionally equivalent (except in the case
565 of overflow) to the call <code>addAll(Collections.nCopies(element,
566 occurrences))</code>, which would presumably perform much more poorly.
567<P>
568<DD><DL>
569<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#add(E, int)">add</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE></DL>
570</DD>
571<DD><DL>
572<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to add occurrences of; may be <code>null</code> only
573     if explicitly allowed by the implementation<DD><CODE>occurrences</CODE> - the number of occurrences of the element to add. May be
574     zero, in which case no change will be made.
575<DT><B>Returns:</B><DD>the count of the element before the operation; possibly zero
576<DT><B>Throws:</B>
577<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 the call would result in more than
578     <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><CODE>Integer.MAX_VALUE</CODE></A> occurrences of <code>element</code> in this
579     multiset.</DL>
580</DD>
581</DL>
582<HR>
583
584<A NAME="remove(java.lang.Object, int)"><!-- --></A><H3>
585remove</H3>
586<PRE>
587public int <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>
588                  <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;element,
589                  int&nbsp;occurrences)</PRE>
590<DL>
591<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#remove(java.lang.Object, int)">Multiset</A></CODE></B></DD>
592<DD>Removes a number of occurrences of the specified element from this
593 multiset. If the multiset contains fewer than this number of occurrences to
594 begin with, all occurrences will be removed.  Note that if
595 <code>occurrences == 1</code>, this is functionally equivalent to the call
596 <code>remove(element)</code>.
597<P>
598<DD><DL>
599<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#remove(java.lang.Object, int)">remove</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE></DL>
600</DD>
601<DD><DL>
602<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to conditionally remove occurrences of<DD><CODE>occurrences</CODE> - the number of occurrences of the element to remove. May
603     be zero, in which case no change will be made.
604<DT><B>Returns:</B><DD>the count of the element before the operation; possibly zero</DL>
605</DD>
606</DL>
607<HR>
608
609<A NAME="setCount(java.lang.Object,int)"><!-- --></A><A NAME="setCount(E, int)"><!-- --></A><H3>
610setCount</H3>
611<PRE>
612public int <B>setCount</B>(E&nbsp;element,
613                    int&nbsp;count)</PRE>
614<DL>
615<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#setCount(E, int)">Multiset</A></CODE></B></DD>
616<DD>Adds or removes the necessary occurrences of an element such that the
617 element attains the desired count.
618<P>
619<DD><DL>
620<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#setCount(E, int)">setCount</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE></DL>
621</DD>
622<DD><DL>
623<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to add or remove occurrences of; may be null
624     only if explicitly allowed by the implementation<DD><CODE>count</CODE> - the desired count of the element in this multiset
625<DT><B>Returns:</B><DD>the count of the element before the operation; possibly zero</DL>
626</DD>
627</DL>
628<HR>
629
630<A NAME="isEmpty()"><!-- --></A><H3>
631isEmpty</H3>
632<PRE>
633public boolean <B>isEmpty</B>()</PRE>
634<DL>
635<DD><DL>
636<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#isEmpty()" title="class or interface in java.util">isEmpty</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#isEmpty()" title="class or interface in java.util">isEmpty</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
637</DD>
638<DD><DL>
639</DL>
640</DD>
641</DL>
642<HR>
643
644<A NAME="contains(java.lang.Object)"><!-- --></A><H3>
645contains</H3>
646<PRE>
647public boolean <B>contains</B>(<FONT SIZE="-1"><A HREF="http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</A></FONT>
648                        <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;element)</PRE>
649<DL>
650<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#contains(java.lang.Object)">Multiset</A></CODE></B></DD>
651<DD>Determines whether this multiset contains the specified element.
652
653 <p>This method refines <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util"><CODE>Collection.contains(java.lang.Object)</CODE></A> to further specify that
654 it <b>may not</b> throw an exception in response to <code>element</code> being
655 null or of the wrong type.
656<P>
657<DD><DL>
658<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#contains(java.lang.Object)">contains</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util">contains</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util">contains</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
659</DD>
660<DD><DL>
661<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to check for
662<DT><B>Returns:</B><DD><code>true</code> if this multiset contains at least one occurrence of
663     the element</DL>
664</DD>
665</DL>
666<HR>
667
668<A NAME="add(java.lang.Object)"><!-- --></A><A NAME="add(E)"><!-- --></A><H3>
669add</H3>
670<PRE>
671public boolean <B>add</B>(<FONT SIZE="-1"><A HREF="http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</A></FONT>
672                   E&nbsp;element)</PRE>
673<DL>
674<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#add(E)">Multiset</A></CODE></B></DD>
675<DD>Adds a single occurrence of the specified element to this multiset.
676
677 <p>This method refines <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#add(E)" title="class or interface in java.util"><CODE>Collection.add(E)</CODE></A>, which only <i>ensures</i>
678 the presence of the element, to further specify that a successful call must
679 always increment the count of the element, and the overall size of the
680 collection, by one.
681<P>
682<DD><DL>
683<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#add(E)">add</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#add(E)" title="class or interface in java.util">add</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#add(E)" title="class or interface in java.util">add</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
684</DD>
685<DD><DL>
686<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to add one occurrence of; may be null only if
687     explicitly allowed by the implementation
688<DT><B>Returns:</B><DD><code>true</code> always, since this call is required to modify the
689     multiset, unlike other <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> types</DL>
690</DD>
691</DL>
692<HR>
693
694<A NAME="remove(java.lang.Object)"><!-- --></A><H3>
695remove</H3>
696<PRE>
697public boolean <B>remove</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;element)</PRE>
698<DL>
699<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#remove(java.lang.Object)">Multiset</A></CODE></B></DD>
700<DD>Removes a <i>single</i> occurrence of the specified element from this
701 multiset, if present.
702
703 <p>This method refines <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util"><CODE>Collection.remove(java.lang.Object)</CODE></A> to further specify that it
704 <b>may not</b> throw an exception in response to <code>element</code> being null
705 or of the wrong type.
706<P>
707<DD><DL>
708<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#remove(java.lang.Object)">remove</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
709</DD>
710<DD><DL>
711<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to remove one occurrence of
712<DT><B>Returns:</B><DD><code>true</code> if an occurrence was found and removed</DL>
713</DD>
714</DL>
715<HR>
716
717<A NAME="setCount(java.lang.Object,int,int)"><!-- --></A><A NAME="setCount(E, int, int)"><!-- --></A><H3>
718setCount</H3>
719<PRE>
720public boolean <B>setCount</B>(E&nbsp;element,
721                        int&nbsp;oldCount,
722                        int&nbsp;newCount)</PRE>
723<DL>
724<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#setCount(E, int, int)">Multiset</A></CODE></B></DD>
725<DD>Conditionally sets the count of an element to a new value, as described in
726 <A HREF="../../../../com/google/common/collect/Multiset.html#setCount(E, int)"><CODE>Multiset.setCount(Object, int)</CODE></A>, provided that the element has the expected
727 current count. If the current count is not <code>oldCount</code>, no change is
728 made.
729<P>
730<DD><DL>
731<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#setCount(E, int, int)">setCount</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE></DL>
732</DD>
733<DD><DL>
734<DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to conditionally set the count of; may be null
735     only if explicitly allowed by the implementation<DD><CODE>oldCount</CODE> - the expected present count of the element in this multiset<DD><CODE>newCount</CODE> - the desired count of the element in this multiset
736<DT><B>Returns:</B><DD><code>true</code> if the condition for modification was met. This
737     implies that the multiset was indeed modified, unless
738     <code>oldCount == newCount</code>.</DL>
739</DD>
740</DL>
741<HR>
742
743<A NAME="containsAll(java.util.Collection)"><!-- --></A><H3>
744containsAll</H3>
745<PRE>
746public boolean <B>containsAll</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;?&gt;&nbsp;elements)</PRE>
747<DL>
748<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#containsAll(java.util.Collection)">Multiset</A></CODE></B></DD>
749<DD>Returns <code>true</code> if this multiset contains at least one occurrence of
750 each element in the specified collection.
751
752 <p>This method refines <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util"><CODE>Collection.containsAll(java.util.Collection<?>)</CODE></A> to further specify
753 that it <b>may not</b> throw an exception in response to any of <code>elements</code> being null or of the wrong type.
754
755 <p><b>Note:</b> this method does not take into account the occurrence
756 count of an element in the two collections; it may still return <code>true</code> even if <code>elements</code> contains several occurrences of an element
757 and this multiset contains only one. This is no different than any other
758 collection type like <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>, but it may be unexpected to the user of
759 a multiset.
760<P>
761<DD><DL>
762<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#containsAll(java.util.Collection)">containsAll</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
763</DD>
764<DD><DL>
765<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the collection of elements to be checked for containment in
766     this multiset
767<DT><B>Returns:</B><DD><code>true</code> if this multiset contains at least one occurrence of
768     each element contained in <code>elements</code></DL>
769</DD>
770</DL>
771<HR>
772
773<A NAME="addAll(java.util.Collection)"><!-- --></A><H3>
774addAll</H3>
775<PRE>
776public boolean <B>addAll</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;? extends E&gt;&nbsp;elementsToAdd)</PRE>
777<DL>
778<DD><DL>
779<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util">addAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
780</DD>
781<DD><DL>
782</DL>
783</DD>
784</DL>
785<HR>
786
787<A NAME="removeAll(java.util.Collection)"><!-- --></A><H3>
788removeAll</H3>
789<PRE>
790public boolean <B>removeAll</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;?&gt;&nbsp;elementsToRemove)</PRE>
791<DL>
792<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#removeAll(java.util.Collection)">Multiset</A></CODE></B></DD>
793<DD>
794
795 <p>This method refines <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util"><CODE>Collection.removeAll(java.util.Collection<?>)</CODE></A> to further specify that
796 it <b>may not</b> throw an exception in response to any of <code>elements</code>
797 being null or of the wrong type.
798<P>
799<DD><DL>
800<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#removeAll(java.util.Collection)">removeAll</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
801</DD>
802<DD><DL>
803</DL>
804</DD>
805</DL>
806<HR>
807
808<A NAME="retainAll(java.util.Collection)"><!-- --></A><H3>
809retainAll</H3>
810<PRE>
811public boolean <B>retainAll</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;?&gt;&nbsp;elementsToRetain)</PRE>
812<DL>
813<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#retainAll(java.util.Collection)">Multiset</A></CODE></B></DD>
814<DD>
815
816 <p>This method refines <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util"><CODE>Collection.retainAll(java.util.Collection<?>)</CODE></A> to further specify that
817 it <b>may not</b> throw an exception in response to any of <code>elements</code>
818 being null or of the wrong type.
819<P>
820<DD><DL>
821<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#retainAll(java.util.Collection)">retainAll</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
822</DD>
823<DD><DL>
824</DL>
825</DD>
826</DL>
827<HR>
828
829<A NAME="clear()"><!-- --></A><H3>
830clear</H3>
831<PRE>
832public void <B>clear</B>()</PRE>
833<DL>
834<DD><DL>
835<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#clear()" title="class or interface in java.util">clear</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#clear()" title="class or interface in java.util">clear</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
836</DD>
837<DD><DL>
838</DL>
839</DD>
840</DL>
841<HR>
842
843<A NAME="elementSet()"><!-- --></A><H3>
844elementSet</H3>
845<PRE>
846public <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;E&gt; <B>elementSet</B>()</PRE>
847<DL>
848<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/Multiset.html#elementSet()">Multiset</A></CODE></B></DD>
849<DD>Returns the set of distinct elements contained in this multiset. The
850 element set is backed by the same data as the multiset, so any change to
851 either is immediately reflected in the other. The order of the elements in
852 the element set is unspecified.
853
854 <p>If the element set supports any removal operations, these necessarily
855 cause <b>all</b> occurrences of the removed element(s) to be removed from
856 the multiset. Implementations are not expected to support the add
857 operations, although this is possible.
858
859 <p>A common use for the element set is to find the number of distinct
860 elements in the multiset: <code>elementSet().size()</code>.
861<P>
862<DD><DL>
863<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#elementSet()">elementSet</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE></DL>
864</DD>
865<DD><DL>
866
867<DT><B>Returns:</B><DD>a view of the set of distinct elements in this multiset</DL>
868</DD>
869</DL>
870<HR>
871
872<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
873equals</H3>
874<PRE>
875public 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>
876                      <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;object)</PRE>
877<DL>
878<DD>Compares the specified object with this multiset for equality. Returns
879 <code>true</code> if the given object is also a multiset and contains equal
880 elements with equal counts, regardless of order.
881
882 <p>This implementation returns <code>true</code> if <code>other</code> is a multiset
883 of the same size and if, for each element, the two multisets have the same
884 count.
885<P>
886<DD><DL>
887<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#equals(java.lang.Object)">equals</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&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>
888</DD>
889<DD><DL>
890</DL>
891</DD>
892</DL>
893<HR>
894
895<A NAME="hashCode()"><!-- --></A><H3>
896hashCode</H3>
897<PRE>
898public int <B>hashCode</B>()</PRE>
899<DL>
900<DD>Returns the hash code for this multiset. This is defined as the sum of
901
902 <pre>  (element == null ? 0 : element.hashCode()) ^ count(element)</pre>
903
904 over all distinct elements in the multiset. It follows that a multiset and
905 its entry set always have the same hash code.
906
907 <p>This implementation returns the hash code of <A HREF="../../../../com/google/common/collect/Multiset.html#entrySet()"><CODE>Multiset.entrySet()</CODE></A>.
908<P>
909<DD><DL>
910<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#hashCode()">hashCode</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;E&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#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>
911</DD>
912<DD><DL>
913</DL>
914</DD>
915</DL>
916<HR>
917
918<A NAME="toString()"><!-- --></A><H3>
919toString</H3>
920<PRE>
921public <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>
922<DL>
923<DD>
924
925 <p>It is recommended, though not mandatory, that this method return the
926 result of invoking <A HREF="../../../../com/google/common/collect/Multiset.html#toString()"><CODE>Multiset.toString()</CODE></A> on the <A HREF="../../../../com/google/common/collect/Multiset.html#entrySet()"><CODE>Multiset.entrySet()</CODE></A>, yielding a
927 result such as
928 <pre>
929     [a x 3, c, d x 2, e]
930 </pre>
931
932 <p>This implementation returns the result of invoking <code>toString</code> on
933 <A HREF="../../../../com/google/common/collect/Multiset.html#entrySet()"><CODE>Multiset.entrySet()</CODE></A>.
934<P>
935<DD><DL>
936<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/Multiset.html#toString()">toString</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect">Multiset</A>&lt;E&gt;</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true#toString()" title="class or interface in java.util">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/AbstractCollection.html?is-external=true" title="class or interface in java.util">AbstractCollection</A>&lt;E&gt;</CODE></DL>
937</DD>
938<DD><DL>
939</DL>
940</DD>
941</DL>
942<!-- ========= END OF CLASS DATA ========= -->
943<HR>
944
945
946<!-- ======= START OF BOTTOM NAVBAR ====== -->
947<A NAME="navbar_bottom"><!-- --></A>
948<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
949<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
950<TR>
951<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
952<A NAME="navbar_bottom_firstrow"><!-- --></A>
953<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
954  <TR ALIGN="center" VALIGN="top">
955  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
956  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
957  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
958  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HashMultiset.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
959  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
960  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
961  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
962  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
963  </TR>
964</TABLE>
965</TD>
966<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
967</EM>
968</TD>
969</TR>
970
971<TR>
972<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
973&nbsp;<A HREF="../../../../com/google/common/collect/HashMultimap.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A>&nbsp;
974&nbsp;<A HREF="../../../../com/google/common/collect/ImmutableBiMap.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD>
975<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
976  <A HREF="../../../../index.html?com/google/common/collect/HashMultiset.html" target="_top"><B>FRAMES</B></A>  &nbsp;
977&nbsp;<A HREF="HashMultiset.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
978&nbsp;<SCRIPT type="text/javascript">
979  <!--
980  if(window==top) {
981    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
982  }
983  //-->
984</SCRIPT>
985<NOSCRIPT>
986  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
987</NOSCRIPT>
988
989
990</FONT></TD>
991</TR>
992<TR>
993<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
994  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
995<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
996DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
997</TR>
998</TABLE>
999<A NAME="skip-navbar_bottom"></A>
1000<!-- ======== END OF BOTTOM NAVBAR ======= -->
1001
1002<HR>
1003
1004</BODY>
1005</HTML>
1006