Remove deprecated getName method
Update licence and javadoc git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131074 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6e9f2b17d2
commit
d10f7f4bb3
|
@ -1,13 +1,10 @@
|
|||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MultiHashMap.java,v 1.9 2002/11/24 20:25:55 scolebourne Exp $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2002/11/24 20:25:55 $
|
||||
*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MultiHashMap.java,v 1.10 2003/05/11 14:00:09 scolebourne Exp $
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
|
||||
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -23,11 +20,11 @@
|
|||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if
|
||||
* any, must include the following acknowlegement:
|
||||
* any, must include the following acknowledgment:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
|
@ -36,7 +33,7 @@
|
|||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache Group.
|
||||
* permission of the Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
|
@ -70,6 +67,7 @@ import java.util.Iterator;
|
|||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <code>MultiHashMap</code> is the default implementation of the
|
||||
* {@link org.apache.commons.collections.MultiMap MultiMap} interface.
|
||||
|
@ -90,7 +88,9 @@ import java.util.Set;
|
|||
* <p>
|
||||
* <code>coll</code> will be a list containing "A", "B", "C".
|
||||
*
|
||||
* @since 2.0
|
||||
* @since Commons Collections 2.0
|
||||
* @version $Revision: 1.10 $ $Date: 2003/05/11 14:00:09 $
|
||||
*
|
||||
* @author Christopher Berry
|
||||
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
|
||||
* @author Steve Downey
|
||||
|
@ -99,9 +99,6 @@ import java.util.Set;
|
|||
* @author Serhiy Yevtushenko
|
||||
*/
|
||||
public class MultiHashMap extends HashMap implements MultiMap {
|
||||
// deprecated name concept
|
||||
private static int sCount = 0;
|
||||
private String mName = null;
|
||||
|
||||
//backed values collection
|
||||
private transient Collection values = null;
|
||||
|
@ -114,7 +111,6 @@ public class MultiHashMap extends HashMap implements MultiMap {
|
|||
*/
|
||||
public MultiHashMap() {
|
||||
super();
|
||||
setName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,7 +120,6 @@ public class MultiHashMap extends HashMap implements MultiMap {
|
|||
*/
|
||||
public MultiHashMap(int initialCapacity) {
|
||||
super(initialCapacity);
|
||||
setName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -135,7 +130,6 @@ public class MultiHashMap extends HashMap implements MultiMap {
|
|||
*/
|
||||
public MultiHashMap(int initialCapacity, float loadFactor) {
|
||||
super(initialCapacity, loadFactor);
|
||||
setName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -174,24 +168,6 @@ public class MultiHashMap extends HashMap implements MultiMap {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a name for the map.
|
||||
*/
|
||||
private void setName() {
|
||||
sCount++;
|
||||
mName = "MultiMap-" + sCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of the map.
|
||||
*
|
||||
* @deprecated no replacement. There is no good reason for a MultiMap to have a name
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return mName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Put a key and value into the map.
|
||||
* <p>
|
||||
|
@ -368,7 +344,6 @@ public class MultiHashMap extends HashMap implements MultiMap {
|
|||
*/
|
||||
public Object clone() {
|
||||
MultiHashMap obj = (MultiHashMap) super.clone();
|
||||
obj.mName = mName;
|
||||
|
||||
// clone each Collection container
|
||||
for (Iterator it = entrySet().iterator(); it.hasNext();) {
|
||||
|
|
Loading…
Reference in New Issue