scolebourne    2004/05/16 04:47:39

  Modified:    collections/src/java/org/apache/commons/collections/functors
                        TransformerClosure.java SwitchClosure.java
                        NotNullPredicate.java NOPClosure.java
                        IfClosure.java InstantiateFactory.java
                        ExceptionClosure.java ExceptionFactory.java
                        PrototypeFactory.java WhileClosure.java
                        ConstantFactory.java FunctorUtils.java
                        ForClosure.java
  Log:
  Javadoc
  
  Revision  Changes    Path
  1.5       +5 -2      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/TransformerClosure.java
  
  Index: TransformerClosure.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/TransformerClosure.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TransformerClosure.java   13 Mar 2004 17:17:03 -0000      1.4
  +++ TransformerClosure.java   16 May 2004 11:47:38 -0000      1.5
  @@ -64,7 +64,9 @@
       }
   
       /**
  -     * Call the transformer.
  +     * Executes the closure by calling the decorated transformer.
  +     * 
  +     * @param input  the input object
        */
       public void execute(Object input) {
           iTransformer.transform(input);
  @@ -72,6 +74,7 @@
   
       /**
        * Gets the transformer.
  +     * 
        * @return the transformer
        * @since Commons Collections 3.1
        */
  
  
  
  1.5       +8 -3      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/SwitchClosure.java
  
  Index: SwitchClosure.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/SwitchClosure.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SwitchClosure.java        13 Mar 2004 17:17:03 -0000      1.4
  +++ SwitchClosure.java        16 May 2004 11:47:38 -0000      1.5
  @@ -127,7 +127,9 @@
       }
   
       /**
  -     * Execute the closure whose predicate returns true
  +     * Executes the closure whose matching predicate returns true
  +     * 
  +     * @param input  the input object
        */
       public void execute(Object input) {
           for (int i = 0; i < iPredicates.length; i++) {
  @@ -141,6 +143,7 @@
   
       /**
        * Gets the predicates, do not modify the array.
  +     * 
        * @return the predicates
        * @since Commons Collections 3.1
        */
  @@ -150,6 +153,7 @@
   
       /**
        * Gets the closures, do not modify the array.
  +     * 
        * @return the closures
        * @since Commons Collections 3.1
        */
  @@ -159,11 +163,12 @@
   
       /**
        * Gets the default closure.
  +     * 
        * @return the default closure
        * @since Commons Collections 3.1
        */
       public Closure getDefaultClosure() {
           return iDefault;
       }
  -
  +    
   }
  
  
  
  1.6       +6 -3      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NotNullPredicate.java
  
  Index: NotNullPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NotNullPredicate.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NotNullPredicate.java     31 Mar 2004 23:13:04 -0000      1.5
  +++ NotNullPredicate.java     16 May 2004 11:47:38 -0000      1.6
  @@ -53,10 +53,13 @@
       }
   
       /**
  -     * Return true if the object equals null.
  +     * Evaluates the predicate returning true if the object does not equal null.
  +     * 
  +     * @param object  the object to evaluate
  +     * @return true if not null
        */
       public boolean evaluate(Object object) {
           return (object != null);
       }
  -    
  +
   }
  
  
  
  1.6       +5 -3      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NOPClosure.java
  
  Index: NOPClosure.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NOPClosure.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NOPClosure.java   31 Mar 2004 23:13:04 -0000      1.5
  +++ NOPClosure.java   16 May 2004 11:47:38 -0000      1.6
  @@ -53,10 +53,12 @@
       }
   
       /**
  -     * Do nothing
  +     * Do nothing.
  +     * 
  +     * @param input  the input object
        */
       public void execute(Object input) {
           // do nothing
       }
  -    
  +
   }
  
  
  
  1.6       +7 -2      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/IfClosure.java
  
  Index: IfClosure.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/IfClosure.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IfClosure.java    13 Mar 2004 17:17:03 -0000      1.5
  +++ IfClosure.java    16 May 2004 11:47:38 -0000      1.6
  @@ -76,7 +76,9 @@
       }
   
       /**
  -     * Execute the correct closure.
  +     * Executes the true or false closure accoring to the result of the predicate.
  +     * 
  +     * @param input  the input object
        */
       public void execute(Object input) {
           if (iPredicate.evaluate(input) == true) {
  @@ -88,6 +90,7 @@
   
       /**
        * Gets the predicate.
  +     * 
        * @return the predicate
        * @since Commons Collections 3.1
        */
  @@ -97,6 +100,7 @@
   
       /**
        * Gets the closure called when true.
  +     * 
        * @return the closure
        * @since Commons Collections 3.1
        */
  @@ -106,6 +110,7 @@
   
       /**
        * Gets the closure called when false.
  +     * 
        * @return the closure
        * @since Commons Collections 3.1
        */
  
  
  
  1.6       +5 -2      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/InstantiateFactory.java
  
  Index: InstantiateFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/InstantiateFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InstantiateFactory.java   18 Feb 2004 00:59:20 -0000      1.5
  +++ InstantiateFactory.java   16 May 2004 11:47:38 -0000      1.6
  @@ -50,6 +50,7 @@
        * @param classToInstantiate  the class to instantiate, not null
        * @param paramTypes  the constructor parameter types
        * @param args  the constructor arguments
  +     * @return a new instantiate factory
        */
       public static Factory getInstance(Class classToInstantiate, Class[] paramTypes, 
Object[] args) {
           if (classToInstantiate == null) {
  @@ -113,7 +114,9 @@
       }
   
       /**
  -     * Create the object using a constructor
  +     * Creates an object using the stored constructor.
  +     * 
  +     * @return the new object
        */
       public Object create() {
           // needed for post-serialization
  
  
  
  1.7       +6 -3      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ExceptionClosure.java
  
  Index: ExceptionClosure.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ExceptionClosure.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExceptionClosure.java     31 Mar 2004 23:13:04 -0000      1.6
  +++ ExceptionClosure.java     16 May 2004 11:47:38 -0000      1.7
  @@ -56,9 +56,12 @@
   
       /**
        * Always throw an exception.
  +     * 
  +     * @param input  the input object
  +     * @throws FunctorException always
        */
  -    public void execute(Object object) {
  +    public void execute(Object input) {
           throw new FunctorException("ExceptionClosure invoked");
       }
  -    
  +
   }
  
  
  
  1.7       +6 -3      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ExceptionFactory.java
  
  Index: ExceptionFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ExceptionFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExceptionFactory.java     31 Mar 2004 23:13:04 -0000      1.6
  +++ ExceptionFactory.java     16 May 2004 11:47:38 -0000      1.7
  @@ -55,10 +55,13 @@
       }
   
       /**
  -     * Always throw an exception.
  +     * Always throws an exception.
  +     * 
  +     * @return never
  +     * @throws FunctorException always
        */
       public Object create() {
           throw new FunctorException("ExceptionFactory invoked");
       }
  -    
  +
   }
  
  
  
  1.7       +12 -5     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/PrototypeFactory.java
  
  Index: PrototypeFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/PrototypeFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PrototypeFactory.java     18 Feb 2004 00:59:20 -0000      1.6
  +++ PrototypeFactory.java     16 May 2004 11:47:38 -0000      1.7
  @@ -84,6 +84,7 @@
        * Use <code>getInstance</code> if you want that.
        */
       private PrototypeFactory() {
  +        super();
       }
   
       // PrototypeCloneFactory
  @@ -123,7 +124,9 @@
           }
   
           /**
  -         * Return clone of prototype
  +         * Creates an object by calling the clone method.
  +         * 
  +         * @return the new object
            */
           public Object create() {
               // needed for post-serialization
  @@ -164,7 +167,9 @@
           }
   
           /**
  -         * Return clone of prototype by serialization
  +         * Creates an object using serialization.
  +         * 
  +         * @return the new object
            */
           public Object create() {
               ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
  @@ -186,13 +191,15 @@
                       if (bais != null) {
                           bais.close();
                       }
  -                } catch (IOException ignored) {
  +                } catch (IOException ex) {
  +                    // ignore
                   }
                   try {
                       if (baos != null) {
                           baos.close();
                       }
  -                } catch (IOException ignored) {
  +                } catch (IOException ex) {
  +                    // ignore
                   }
               }
           }
  
  
  
  1.5       +7 -2      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/WhileClosure.java
  
  Index: WhileClosure.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/WhileClosure.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WhileClosure.java 13 Mar 2004 17:17:03 -0000      1.4
  +++ WhileClosure.java 16 May 2004 11:47:38 -0000      1.5
  @@ -76,7 +76,9 @@
       }
   
       /**
  -     * Execute the closure until the predicate is false.
  +     * Executes the closure until the predicate is false.
  +     * 
  +     * @param input  the input object
        */
       public void execute(Object input) {
           if (iDoLoop) {
  @@ -89,6 +91,7 @@
   
       /**
        * Gets the predicate in use.
  +     * 
        * @return the predicate
        * @since Commons Collections 3.1
        */
  @@ -98,6 +101,7 @@
   
       /**
        * Gets the closure.
  +     * 
        * @return the closure
        * @since Commons Collections 3.1
        */
  @@ -107,6 +111,7 @@
   
       /**
        * Is the loop a do-while loop.
  +     * 
        * @return true is do-while, false if while
        * @since Commons Collections 3.1
        */
  
  
  
  1.5       +5 -2      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ConstantFactory.java
  
  Index: ConstantFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ConstantFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConstantFactory.java      13 Mar 2004 17:17:03 -0000      1.4
  +++ ConstantFactory.java      16 May 2004 11:47:38 -0000      1.5
  @@ -67,7 +67,9 @@
       }
   
       /**
  -     * Always return constant
  +     * Always return constant.
  +     * 
  +     * @return the stored constant value
        */
       public Object create() {
           return iConstant;
  @@ -75,6 +77,7 @@
   
       /**
        * Gets the constant.
  +     * 
        * @return the constant
        * @since Commons Collections 3.1
        */
  
  
  
  1.7       +3 -1      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/FunctorUtils.java
  
  Index: FunctorUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/FunctorUtils.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FunctorUtils.java 18 Feb 2004 00:59:20 -0000      1.6
  +++ FunctorUtils.java 16 May 2004 11:47:38 -0000      1.7
  @@ -36,6 +36,7 @@
        * Restricted constructor.
        */
       private FunctorUtils() {
  +        super();
       }
       
       /**
  @@ -147,6 +148,7 @@
        * Copy method
        * 
        * @param transformers  the transformers to copy
  +     * @return a clone of the transformers
        */
       static Transformer[] copy(Transformer[] transformers) {
           if (transformers == null) {
  
  
  
  1.5       +6 -2      
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ForClosure.java
  
  Index: ForClosure.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ForClosure.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ForClosure.java   13 Mar 2004 17:17:03 -0000      1.4
  +++ ForClosure.java   16 May 2004 11:47:38 -0000      1.5
  @@ -71,7 +71,9 @@
       }
   
       /**
  -     * Execute the closure count times.
  +     * Executes the closure <code>count</code> times.
  +     * 
  +     * @param input  the input object
        */
       public void execute(Object input) {
           for (int i = 0; i < iCount; i++) {
  @@ -81,6 +83,7 @@
   
       /**
        * Gets the closure.
  +     * 
        * @return the closure
        * @since Commons Collections 3.1
        */
  @@ -90,6 +93,7 @@
   
       /**
        * Gets the count.
  +     * 
        * @return the count
        * @since Commons Collections 3.1
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to