You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rw...@apache.org on 2003/01/14 00:54:39 UTC
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections DefaultMapBag.java HashBag.java LRUMap.java TreeBag.java
rwaldhoff 2003/01/13 15:54:39
Modified: collections build.xml
collections/src/java/org/apache/commons/collections
DefaultMapBag.java HashBag.java LRUMap.java
TreeBag.java
Log:
* only javadoc public members
* fix resulting javadoc warnings
* add one-arg (Map) constructor to DefaultMapBag, use it in HashBag and TreeBag
* fix license typos in touched files
Revision Changes Path
1.38 +2 -2 jakarta-commons/collections/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/build.xml,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- build.xml 7 Jan 2003 00:08:38 -0000 1.37
+++ build.xml 13 Jan 2003 23:54:38 -0000 1.38
@@ -180,7 +180,7 @@
windowtitle="${Name-Long}"
doctitle="${Name-Long}"
bottom="<small>Copyright &copy; 2001-${year} Apache Software Foundation. Documenation generated ${TODAY}</small>."
- protected="true"
+ public="true"
version="true"
author="true"
overview="${source.src.java}/org/apache/commons/collections/package.html"
1.7 +20 -14 jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapBag.java
Index: DefaultMapBag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapBag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultMapBag.java 12 Oct 2002 22:15:19 -0000 1.6
+++ DefaultMapBag.java 13 Jan 2003 23:54:38 -0000 1.7
@@ -1,13 +1,9 @@
/*
* $Header$
- * $Revision$
- * $Date$
- *
* ====================================================================
- *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,11 +19,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 +32,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
@@ -71,16 +67,18 @@
import java.util.Set;
/**
- * This class provides a skeletal implementation of the {@link Bag}
+ * A skeletal implementation of the {@link Bag}
* interface to minimize the effort required for target implementations.
- * Subclasses need only to call {@link #setMap(Map)} in their constructor
+ * Subclasses need only to call <code>setMap(Map)</code> in their constructor
+ * (or invoke the {@link #DefaultMapBag(java.util.Map) Map-constructor})
* specifying a map instance that will be used to store the contents of
* the bag.<P>
*
* The map will be used to map bag elements to a number; the number represents
* the number of occurrences of that element in the bag.<P>
*
- * @since 2.0
+ * @since Commons Collections 2.0
+ * @version $Revision$ $Date$
* @author Chuck Burdick
* @author <a href="mailto:mas@apache.org">Michael A. Smith</a>
**/
@@ -91,10 +89,18 @@
/**
- * Constructor. Subclasses should invoke {@link #setMap(Map)} in
+ * No-argument constructor.
+ * Subclasses should invoke <code>setMap(Map)</code> in
* their constructors.
*/
public DefaultMapBag() {
+ }
+
+ /**
+ * @since Commons Collections 2.2
+ */
+ public DefaultMapBag(Map map) {
+ setMap(map);
}
/**
1.7 +13 -17 jakarta-commons/collections/src/java/org/apache/commons/collections/HashBag.java
Index: HashBag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/HashBag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HashBag.java 15 Aug 2002 20:04:31 -0000 1.6
+++ HashBag.java 13 Jan 2003 23:54:38 -0000 1.7
@@ -1,13 +1,9 @@
/*
* $Header$
- * $Revision$
- * $Date$
- *
* ====================================================================
- *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,11 +19,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 +32,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
@@ -65,26 +61,26 @@
import java.util.HashMap;
/**
- * An implementation of {@link Bag} that is backed by a {@link
- * HashMap}.
+ * A {@link Bag} that is backed by a {@link HashMap}.
*
- * @since 2.0
+ * @since Commons Collections 2.0
+ * @version $Revision$ $Date$
* @author Chuck Burdick
**/
public class HashBag extends DefaultMapBag implements Bag {
/**
- * Constructs a new empty <Code>HashBag</Code>.
+ * Constructs an empty <Code>HashBag</Code>.
*/
public HashBag() {
- setMap(new HashMap());
+ super(new HashMap());
}
/**
- * New {@link Bag} containing all the members of the given
+ * Constructs a {@link Bag} containing all the members of the given
* collection.
* @see #addAll
- **/
+ */
public HashBag(Collection c) {
this();
addAll(c);
1.18 +8 -12 jakarta-commons/collections/src/java/org/apache/commons/collections/LRUMap.java
Index: LRUMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/LRUMap.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- LRUMap.java 12 Oct 2002 22:15:19 -0000 1.17
+++ LRUMap.java 13 Jan 2003 23:54:38 -0000 1.18
@@ -1,13 +1,9 @@
/*
* $Header$
- * $Revision$
- * $Date$
- *
* ====================================================================
- *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,11 +19,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 +32,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
@@ -87,7 +83,8 @@
* key is now equivalent to LRUMap.getFirst().
* </p>
*
- * @since 1.0
+ * @since Commons Collections 1.0
+ * @version $Revision$ $Date$
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
* @author <a href="mailto:morgand@apache.org">Morgan Delagrange</a>
*/
@@ -148,7 +145,6 @@
* @param key Key of the Object to add.
* @param value Object to add
* @return Former value of the key
- * @see #removeLRU
*/
public Object put( Object key, Object value ) {
1.7 +16 -20 jakarta-commons/collections/src/java/org/apache/commons/collections/TreeBag.java
Index: TreeBag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/TreeBag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TreeBag.java 15 Aug 2002 20:04:31 -0000 1.6
+++ TreeBag.java 13 Jan 2003 23:54:38 -0000 1.7
@@ -1,13 +1,9 @@
/*
* $Header$
- * $Revision$
- * $Date$
- *
* ====================================================================
- *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,11 +19,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 +32,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
@@ -67,33 +63,33 @@
import java.util.TreeMap;
/**
- * An implementation of {@link Bag} that is backed by a {@link
- * TreeMap}. Order will be maintained among the unique representative
+ * A {@link Bag} that is backed by a {@link TreeMap}.
+ * Order will be maintained among the unique representative
* members.
*
- * @since 2.0
+ * @since Commons Collections 2.0
+ * @version $Revision$ $Date$
* @author Chuck Burdick
**/
public class TreeBag extends DefaultMapBag implements SortedBag, Bag {
/**
- * Constructs a new empty <Code>TreeBag</Code>.
+ * Constructs an empty <Code>TreeBag</Code>.
*/
public TreeBag() {
- setMap(new TreeMap());
+ super(new TreeMap());
}
/**
- * New {@link Bag} that maintains order on its unique
- * representative members according to the given {@link
- * Comparator}.
+ * Constructs an empty {@link Bag} that maintains order on its unique
+ * representative members according to the given {@link Comparator}.
**/
public TreeBag(Comparator c) {
- setMap(new TreeMap(c));
+ super(new TreeMap(c));
}
/**
- * New {@link Bag} containing all the members of the given
+ * Constructs a {@link Bag} containing all the members of the given
* collection.
* @see #addAll
**/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>