Removed unused variable (patch from Steve Downey)
Added class level javadoc git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130815 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3f22cc8398
commit
f93b13144b
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MultiHashMap.java,v 1.4 2002/06/12 03:59:15 mas Exp $
|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MultiHashMap.java,v 1.5 2002/10/12 22:04:59 scolebourne Exp $
|
||||||
* $Revision: 1.4 $
|
* $Revision: 1.5 $
|
||||||
* $Date: 2002/06/12 03:59:15 $
|
* $Date: 2002/10/12 22:04:59 $
|
||||||
*
|
*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*
|
*
|
||||||
|
@ -62,13 +62,20 @@ package org.apache.commons.collections;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
/**
|
||||||
/** see MultiMap for details of an important semantic difference
|
* <code>MultiHashMap</code> is the default implementation of the
|
||||||
* between this and a typical HashMap
|
* {@link MultiMap} interface. A <code>MultiMap</code> is a Map
|
||||||
|
* with slightly different semantics.
|
||||||
|
* Instead of returning an Object, it returns a Collection.
|
||||||
|
* So for example, you can put( key, new Integer(1) );
|
||||||
|
* and then a Object get( key ); will return you a Collection
|
||||||
|
* instead of an Integer.
|
||||||
*
|
*
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @author Christopher Berry
|
* @author Christopher Berry
|
||||||
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
|
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
|
||||||
|
* @author Steve Downey
|
||||||
|
* @author Stephen Colebourne
|
||||||
*/
|
*/
|
||||||
public class MultiHashMap extends HashMap implements MultiMap
|
public class MultiHashMap extends HashMap implements MultiMap
|
||||||
{
|
{
|
||||||
|
@ -186,8 +193,8 @@ public class MultiHashMap extends HashMap implements MultiMap
|
||||||
ArrayList list = (ArrayList)(keyValuePair.getValue());
|
ArrayList list = (ArrayList)(keyValuePair.getValue());
|
||||||
|
|
||||||
Object[] values = list.toArray();
|
Object[] values = list.toArray();
|
||||||
for( int ii=0; ii < values.length; ii++ ) {
|
for ( int ii=0; ii < values.length; ii++ ) {
|
||||||
boolean successfulAdd = returnList.add( values[ii] );
|
returnList.add( values[ii] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return returnList;
|
return returnList;
|
||||||
|
|
Loading…
Reference in New Issue