You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ma...@apache.org on 2002/03/13 07:00:20 UTC

cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections Bag.java

mas         02/03/12 22:00:20

  Modified:    collections/src/java/org/apache/commons/collections Bag.java
  Log:
  Remove incorrect comment about using hashCode to determine whether
  objects in the bag are equal.
  
  Fix numerous javadoc cross reference problems.
  
  Revision  Changes    Path
  1.5       +17 -19    jakarta-commons/collections/src/java/org/apache/commons/collections/Bag.java
  
  Index: Bag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/Bag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Bag.java	13 Mar 2002 05:40:30 -0000	1.4
  +++ Bag.java	13 Mar 2002 06:00:20 -0000	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /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/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.Set;
   
   /**
  - * A {@link Collection} that keeps a count of its members of the same
  - * type, using <code>hashCode</code> to check for equality. Suppose
  - * you have a Bag that contains <code>{a, a, b, c}</code>.  Calling
  - * {@link #getCount} on <code>a</code> would return 2, while calling
  - * {@link #uniqueSet} would return <code>{a, b, c}</code>.
  + * A {@link Collection} that counts the number of times an object appears in
  + * the collection.  Suppose you have a Bag that contains <code>{a, a, b,
  + * c}</code>.  Calling {@link #getCount(Object)} on <code>a</code> would return
  + * 2, while calling {@link #uniqueSet()} would return <code>{a, b, c}</code>.
    *
    * @author Chuck Burdick
    **/
  @@ -84,12 +83,12 @@
   
      /**
       * 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 <code>true</code> if the object was not already in the
       *         <code>uniqueSet</code>
  -    * @see #getCount
  +    * @see #getCount(Object)
       **/
      public boolean add(Object o);
   
  @@ -99,13 +98,13 @@
       * @return <code>true</code> if the object was not already in the
       *         <code>uniqueSet</code>
       * @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 <code>true</code> if this call changed the collection
       **/
  @@ -114,8 +113,8 @@
      /**
       * Remove the given number of occurrences from the bag. If the bag
       * contains <code>i</code> 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 <code>true</code> if this call changed the collection
       **/
  @@ -130,7 +129,6 @@
   
      /**
       * Returns the total number of items in the bag across all types.
  -    * @see #size
       **/
      public int size();
   
  @@ -138,8 +136,8 @@
       * Returns <code>true</code> if the bag contains all elements in
       * the given collection, respecting cardinality.  That is, if the
       * given collection <code>C</code> contains <code>n</code> copies
  -    * of a given object, calling {@link #getCount} on that object must
  -    * be >= <code>n</code> for all <code>n</code> in <code>C</code>.
  +    * of a given object, calling {@link #getCount(Object)} on that object must
  +    * be <code>&gt;= n</code> for all <code>n</code> in <code>C</code>.
       **/
      public boolean containsAll(Collection c);
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>