commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections SetUtils.java MapUtils.java ListUtils.java CollectionUtils.java BufferUtils.java BagUtils.java
Date Thu, 01 Apr 2004 20:12:00 GMT
scolebourne    2004/04/01 12:12:00

  Modified:    collections RELEASE-NOTES.html
               collections/src/java/org/apache/commons/collections
                        SetUtils.java MapUtils.java ListUtils.java
                        CollectionUtils.java BufferUtils.java BagUtils.java
  Log:
  Clarify the internal workings of the predicated decorator from the Utils classes
  bug 28115
  
  Revision  Changes    Path
  1.22      +1 -0      jakarta-commons/collections/RELEASE-NOTES.html
  
  Index: RELEASE-NOTES.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/RELEASE-NOTES.html,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- RELEASE-NOTES.html	1 Apr 2004 00:07:48 -0000	1.21
  +++ RELEASE-NOTES.html	1 Apr 2004 20:12:00 -0000	1.22
  @@ -52,4 +52,5 @@
   <li>TreeBidiMap - Add javadoc about requiring Comparable entries [26470]</li>
   <li>MultiKey - Add extra explanatations, examples and warnings</li>
   <li>MultiMap,MultiHashMap - Add extra documentation to clarify the interface and
implementation</li>
  +<li>XxxUtils - Clarify the internal workings of the predicated decorator classes
