From 008dc5f8dace7f6df92dc9e6405d3aee54dd99e8 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 13 Mar 2002 06:00:20 +0000 Subject: [PATCH] Remove incorrect comment about using hashCode to determine whether objects in the bag are equal. Fix numerous javadoc cross reference problems. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130642 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/collections/Bag.java | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/java/org/apache/commons/collections/Bag.java b/src/java/org/apache/commons/collections/Bag.java index e2015b41f..2f3fc7706 100644 --- a/src/java/org/apache/commons/collections/Bag.java +++ b/src/java/org/apache/commons/collections/Bag.java @@ -1,7 +1,7 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Bag.java,v 1.4 2002/03/13 05:40:30 mas Exp $ - * $Revision: 1.4 $ - * $Date: 2002/03/13 05:40:30 $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Bag.java,v 1.5 2002/03/13 06:00:20 mas Exp $ + * $Revision: 1.5 $ + * $Date: 2002/03/13 06:00:20 $ * * ==================================================================== * @@ -66,11 +66,10 @@ import java.util.Iterator; import java.util.Set; /** - * A {@link Collection} that keeps a count of its members of the same - * type, using hashCode to check for equality. Suppose - * you have a Bag that contains {a, a, b, c}. Calling - * {@link #getCount} on a would return 2, while calling - * {@link #uniqueSet} would return {a, b, c}. + * A {@link Collection} that counts the number of times an object appears in + * the collection. Suppose you have a Bag that contains {a, a, b, + * c}. Calling {@link #getCount(Object)} on a would return + * 2, while calling {@link #uniqueSet()} would return {a, b, c}. * * @author Chuck Burdick **/ @@ -84,12 +83,12 @@ public interface Bag extends Collection { /** * Add the given object to the bag and keep a count. If the object - * is already in the {@link #uniqueSet} then increment its count as - * reported by {@link #getCount}. Otherwise add it to the {@link - * #uniqueSet} and report its count as 1. + * is already in the {@link #uniqueSet()} then increment its count as + * reported by {@link #getCount(Object)}. Otherwise add it to the {@link + * #uniqueSet()} and report its count as 1. * @return true if the object was not already in the * uniqueSet - * @see #getCount + * @see #getCount(Object) **/ public boolean add(Object o); @@ -99,13 +98,13 @@ public interface Bag extends Collection { * @return true if the object was not already in the * uniqueSet * @see #add(Object) - * @see #getCount + * @see #getCount(Object) **/ public boolean add(Object o, int i); /** * Remove all occurrences of the given object from the bag, and do - * not represent the object in the {@link #uniqueSet}. + * not represent the object in the {@link #uniqueSet()}. * @see #remove(Object, int) * @return true if this call changed the collection **/ @@ -114,8 +113,8 @@ public interface Bag extends Collection { /** * Remove the given number of occurrences from the bag. If the bag * contains i occurrences or less, the item will be - * removed from the {@link #uniqueSet}. - * @see #getCount + * removed from the {@link #uniqueSet()}. + * @see #getCount(Object) * @see #remove(Object) * @return true if this call changed the collection **/ @@ -130,7 +129,6 @@ public interface Bag extends Collection { /** * Returns the total number of items in the bag across all types. - * @see #size **/ public int size(); @@ -138,8 +136,8 @@ public interface Bag extends Collection { * Returns true if the bag contains all elements in * the given collection, respecting cardinality. That is, if the * given collection C contains n copies - * of a given object, calling {@link #getCount} on that object must - * be >= n for all n in C. + * of a given object, calling {@link #getCount(Object)} on that object must + * be >= n for all n in C. **/ public boolean containsAll(Collection c);