From d10f7f4bb3b2c783c7421b5dfd64aa2ccf4208a9 Mon Sep 17 00:00:00 2001 From: Stephen Colebourne Date: Sun, 11 May 2003 14:00:09 +0000 Subject: [PATCH] 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 --- .../commons/collections/MultiHashMap.java | 45 +++++-------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/src/java/org/apache/commons/collections/MultiHashMap.java b/src/java/org/apache/commons/collections/MultiHashMap.java index 1a3c82726..b74a1df59 100644 --- a/src/java/org/apache/commons/collections/MultiHashMap.java +++ b/src/java/org/apache/commons/collections/MultiHashMap.java @@ -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; + /** * MultiHashMap is the default implementation of the * {@link org.apache.commons.collections.MultiMap MultiMap} interface. @@ -90,7 +88,9 @@ import java.util.Set; *

* coll 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 James Strachan * @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. *

@@ -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();) {