[28115]</li>
   </ul>
  
  
  
  1.26      +13 -10    jakarta-commons/collections/src/java/org/apache/commons/collections/SetUtils.java
  
  Index: SetUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/SetUtils.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- SetUtils.java	18 Feb 2004 01:15:42 -0000	1.25
  +++ SetUtils.java	1 Apr 2004 20:12:00 -0000	1.26
  @@ -176,10 +176,12 @@
       }
   
       /**
  -     * Returns a predicated set backed by the given set.  Only objects
  -     * that pass the test in the given predicate can be added to the set.
  -     * It is important not to use the original set after invoking this 
  -     * method, as it is a backdoor for adding unvalidated objects.
  +     * Returns a predicated (validating) set backed by the given set.
  +     * <p>
  +     * Only objects that pass the test in the given predicate can be added to the set.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * It is important not to use the original set after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param set  the set to predicate, must not be null
        * @param predicate  the predicate for the set, must not be null
  @@ -275,11 +277,12 @@
       }
   
       /**
  -     * Returns a predicated sorted set backed by the given sorted set.  
  -     * Only objects that pass the test in the given predicate can be added
  -     * to the sorted set.
  -     * It is important not to use the original sorted set after invoking this 
  -     * method, as it is a backdoor for adding unvalidated objects.
  +     * Returns a predicated (validating) sorted set backed by the given sorted set.  
  +     * <p>
  +     * Only objects that pass the test in the given predicate can be added to the set.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * It is important not to use the original set after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param set  the sorted set to predicate, must not be null
        * @param predicate  the predicate for the sorted set, must not be null
  
  
  
  1.45      +15 -9     jakarta-commons/collections/src/java/org/apache/commons/collections/MapUtils.java
  
  Index: MapUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/MapUtils.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- MapUtils.java	18 Feb 2004 01:15:42 -0000	1.44
  +++ MapUtils.java	1 Apr 2004 20:12:00 -0000	1.45
  @@ -1138,10 +1138,13 @@
       }
   
       /**
  -     * Returns a predicated map backed by the given map.  Only keys and
  -     * values that pass the given predicates can be added to the map.
  -     * It is important not to use the original map after invoking this 
  -     * method, as it is a backdoor for adding unvalidated objects.
  +     * Returns a predicated (validating) map backed by the given map.
  +     * <p>
  +     * Only objects that pass the tests in the given predicates can be added to the map.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * Keys must pass the key predicate, values must pass the value predicate.
  +     * It is important not to use the original map after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param map  the map to predicate, must not be null
        * @param keyPred  the predicate for keys, null means no check
  @@ -1328,10 +1331,13 @@
       }
   
       /**
  -     * Returns a predicated sorted map backed by the given map.  Only keys and
  -     * values that pass the given predicates can be added to the map.
  -     * It is important not to use the original map after invoking this 
  -     * method, as it is a backdoor for adding unvalidated objects.
  +     * Returns a predicated (validating) sorted map backed by the given map.
  +     * <p>
  +     * Only objects that pass the tests in the given predicates can be added to the map.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * Keys must pass the key predicate, values must pass the value predicate.
  +     * It is important not to use the original map after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param map  the map to predicate, must not be null
        * @param keyPred  the predicate for keys, null means no check
  
  
  
  1.28      +7 -5      jakarta-commons/collections/src/java/org/apache/commons/collections/ListUtils.java
  
  Index: ListUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/ListUtils.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ListUtils.java	18 Feb 2004 01:15:42 -0000	1.27
  +++ ListUtils.java	1 Apr 2004 20:12:00 -0000	1.28
  @@ -259,10 +259,12 @@
       }
   
       /**
  -     * Returns a predicated list backed by the given list.  Only objects
  -     * that pass the test in the given predicate can be added to the list.
  -     * It is important not to use the original list after invoking this 
  -     * method, as it is a backdoor for adding unvalidated objects.
  +     * Returns a predicated (validating) list backed by the given list.
  +     * <p>
  +     * Only objects that pass the test in the given predicate can be added to the list.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * It is important not to use the original list after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param list  the list to predicate, must not be null
        * @param predicate  the predicate for the list, must not be null
  
  
  
  1.59      +6 -7      jakarta-commons/collections/src/java/org/apache/commons/collections/CollectionUtils.java
  
  Index: CollectionUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/CollectionUtils.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- CollectionUtils.java	31 Mar 2004 23:13:50 -0000	1.58
  +++ CollectionUtils.java	1 Apr 2004 20:12:00 -0000	1.59
  @@ -1019,13 +1019,12 @@
       }
   
       /**
  -     * Returns a predicated collection backed by the given collection.
  -     * Only objects that pass the test in the given predicate can be 
  -     * added to the collection. Throws an IllegalArgumentException on adding
  -     * an element if it is invalid.
  +     * Returns a predicated (validating) collection backed by the given collection.
        * <p>
  -     * It is important not to use the original collection after invoking this 
  -     * method, as it is a backdoor for adding unvalidated objects.
  +     * Only objects that pass the test in the given predicate can be added to the collection.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * It is important not to use the original collection after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param collection  the collection to predicate, must not be null
        * @param predicate  the predicate for the collection, must not be null
  
  
  
  1.20      +7 -6      jakarta-commons/collections/src/java/org/apache/commons/collections/BufferUtils.java
  
  Index: BufferUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/BufferUtils.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- BufferUtils.java	18 Feb 2004 01:15:43 -0000	1.19
  +++ BufferUtils.java	1 Apr 2004 20:12:00 -0000	1.20
  @@ -97,11 +97,12 @@
       }
   
       /**
  -     * Returns a predicated buffer backed by the given buffer.  Elements are
  -     * evaluated with the given predicate before being added to the buffer.
  -     * If the predicate evaluation returns false, then an 
  -     * IllegalArgumentException is raised and the element is not added to
  -     * the buffer.
  +     * Returns a predicated (validating) buffer backed by the given buffer.
  +     * <p>
  +     * Only objects that pass the test in the given predicate can be added to the buffer.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * It is important not to use the original buffer after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param buffer  the buffer to predicate, must not be null
        * @param predicate  the predicate used to evaluate new elements, must not be null
  
  
  
  1.20      +13 -10    jakarta-commons/collections/src/java/org/apache/commons/collections/BagUtils.java
  
  Index: BagUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/BagUtils.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- BagUtils.java	18 Feb 2004 01:15:42 -0000	1.19
  +++ BagUtils.java	1 Apr 2004 20:12:00 -0000	1.20
  @@ -104,10 +104,12 @@
       }
       
       /**
  -     * Returns a predicated bag backed by the given bag.  Only objects
  -     * that pass the test in the given predicate can be added to the bag.
  -     * It is important not to use the original bag after invoking this 
  -     * method, as it is a backdoor for adding unvalidated objects.
  +     * Returns a predicated (validating) bag backed by the given bag.
  +     * <p>
  +     * Only objects that pass the test in the given predicate can be added to the bag.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * It is important not to use the original bag after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param bag  the bag to predicate, must not be null
        * @param predicate  the predicate for the bag, must not be null
  @@ -193,11 +195,12 @@
       }
       
       /**
  -     * Returns a predicated sorted bag backed by the given sorted bag.  
  -     * Only objects that pass the test in the given predicate can be 
  -     * added to the bag.
  -     * It is important not to use the original bag after invoking this 
  -     * method, as it is a backdoor for adding unvalidated objects.
  +     * Returns a predicated (validating) sorted bag backed by the given sorted bag.
  +     * <p>
  +     * Only objects that pass the test in the given predicate can be added to the bag.
  +     * Trying to add an invalid object results in an IllegalArgumentException.
  +     * It is important not to use the original bag after invoking this method,
  +     * as it is a backdoor for adding invalid objects.
        *
        * @param bag  the sorted bag to predicate, must not be null
        * @param predicate  the predicate for the bag, must not be null
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message