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