--- jsr166/src/main/java/util/AbstractMap.java 2005/12/05 02:56:59 1.19 +++ jsr166/src/main/java/util/AbstractMap.java 2007/09/11 15:13:59 1.25 @@ -1,12 +1,29 @@ /* - * %W% %E% + * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. */ package java.util; -import java.util.*; // for javadoc (till 6280605 is fixed) import java.util.Map.Entry; /** @@ -30,12 +47,12 @@ import java.util.Map.Entry; * constructor, as per the recommendation in the Map interface * specification. * - *

The documentation for each non-abstract methods in this class describes its + *

The documentation for each non-abstract method in this class describes its * implementation in detail. Each of these methods may be overridden if the * map being implemented admits a more efficient implementation. * *

This class is a member of the - * + * * Java Collections Framework. * * @param the type of keys maintained by this map @@ -323,6 +340,14 @@ public abstract class AbstractMap i return AbstractMap.this.size(); } + public boolean isEmpty() { + return AbstractMap.this.isEmpty(); + } + + public void clear() { + AbstractMap.this.clear(); + } + public boolean contains(Object k) { return AbstractMap.this.containsKey(k); } @@ -371,6 +396,14 @@ public abstract class AbstractMap i return AbstractMap.this.size(); } + public boolean isEmpty() { + return AbstractMap.this.isEmpty(); + } + + public void clear() { + AbstractMap.this.clear(); + } + public boolean contains(Object v) { return AbstractMap.this.containsValue(v); }