a whole bunch of stuff
[ephemerata.git] / KezvhLib / lib / org.apache.commons.collections / apidocs / org / apache / commons / collections / MultiHashMap.html
blob3a5acc23f047d8d443e81b710f147162e48490ca
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.5.0_07) on Fri Apr 11 15:39:17 BST 2008 -->
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7 <TITLE>
8 MultiHashMap (Commons Collections 3.2.1 API)
9 </TITLE>
11 <META NAME="keywords" CONTENT="org.apache.commons.collections.MultiHashMap class">
13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
15 <SCRIPT type="text/javascript">
16 function windowTitle()
18 parent.document.title="MultiHashMap (Commons Collections 3.2.1 API)";
20 </SCRIPT>
21 <NOSCRIPT>
22 </NOSCRIPT>
24 </HEAD>
26 <BODY BGCOLOR="white" onload="windowTitle();">
29 <!-- ========= START OF TOP NAVBAR ======= -->
30 <A NAME="navbar_top"><!-- --></A>
31 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
32 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33 <TR>
34 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
35 <A NAME="navbar_top_firstrow"><!-- --></A>
36 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
37 <TR ALIGN="center" VALIGN="top">
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MultiHashMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
46 </TR>
47 </TABLE>
48 </TD>
49 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
50 </EM>
51 </TD>
52 </TR>
54 <TR>
55 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56 &nbsp;<A HREF="../../../../org/apache/commons/collections/MapUtils.html" title="class in org.apache.commons.collections"><B>PREV CLASS</B></A>&nbsp;
57 &nbsp;<A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections"><B>NEXT CLASS</B></A></FONT></TD>
58 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59 <A HREF="../../../../index.html?org/apache/commons/collections/MultiHashMap.html" target="_top"><B>FRAMES</B></A> &nbsp;
60 &nbsp;<A HREF="MultiHashMap.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
61 &nbsp;<SCRIPT type="text/javascript">
62 <!--
63 if(window==top) {
64 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66 //-->
67 </SCRIPT>
68 <NOSCRIPT>
69 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
70 </NOSCRIPT>
73 </FONT></TD>
74 </TR>
75 <TR>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
80 </TR>
81 </TABLE>
82 <A NAME="skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
85 <HR>
86 <!-- ======== START OF CLASS DATA ======== -->
87 <H2>
88 <FONT SIZE="-1">
89 org.apache.commons.collections</FONT>
90 <BR>
91 Class MultiHashMap</H2>
92 <PRE>
93 java.lang.Object
94 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.util.AbstractMap
95 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.util.HashMap
96 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.collections.MultiHashMap</B>
97 </PRE>
98 <DL>
99 <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Cloneable, java.util.Map, <A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections">MultiMap</A></DD>
100 </DL>
101 <HR>
102 <B>Deprecated.</B>&nbsp;<I>Class now available as MultiValueMap in map subpackage.
103 This version is due to be removed in collections v4.0.</I>
105 <DL>
106 <DT><PRE>public class <B>MultiHashMap</B><DT>extends java.util.HashMap<DT>implements <A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections">MultiMap</A></DL>
107 </PRE>
110 <code>MultiHashMap</code> is the default implementation of the
111 <A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections"><CODE>MultiMap</CODE></A> interface.
113 A <code>MultiMap</code> is a Map with slightly different semantics.
114 Putting a value into the map will add the value to a Collection at that key.
115 Getting a value will return a Collection, holding all the values put to that key.
117 This implementation uses an <code>ArrayList</code> as the collection.
118 The internal storage list is made available without cloning via the
119 <code>get(Object)</code> and <code>entrySet()</code> methods.
120 The implementation returns <code>null</code> when there are no values mapped to a key.
122 For example:
123 <pre>
124 MultiMap mhm = new MultiHashMap();
125 mhm.put(key, "A");
126 mhm.put(key, "B");
127 mhm.put(key, "C");
128 List list = (List) mhm.get(key);</pre>
130 <code>list</code> will be a list containing "A", "B", "C".
134 <DL>
135 <DT><B>Since:</B></DT>
136 <DD>Commons Collections 2.0</DD>
137 <DT><B>Version:</B></DT>
138 <DD>$Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $</DD>
139 <DT><B>Author:</B></DT>
140 <DD>Christopher Berry, James Strachan, Steve Downey, Stephen Colebourne, Julien Buret, Serhiy Yevtushenko, Robert Ribnitz</DD>
141 <DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.apache.commons.collections.MultiHashMap">Serialized Form</A></DL>
142 <HR>
145 <!-- ======== NESTED CLASS SUMMARY ======== -->
147 <A NAME="nested_class_summary"><!-- --></A>
148 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
149 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
150 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
151 <B>Nested Class Summary</B></FONT></TH>
152 </TR>
153 </TABLE>
154 &nbsp;<A NAME="nested_classes_inherited_from_class_java.util.Map"><!-- --></A>
155 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
157 <TH ALIGN="left"><B>Nested classes/interfaces inherited from interface java.util.Map</B></TH>
158 </TR>
159 <TR BGCOLOR="white" CLASS="TableRowColor">
160 <TD><CODE>java.util.Map.Entry</CODE></TD>
161 </TR>
162 </TABLE>
163 &nbsp;
165 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
167 <A NAME="constructor_summary"><!-- --></A>
168 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
169 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
170 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
171 <B>Constructor Summary</B></FONT></TH>
172 </TR>
173 <TR BGCOLOR="white" CLASS="TableRowColor">
174 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#MultiHashMap()">MultiHashMap</A></B>()</CODE>
176 <BR>
177 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructor.</TD>
178 </TR>
179 <TR BGCOLOR="white" CLASS="TableRowColor">
180 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#MultiHashMap(int)">MultiHashMap</A></B>(int&nbsp;initialCapacity)</CODE>
182 <BR>
183 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructor.</TD>
184 </TR>
185 <TR BGCOLOR="white" CLASS="TableRowColor">
186 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#MultiHashMap(int, float)">MultiHashMap</A></B>(int&nbsp;initialCapacity,
187 float&nbsp;loadFactor)</CODE>
189 <BR>
190 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructor.</TD>
191 </TR>
192 <TR BGCOLOR="white" CLASS="TableRowColor">
193 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#MultiHashMap(java.util.Map)">MultiHashMap</A></B>(java.util.Map&nbsp;mapToCopy)</CODE>
195 <BR>
196 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructor that copies the input map creating an independent copy.</TD>
197 </TR>
198 </TABLE>
199 &nbsp;
200 <!-- ========== METHOD SUMMARY =========== -->
202 <A NAME="method_summary"><!-- --></A>
203 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
204 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
205 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
206 <B>Method Summary</B></FONT></TH>
207 </TR>
208 <TR BGCOLOR="white" CLASS="TableRowColor">
209 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
210 <CODE>&nbsp;void</CODE></FONT></TD>
211 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#clear()">clear</A></B>()</CODE>
213 <BR>
214 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Clear the map.</TD>
215 </TR>
216 <TR BGCOLOR="white" CLASS="TableRowColor">
217 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
218 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
219 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#clone()">clone</A></B>()</CODE>
221 <BR>
222 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Clones the map creating an independent copy.</TD>
223 </TR>
224 <TR BGCOLOR="white" CLASS="TableRowColor">
225 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
226 <CODE>&nbsp;boolean</CODE></FONT></TD>
227 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#containsValue(java.lang.Object)">containsValue</A></B>(java.lang.Object&nbsp;value)</CODE>
229 <BR>
230 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Checks whether the map contains the value specified.</TD>
231 </TR>
232 <TR BGCOLOR="white" CLASS="TableRowColor">
233 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
234 <CODE>&nbsp;boolean</CODE></FONT></TD>
235 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#containsValue(java.lang.Object, java.lang.Object)">containsValue</A></B>(java.lang.Object&nbsp;key,
236 java.lang.Object&nbsp;value)</CODE>
238 <BR>
239 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Checks whether the collection at the specified key contains the value.</TD>
240 </TR>
241 <TR BGCOLOR="white" CLASS="TableRowColor">
242 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
243 <CODE>protected &nbsp;java.util.Collection</CODE></FONT></TD>
244 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#createCollection(java.util.Collection)">createCollection</A></B>(java.util.Collection&nbsp;coll)</CODE>
246 <BR>
247 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Creates a new instance of the map value Collection container.</TD>
248 </TR>
249 <TR BGCOLOR="white" CLASS="TableRowColor">
250 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
251 <CODE>&nbsp;java.util.Collection</CODE></FONT></TD>
252 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#getCollection(java.lang.Object)">getCollection</A></B>(java.lang.Object&nbsp;key)</CODE>
254 <BR>
255 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Gets the collection mapped to the specified key.</TD>
256 </TR>
257 <TR BGCOLOR="white" CLASS="TableRowColor">
258 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
259 <CODE>&nbsp;java.util.Iterator</CODE></FONT></TD>
260 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#iterator(java.lang.Object)">iterator</A></B>(java.lang.Object&nbsp;key)</CODE>
262 <BR>
263 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Gets an iterator for the collection mapped to the specified key.</TD>
264 </TR>
265 <TR BGCOLOR="white" CLASS="TableRowColor">
266 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
267 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
268 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#put(java.lang.Object, java.lang.Object)">put</A></B>(java.lang.Object&nbsp;key,
269 java.lang.Object&nbsp;value)</CODE>
271 <BR>
272 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Adds the value to the collection associated with the specified key.</TD>
273 </TR>
274 <TR BGCOLOR="white" CLASS="TableRowColor">
275 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
276 <CODE>&nbsp;void</CODE></FONT></TD>
277 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#putAll(java.util.Map)">putAll</A></B>(java.util.Map&nbsp;map)</CODE>
279 <BR>
280 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Override superclass to ensure that MultiMap instances are
281 correctly handled.</TD>
282 </TR>
283 <TR BGCOLOR="white" CLASS="TableRowColor">
284 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
285 <CODE>&nbsp;boolean</CODE></FONT></TD>
286 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#putAll(java.lang.Object, java.util.Collection)">putAll</A></B>(java.lang.Object&nbsp;key,
287 java.util.Collection&nbsp;values)</CODE>
289 <BR>
290 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Adds a collection of values to the collection associated with the specified key.</TD>
291 </TR>
292 <TR BGCOLOR="white" CLASS="TableRowColor">
293 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
294 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
295 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#remove(java.lang.Object, java.lang.Object)">remove</A></B>(java.lang.Object&nbsp;key,
296 java.lang.Object&nbsp;item)</CODE>
298 <BR>
299 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Removes a specific value from map.</TD>
300 </TR>
301 <TR BGCOLOR="white" CLASS="TableRowColor">
302 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
303 <CODE>&nbsp;int</CODE></FONT></TD>
304 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#size(java.lang.Object)">size</A></B>(java.lang.Object&nbsp;key)</CODE>
306 <BR>
307 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Gets the size of the collection mapped to the specified key.</TD>
308 </TR>
309 <TR BGCOLOR="white" CLASS="TableRowColor">
310 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
311 <CODE>&nbsp;int</CODE></FONT></TD>
312 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#totalSize()">totalSize</A></B>()</CODE>
314 <BR>
315 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Gets the total size of the map by counting all the values.</TD>
316 </TR>
317 <TR BGCOLOR="white" CLASS="TableRowColor">
318 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
319 <CODE>&nbsp;java.util.Collection</CODE></FONT></TD>
320 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/MultiHashMap.html#values()">values</A></B>()</CODE>
322 <BR>
323 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Gets a collection containing all the values in the map.</TD>
324 </TR>
325 </TABLE>
326 &nbsp;<A NAME="methods_inherited_from_class_java.util.HashMap"><!-- --></A>
327 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
328 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
329 <TH ALIGN="left"><B>Methods inherited from class java.util.HashMap</B></TH>
330 </TR>
331 <TR BGCOLOR="white" CLASS="TableRowColor">
332 <TD><CODE>containsKey, entrySet, get, isEmpty, keySet, remove, size</CODE></TD>
333 </TR>
334 </TABLE>
335 &nbsp;<A NAME="methods_inherited_from_class_java.util.AbstractMap"><!-- --></A>
336 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
337 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
338 <TH ALIGN="left"><B>Methods inherited from class java.util.AbstractMap</B></TH>
339 </TR>
340 <TR BGCOLOR="white" CLASS="TableRowColor">
341 <TD><CODE>equals, hashCode, toString</CODE></TD>
342 </TR>
343 </TABLE>
344 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
345 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
346 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
347 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
348 </TR>
349 <TR BGCOLOR="white" CLASS="TableRowColor">
350 <TD><CODE>finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
351 </TR>
352 </TABLE>
353 &nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.collections.MultiMap"><!-- --></A>
354 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
355 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
356 <TH ALIGN="left"><B>Methods inherited from interface org.apache.commons.collections.<A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections">MultiMap</A></B></TH>
357 </TR>
358 <TR BGCOLOR="white" CLASS="TableRowColor">
359 <TD><CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html#get(java.lang.Object)">get</A>, <A HREF="../../../../org/apache/commons/collections/MultiMap.html#remove(java.lang.Object)">remove</A>, <A HREF="../../../../org/apache/commons/collections/MultiMap.html#size()">size</A></CODE></TD>
360 </TR>
361 </TABLE>
362 &nbsp;<A NAME="methods_inherited_from_class_java.util.Map"><!-- --></A>
363 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
364 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
365 <TH ALIGN="left"><B>Methods inherited from interface java.util.Map</B></TH>
366 </TR>
367 <TR BGCOLOR="white" CLASS="TableRowColor">
368 <TD><CODE>containsKey, entrySet, equals, hashCode, isEmpty, keySet</CODE></TD>
369 </TR>
370 </TABLE>
371 &nbsp;
374 <!-- ========= CONSTRUCTOR DETAIL ======== -->
376 <A NAME="constructor_detail"><!-- --></A>
377 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
378 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
379 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
380 <B>Constructor Detail</B></FONT></TH>
381 </TR>
382 </TABLE>
384 <A NAME="MultiHashMap()"><!-- --></A><H3>
385 MultiHashMap</H3>
386 <PRE>
387 public <B>MultiHashMap</B>()</PRE>
388 <DL>
389 <DD><B>Deprecated.</B>&nbsp;<DD>Constructor.
391 </DL>
392 <HR>
394 <A NAME="MultiHashMap(int)"><!-- --></A><H3>
395 MultiHashMap</H3>
396 <PRE>
397 public <B>MultiHashMap</B>(int&nbsp;initialCapacity)</PRE>
398 <DL>
399 <DD><B>Deprecated.</B>&nbsp;<DD>Constructor.
401 <DL>
402 <DT><B>Parameters:</B><DD><CODE>initialCapacity</CODE> - the initial map capacity</DL>
403 </DL>
404 <HR>
406 <A NAME="MultiHashMap(int, float)"><!-- --></A><H3>
407 MultiHashMap</H3>
408 <PRE>
409 public <B>MultiHashMap</B>(int&nbsp;initialCapacity,
410 float&nbsp;loadFactor)</PRE>
411 <DL>
412 <DD><B>Deprecated.</B>&nbsp;<DD>Constructor.
414 <DL>
415 <DT><B>Parameters:</B><DD><CODE>initialCapacity</CODE> - the initial map capacity<DD><CODE>loadFactor</CODE> - the amount 0.0-1.0 at which to resize the map</DL>
416 </DL>
417 <HR>
419 <A NAME="MultiHashMap(java.util.Map)"><!-- --></A><H3>
420 MultiHashMap</H3>
421 <PRE>
422 public <B>MultiHashMap</B>(java.util.Map&nbsp;mapToCopy)</PRE>
423 <DL>
424 <DD><B>Deprecated.</B>&nbsp;<DD>Constructor that copies the input map creating an independent copy.
426 This method performs different behaviour depending on whether the map
427 specified is a MultiMap or not. If a MultiMap is specified, each internal
428 collection is also cloned. If the specified map only implements Map, then
429 the values are not cloned.
431 NOTE: From Commons Collections 3.1 this method correctly copies a MultiMap
432 to form a truly independent new map.
433 NOTE: From Commons Collections 3.2 this method delegates to the newly
434 added putAll(Map) override method.
436 <DL>
437 <DT><B>Parameters:</B><DD><CODE>mapToCopy</CODE> - a Map to copy</DL>
438 </DL>
440 <!-- ============ METHOD DETAIL ========== -->
442 <A NAME="method_detail"><!-- --></A>
443 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
444 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
445 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
446 <B>Method Detail</B></FONT></TH>
447 </TR>
448 </TABLE>
450 <A NAME="totalSize()"><!-- --></A><H3>
451 totalSize</H3>
452 <PRE>
453 public int <B>totalSize</B>()</PRE>
454 <DL>
455 <DD><B>Deprecated.</B>&nbsp;<DD>Gets the total size of the map by counting all the values.
457 <DD><DL>
458 </DL>
459 </DD>
460 <DD><DL>
462 <DT><B>Returns:</B><DD>the total size of the map counting all values<DT><B>Since:</B></DT>
463 <DD>Commons Collections 3.1</DD>
464 </DL>
465 </DD>
466 </DL>
467 <HR>
469 <A NAME="getCollection(java.lang.Object)"><!-- --></A><H3>
470 getCollection</H3>
471 <PRE>
472 public java.util.Collection <B>getCollection</B>(java.lang.Object&nbsp;key)</PRE>
473 <DL>
474 <DD><B>Deprecated.</B>&nbsp;<DD>Gets the collection mapped to the specified key.
475 This method is a convenience method to typecast the result of <code>get(key)</code>.
477 <DD><DL>
478 </DL>
479 </DD>
480 <DD><DL>
481 <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to retrieve
482 <DT><B>Returns:</B><DD>the collection mapped to the key, null if no mapping<DT><B>Since:</B></DT>
483 <DD>Commons Collections 3.1</DD>
484 </DL>
485 </DD>
486 </DL>
487 <HR>
489 <A NAME="size(java.lang.Object)"><!-- --></A><H3>
490 size</H3>
491 <PRE>
492 public int <B>size</B>(java.lang.Object&nbsp;key)</PRE>
493 <DL>
494 <DD><B>Deprecated.</B>&nbsp;<DD>Gets the size of the collection mapped to the specified key.
496 <DD><DL>
497 </DL>
498 </DD>
499 <DD><DL>
500 <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to get size for
501 <DT><B>Returns:</B><DD>the size of the collection at the key, zero if key not in map<DT><B>Since:</B></DT>
502 <DD>Commons Collections 3.1</DD>
503 </DL>
504 </DD>
505 </DL>
506 <HR>
508 <A NAME="iterator(java.lang.Object)"><!-- --></A><H3>
509 iterator</H3>
510 <PRE>
511 public java.util.Iterator <B>iterator</B>(java.lang.Object&nbsp;key)</PRE>
512 <DL>
513 <DD><B>Deprecated.</B>&nbsp;<DD>Gets an iterator for the collection mapped to the specified key.
515 <DD><DL>
516 </DL>
517 </DD>
518 <DD><DL>
519 <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to get an iterator for
520 <DT><B>Returns:</B><DD>the iterator of the collection at the key, empty iterator if key not in map<DT><B>Since:</B></DT>
521 <DD>Commons Collections 3.1</DD>
522 </DL>
523 </DD>
524 </DL>
525 <HR>
527 <A NAME="put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
528 put</H3>
529 <PRE>
530 public java.lang.Object <B>put</B>(java.lang.Object&nbsp;key,
531 java.lang.Object&nbsp;value)</PRE>
532 <DL>
533 <DD><B>Deprecated.</B>&nbsp;<DD>Adds the value to the collection associated with the specified key.
535 Unlike a normal <code>Map</code> the previous value is not replaced.
536 Instead the new value is added to the collection stored against the key.
538 <DD><DL>
539 <DT><B>Specified by:</B><DD><CODE>put</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html#put(java.lang.Object, java.lang.Object)">put</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections">MultiMap</A></CODE><DT><B>Overrides:</B><DD><CODE>put</CODE> in class <CODE>java.util.HashMap</CODE></DL>
540 </DD>
541 <DD><DL>
542 <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to store against<DD><CODE>value</CODE> - the value to add to the collection at the key
543 <DT><B>Returns:</B><DD>the value added if the map changed and null if the map did not change</DL>
544 </DD>
545 </DL>
546 <HR>
548 <A NAME="putAll(java.util.Map)"><!-- --></A><H3>
549 putAll</H3>
550 <PRE>
551 public void <B>putAll</B>(java.util.Map&nbsp;map)</PRE>
552 <DL>
553 <DD><B>Deprecated.</B>&nbsp;<DD>Override superclass to ensure that MultiMap instances are
554 correctly handled.
556 NOTE: Prior to version 3.2, putAll(map) did not work properly
557 when passed a MultiMap.
559 <DD><DL>
560 <DT><B>Specified by:</B><DD><CODE>putAll</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Overrides:</B><DD><CODE>putAll</CODE> in class <CODE>java.util.HashMap</CODE></DL>
561 </DD>
562 <DD><DL>
563 <DT><B>Parameters:</B><DD><CODE>map</CODE> - the map to copy (either a normal or multi map)</DL>
564 </DD>
565 </DL>
566 <HR>
568 <A NAME="putAll(java.lang.Object, java.util.Collection)"><!-- --></A><H3>
569 putAll</H3>
570 <PRE>
571 public boolean <B>putAll</B>(java.lang.Object&nbsp;key,
572 java.util.Collection&nbsp;values)</PRE>
573 <DL>
574 <DD><B>Deprecated.</B>&nbsp;<DD>Adds a collection of values to the collection associated with the specified key.
576 <DD><DL>
577 </DL>
578 </DD>
579 <DD><DL>
580 <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to store against<DD><CODE>values</CODE> - the values to add to the collection at the key, null ignored
581 <DT><B>Returns:</B><DD>true if this map changed<DT><B>Since:</B></DT>
582 <DD>Commons Collections 3.1</DD>
583 </DL>
584 </DD>
585 </DL>
586 <HR>
588 <A NAME="containsValue(java.lang.Object)"><!-- --></A><H3>
589 containsValue</H3>
590 <PRE>
591 public boolean <B>containsValue</B>(java.lang.Object&nbsp;value)</PRE>
592 <DL>
593 <DD><B>Deprecated.</B>&nbsp;<DD>Checks whether the map contains the value specified.
595 This checks all collections against all keys for the value, and thus could be slow.
597 <DD><DL>
598 <DT><B>Specified by:</B><DD><CODE>containsValue</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html#containsValue(java.lang.Object)">containsValue</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections">MultiMap</A></CODE><DT><B>Overrides:</B><DD><CODE>containsValue</CODE> in class <CODE>java.util.HashMap</CODE></DL>
599 </DD>
600 <DD><DL>
601 <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to search for
602 <DT><B>Returns:</B><DD>true if the map contains the value</DL>
603 </DD>
604 </DL>
605 <HR>
607 <A NAME="containsValue(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
608 containsValue</H3>
609 <PRE>
610 public boolean <B>containsValue</B>(java.lang.Object&nbsp;key,
611 java.lang.Object&nbsp;value)</PRE>
612 <DL>
613 <DD><B>Deprecated.</B>&nbsp;<DD>Checks whether the collection at the specified key contains the value.
615 <DD><DL>
616 </DL>
617 </DD>
618 <DD><DL>
619 <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to search for
620 <DT><B>Returns:</B><DD>true if the map contains the value<DT><B>Since:</B></DT>
621 <DD>Commons Collections 3.1</DD>
622 </DL>
623 </DD>
624 </DL>
625 <HR>
627 <A NAME="remove(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
628 remove</H3>
629 <PRE>
630 public java.lang.Object <B>remove</B>(java.lang.Object&nbsp;key,
631 java.lang.Object&nbsp;item)</PRE>
632 <DL>
633 <DD><B>Deprecated.</B>&nbsp;<DD>Removes a specific value from map.
635 The item is removed from the collection mapped to the specified key.
636 Other values attached to that key are unaffected.
638 If the last value for a key is removed, <code>null</code> will be returned
639 from a subsequant <code>get(key)</code>.
641 <DD><DL>
642 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html#remove(java.lang.Object, java.lang.Object)">remove</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections">MultiMap</A></CODE></DL>
643 </DD>
644 <DD><DL>
645 <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to remove from<DD><CODE>item</CODE> - the value to remove
646 <DT><B>Returns:</B><DD>the value removed (which was passed in), null if nothing removed</DL>
647 </DD>
648 </DL>
649 <HR>
651 <A NAME="clear()"><!-- --></A><H3>
652 clear</H3>
653 <PRE>
654 public void <B>clear</B>()</PRE>
655 <DL>
656 <DD><B>Deprecated.</B>&nbsp;<DD>Clear the map.
658 This clears each collection in the map, and so may be slow.
660 <DD><DL>
661 <DT><B>Specified by:</B><DD><CODE>clear</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Overrides:</B><DD><CODE>clear</CODE> in class <CODE>java.util.HashMap</CODE></DL>
662 </DD>
663 <DD><DL>
664 </DL>
665 </DD>
666 </DL>
667 <HR>
669 <A NAME="values()"><!-- --></A><H3>
670 values</H3>
671 <PRE>
672 public java.util.Collection <B>values</B>()</PRE>
673 <DL>
674 <DD><B>Deprecated.</B>&nbsp;<DD>Gets a collection containing all the values in the map.
676 This returns a collection containing the combination of values from all keys.
678 <DD><DL>
679 <DT><B>Specified by:</B><DD><CODE>values</CODE> in interface <CODE>java.util.Map</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html#values()">values</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections">MultiMap</A></CODE><DT><B>Overrides:</B><DD><CODE>values</CODE> in class <CODE>java.util.HashMap</CODE></DL>
680 </DD>
681 <DD><DL>
683 <DT><B>Returns:</B><DD>a collection view of the values contained in this map</DL>
684 </DD>
685 </DL>
686 <HR>
688 <A NAME="clone()"><!-- --></A><H3>
689 clone</H3>
690 <PRE>
691 public java.lang.Object <B>clone</B>()</PRE>
692 <DL>
693 <DD><B>Deprecated.</B>&nbsp;<DD>Clones the map creating an independent copy.
695 The clone will shallow clone the collections as well as the map.
697 <DD><DL>
698 <DT><B>Overrides:</B><DD><CODE>clone</CODE> in class <CODE>java.util.HashMap</CODE></DL>
699 </DD>
700 <DD><DL>
702 <DT><B>Returns:</B><DD>the cloned map</DL>
703 </DD>
704 </DL>
705 <HR>
707 <A NAME="createCollection(java.util.Collection)"><!-- --></A><H3>
708 createCollection</H3>
709 <PRE>
710 protected java.util.Collection <B>createCollection</B>(java.util.Collection&nbsp;coll)</PRE>
711 <DL>
712 <DD><B>Deprecated.</B>&nbsp;<DD>Creates a new instance of the map value Collection container.
714 This method can be overridden to use your own collection type.
716 <DD><DL>
717 </DL>
718 </DD>
719 <DD><DL>
720 <DT><B>Parameters:</B><DD><CODE>coll</CODE> - the collection to copy, may be null
721 <DT><B>Returns:</B><DD>the new collection</DL>
722 </DD>
723 </DL>
724 <!-- ========= END OF CLASS DATA ========= -->
725 <HR>
728 <!-- ======= START OF BOTTOM NAVBAR ====== -->
729 <A NAME="navbar_bottom"><!-- --></A>
730 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
731 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
732 <TR>
733 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
734 <A NAME="navbar_bottom_firstrow"><!-- --></A>
735 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
736 <TR ALIGN="center" VALIGN="top">
737 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
738 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
739 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
740 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MultiHashMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
741 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
742 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
743 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
744 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
745 </TR>
746 </TABLE>
747 </TD>
748 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
749 </EM>
750 </TD>
751 </TR>
753 <TR>
754 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
755 &nbsp;<A HREF="../../../../org/apache/commons/collections/MapUtils.html" title="class in org.apache.commons.collections"><B>PREV CLASS</B></A>&nbsp;
756 &nbsp;<A HREF="../../../../org/apache/commons/collections/MultiMap.html" title="interface in org.apache.commons.collections"><B>NEXT CLASS</B></A></FONT></TD>
757 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
758 <A HREF="../../../../index.html?org/apache/commons/collections/MultiHashMap.html" target="_top"><B>FRAMES</B></A> &nbsp;
759 &nbsp;<A HREF="MultiHashMap.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
760 &nbsp;<SCRIPT type="text/javascript">
761 <!--
762 if(window==top) {
763 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
765 //-->
766 </SCRIPT>
767 <NOSCRIPT>
768 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
769 </NOSCRIPT>
772 </FONT></TD>
773 </TR>
774 <TR>
775 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
776 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
777 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
778 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
779 </TR>
780 </TABLE>
781 <A NAME="skip-navbar_bottom"></A>
782 <!-- ======== END OF BOTTOM NAVBAR ======= -->
784 <HR>
785 Copyright © 2001-2008 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
786 </BODY>
787 </HTML>