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