scolebourne    2004/03/13 09:17:04

  Modified:    collections/src/java/org/apache/commons/collections/functors
                        TransformerClosure.java
                        NullIsExceptionPredicate.java OnePredicate.java
                        NullIsFalsePredicate.java FactoryTransformer.java
                        ConstantTransformer.java ConstantFactory.java
                        TransformerPredicate.java SwitchClosure.java
                        AnyPredicate.java NotPredicate.java
                        PredicateTransformer.java IdentityPredicate.java
                        OrPredicate.java InstanceofPredicate.java
                        AllPredicate.java MapTransformer.java
                        ForClosure.java NullIsTruePredicate.java
                        NonePredicate.java IfClosure.java
                        ChainedTransformer.java AndPredicate.java
                        EqualPredicate.java ClosureTransformer.java
                        WhileClosure.java ChainedClosure.java
                        SwitchTransformer.java
               collections RELEASE-NOTES.html
  Log:
  Add getters to functor classes

  bug 27515
  
  Revision  Changes    Path
  1.4       +11 -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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransformerClosure.java   18 Feb 2004 00:59:20 -0000      1.3
  +++ TransformerClosure.java   13 Mar 2004 17:17:03 -0000      1.4
  @@ -69,5 +69,14 @@
       public void execute(Object input) {
           iTransformer.transform(input);
       }
  -    
  +
  +    /**
  +     * Gets the transformer.
  +     * @return the transformer
  +     * @since Commons Collections 3.1
  +     */
  +    public Transformer getTransformer() {
  +        return iTransformer;
  +    }
  +
   }
  
  
  
  1.5       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java
  
  Index: NullIsExceptionPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NullIsExceptionPredicate.java     18 Feb 2004 00:59:20 -0000      1.4
  +++ NullIsExceptionPredicate.java     13 Mar 2004 17:17:03 -0000      1.5
  @@ -70,5 +70,14 @@
           }
           return iPredicate.evaluate(object);
       }
  -    
  +
  +    /**
  +     * Gets the predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate() {
  +        return iPredicate;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/OnePredicate.java
  
  Index: OnePredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/OnePredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OnePredicate.java 18 Feb 2004 00:59:20 -0000      1.3
  +++ OnePredicate.java 13 Mar 2004 17:17:03 -0000      1.4
  @@ -91,5 +91,14 @@
           }
           return match;
       }
  -    
  +
  +    /**
  +     * Gets the predicates, do not modify the array.
  +     * @return the predicates
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate[] getPredicates() {
  +        return iPredicates;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java
  
  Index: NullIsFalsePredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NullIsFalsePredicate.java 18 Feb 2004 00:59:20 -0000      1.3
  +++ NullIsFalsePredicate.java 13 Mar 2004 17:17:03 -0000      1.4
  @@ -69,5 +69,14 @@
           }
           return iPredicate.evaluate(object);
       }
  -    
  +
  +    /**
  +     * Gets the predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate() {
  +        return iPredicate;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/FactoryTransformer.java
  
  Index: FactoryTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/FactoryTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FactoryTransformer.java   18 Feb 2004 00:59:20 -0000      1.3
  +++ FactoryTransformer.java   13 Mar 2004 17:17:03 -0000      1.4
  @@ -67,5 +67,14 @@
       public Object transform(Object input) {
           return iFactory.create();
       }
  -    
  +
  +    /**
  +     * Gets the factory.
  +     * @return the factory
  +     * @since Commons Collections 3.1
  +     */
  +    public Factory getFactory() {
  +        return iFactory;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ConstantTransformer.java
  
  Index: ConstantTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ConstantTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConstantTransformer.java  18 Feb 2004 00:59:20 -0000      1.3
  +++ ConstantTransformer.java  13 Mar 2004 17:17:03 -0000      1.4
  @@ -72,5 +72,14 @@
       public Object transform(Object input) {
           return iConstant;
       }
  -    
  +
  +    /**
  +     * Gets the constant.
  +     * @return the constant
  +     * @since Commons Collections 3.1
  +     */
  +    public Object getConstant() {
  +        return iConstant;
  +    }
  +
   }
  
  
  
  1.4       +11 -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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConstantFactory.java      18 Feb 2004 00:59:20 -0000      1.3
  +++ ConstantFactory.java      13 Mar 2004 17:17:03 -0000      1.4
  @@ -72,5 +72,14 @@
       public Object create() {
           return iConstant;
       }
  -    
  +
  +    /**
  +     * Gets the constant.
  +     * @return the constant
  +     * @since Commons Collections 3.1
  +     */
  +    public Object getConstant() {
  +        return iConstant;
  +    }
  +
   }
  
  
  
  1.5       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/TransformerPredicate.java
  
  Index: TransformerPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/TransformerPredicate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TransformerPredicate.java 18 Feb 2004 00:59:20 -0000      1.4
  +++ TransformerPredicate.java 13 Mar 2004 17:17:03 -0000      1.5
  @@ -71,5 +71,14 @@
           }
           return ((Boolean) result).booleanValue();
       }
  -    
  +
  +    /**
  +     * Gets the transformer.
  +     * @return the transformer
  +     * @since Commons Collections 3.1
  +     */
  +    public Transformer getTransformer() {
  +        return iTransformer;
  +    }
  +
   }
  
  
  
  1.4       +29 -2     
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SwitchClosure.java        18 Feb 2004 00:59:20 -0000      1.3
  +++ SwitchClosure.java        13 Mar 2004 17:17:03 -0000      1.4
  @@ -138,5 +138,32 @@
           }
           iDefault.execute(input);
       }
  -    
  +
  +    /**
  +     * Gets the predicates, do not modify the array.
  +     * @return the predicates
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate[] getPredicates() {
  +        return iPredicates;
  +    }
  +
  +    /**
  +     * Gets the closures, do not modify the array.
  +     * @return the closures
  +     * @since Commons Collections 3.1
  +     */
  +    public Closure[] getClosures() {
  +        return iClosures;
  +    }
  +
  +    /**
  +     * Gets the default closure.
  +     * @return the default closure
  +     * @since Commons Collections 3.1
  +     */
  +    public Closure getDefaultClosure() {
  +        return iDefault;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/AnyPredicate.java
  
  Index: AnyPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/AnyPredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AnyPredicate.java 18 Feb 2004 00:59:20 -0000      1.3
  +++ AnyPredicate.java 13 Mar 2004 17:17:03 -0000      1.4
  @@ -87,5 +87,14 @@
           }
           return false;
       }
  -    
  +
  +    /**
  +     * Gets the predicates, do not modify the array.
  +     * @return the predicates
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate[] getPredicates() {
  +        return iPredicates;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NotPredicate.java
  
  Index: NotPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NotPredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NotPredicate.java 18 Feb 2004 00:59:20 -0000      1.3
  +++ NotPredicate.java 13 Mar 2004 17:17:03 -0000      1.4
  @@ -66,5 +66,14 @@
       public boolean evaluate(Object object) {
           return !(iPredicate.evaluate(object));
       }
  -    
  +
  +    /**
  +     * Gets the predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate() {
  +        return iPredicate;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/PredicateTransformer.java
  
  Index: PredicateTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/PredicateTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PredicateTransformer.java 18 Feb 2004 00:59:20 -0000      1.3
  +++ PredicateTransformer.java 13 Mar 2004 17:17:03 -0000      1.4
  @@ -68,5 +68,14 @@
       public Object transform(Object input) {
           return (iPredicate.evaluate(input) ? Boolean.TRUE : Boolean.FALSE);
       }
  -    
  +
  +    /**
  +     * Gets the predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate() {
  +        return iPredicate;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/IdentityPredicate.java
  
  Index: IdentityPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/IdentityPredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IdentityPredicate.java    18 Feb 2004 00:59:20 -0000      1.3
  +++ IdentityPredicate.java    13 Mar 2004 17:17:03 -0000      1.4
  @@ -68,5 +68,14 @@
       public boolean evaluate(Object object) {
           return (iValue == object);
       }
  -    
  +
  +    /**
  +     * Gets the value.
  +     * @return the value
  +     * @since Commons Collections 3.1
  +     */
  +    public Object getValue() {
  +        return iValue;
  +    }
  +
   }
  
  
  
  1.4       +20 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/OrPredicate.java
  
  Index: OrPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/OrPredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OrPredicate.java  18 Feb 2004 00:59:20 -0000      1.3
  +++ OrPredicate.java  13 Mar 2004 17:17:03 -0000      1.4
  @@ -71,5 +71,23 @@
       public boolean evaluate(Object object) {
          return (iPredicate1.evaluate(object) || iPredicate2.evaluate(object));
       }
  -    
  +
  +    /**
  +     * Gets the first predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate1() {
  +        return iPredicate1;
  +    }
  +
  +    /**
  +     * Gets the second predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate2() {
  +        return iPredicate2;
  +    }
  +
   }
  
  
  
  1.5       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/InstanceofPredicate.java
  
  Index: InstanceofPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/InstanceofPredicate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InstanceofPredicate.java  18 Feb 2004 00:59:20 -0000      1.4
  +++ InstanceofPredicate.java  13 Mar 2004 17:17:03 -0000      1.5
  @@ -67,5 +67,14 @@
       public boolean evaluate(Object object) {
           return (iType.isInstance(object));
       }
  -    
  +
  +    /**
  +     * Gets the type to compare to.
  +     * @return the type
  +     * @since Commons Collections 3.1
  +     */
  +    public Class getType() {
  +        return iType;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/AllPredicate.java
  
  Index: AllPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/AllPredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AllPredicate.java 18 Feb 2004 00:59:20 -0000      1.3
  +++ AllPredicate.java 13 Mar 2004 17:17:03 -0000      1.4
  @@ -87,5 +87,14 @@
           }
           return true;
       }
  -    
  +
  +    /**
  +     * Gets the predicates, do not modify the array.
  +     * @return the predicates
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate[] getPredicates() {
  +        return iPredicates;
  +    }
  +
   }
  
  
  
  1.6       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/MapTransformer.java
  
  Index: MapTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/MapTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MapTransformer.java       18 Feb 2004 00:59:20 -0000      1.5
  +++ MapTransformer.java       13 Mar 2004 17:17:03 -0000      1.6
  @@ -69,5 +69,14 @@
       public Object transform(Object input) {
           return iMap.get(input);
       }
  -    
  +
  +    /**
  +     * Gets the map to lookup in.
  +     * @return the map
  +     * @since Commons Collections 3.1
  +     */
  +    public Map getMap() {
  +        return iMap;
  +    }
  +
   }
  
  
  
  1.4       +20 -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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ForClosure.java   18 Feb 2004 00:59:20 -0000      1.3
  +++ ForClosure.java   13 Mar 2004 17:17:03 -0000      1.4
  @@ -78,5 +78,23 @@
               iClosure.execute(input);
           }
       }
  -    
  +
  +    /**
  +     * Gets the closure.
  +     * @return the closure
  +     * @since Commons Collections 3.1
  +     */
  +    public Closure getClosure() {
  +        return iClosure;
  +    }
  +
  +    /**
  +     * Gets the count.
  +     * @return the count
  +     * @since Commons Collections 3.1
  +     */
  +    public int getCount() {
  +        return iCount;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NullIsTruePredicate.java
  
  Index: NullIsTruePredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NullIsTruePredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NullIsTruePredicate.java  18 Feb 2004 00:59:20 -0000      1.3
  +++ NullIsTruePredicate.java  13 Mar 2004 17:17:03 -0000      1.4
  @@ -69,5 +69,14 @@
           }
           return iPredicate.evaluate(object);
       }
  -    
  +
  +    /**
  +     * Gets the predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate() {
  +        return iPredicate;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NonePredicate.java
  
  Index: NonePredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/NonePredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NonePredicate.java        18 Feb 2004 00:59:20 -0000      1.3
  +++ NonePredicate.java        13 Mar 2004 17:17:03 -0000      1.4
  @@ -87,5 +87,14 @@
           }
           return true;
       }
  -    
  +
  +    /**
  +     * Gets the predicates, do not modify the array.
  +     * @return the predicates
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate[] getPredicates() {
  +        return iPredicates;
  +    }
  +
   }
  
  
  
  1.5       +29 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IfClosure.java    18 Feb 2004 00:59:20 -0000      1.4
  +++ IfClosure.java    13 Mar 2004 17:17:03 -0000      1.5
  @@ -85,5 +85,32 @@
               iFalseClosure.execute(input);
           }
       }
  -    
  +
  +    /**
  +     * Gets the predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate() {
  +        return iPredicate;
  +    }
  +
  +    /**
  +     * Gets the closure called when true.
  +     * @return the closure
  +     * @since Commons Collections 3.1
  +     */
  +    public Closure getTrueClosure() {
  +        return iTrueClosure;
  +    }
  +
  +    /**
  +     * Gets the closure called when false.
  +     * @return the closure
  +     * @since Commons Collections 3.1
  +     */
  +    public Closure getFalseClosure() {
  +        return iFalseClosure;
  +    }
  +
   }
  
  
  
  1.6       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ChainedTransformer.java
  
  Index: ChainedTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ChainedTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ChainedTransformer.java   18 Feb 2004 00:59:20 -0000      1.5
  +++ ChainedTransformer.java   13 Mar 2004 17:17:03 -0000      1.6
  @@ -119,5 +119,14 @@
           }
           return object;
       }
  -    
  +
  +    /**
  +     * Gets the transformers, do not modify the array.
  +     * @return the transformers
  +     * @since Commons Collections 3.1
  +     */
  +    public Transformer[] getTransformers() {
  +        return iTransformers;
  +    }
  +
   }
  
  
  
  1.4       +20 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/AndPredicate.java
  
  Index: AndPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/AndPredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AndPredicate.java 18 Feb 2004 00:59:20 -0000      1.3
  +++ AndPredicate.java 13 Mar 2004 17:17:03 -0000      1.4
  @@ -71,5 +71,23 @@
       public boolean evaluate(Object object) {
          return (iPredicate1.evaluate(object) && iPredicate2.evaluate(object));
       }
  -    
  +
  +    /**
  +     * Gets the first predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate1() {
  +        return iPredicate1;
  +    }
  +
  +    /**
  +     * Gets the second predicate.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate2() {
  +        return iPredicate2;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/EqualPredicate.java
  
  Index: EqualPredicate.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/EqualPredicate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EqualPredicate.java       18 Feb 2004 00:59:20 -0000      1.3
  +++ EqualPredicate.java       13 Mar 2004 17:17:03 -0000      1.4
  @@ -67,5 +67,14 @@
       public boolean evaluate(Object object) {
           return (iValue.equals(object));
       }
  -    
  +
  +    /**
  +     * Gets the value.
  +     * @return the value
  +     * @since Commons Collections 3.1
  +     */
  +    public Object getValue() {
  +        return iValue;
  +    }
  +
   }
  
  
  
  1.4       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ClosureTransformer.java
  
  Index: ClosureTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ClosureTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClosureTransformer.java   18 Feb 2004 00:59:20 -0000      1.3
  +++ ClosureTransformer.java   13 Mar 2004 17:17:03 -0000      1.4
  @@ -69,5 +69,14 @@
           iClosure.execute(input);
           return input;
       }
  -    
  +
  +    /**
  +     * Gets the closure.
  +     * @return the closure
  +     * @since Commons Collections 3.1
  +     */
  +    public Closure getClosure() {
  +        return iClosure;
  +    }
  +
   }
  
  
  
  1.4       +29 -3     
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WhileClosure.java 18 Feb 2004 00:59:20 -0000      1.3
  +++ WhileClosure.java 13 Mar 2004 17:17:03 -0000      1.4
  @@ -86,6 +86,32 @@
               iClosure.execute(input);
           }
       }
  -    
  -}
   
  +    /**
  +     * Gets the predicate in use.
  +     * @return the predicate
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate getPredicate() {
  +        return iPredicate;
  +    }
  +
  +    /**
  +     * Gets the closure.
  +     * @return the closure
  +     * @since Commons Collections 3.1
  +     */
  +    public Closure getClosure() {
  +        return iClosure;
  +    }
  +
  +    /**
  +     * Is the loop a do-while loop.
  +     * @return true is do-while, false if while
  +     * @since Commons Collections 3.1
  +     */
  +    public boolean isDoLoop() {
  +        return iDoLoop;
  +    }
  +
  +}
  
  
  
  1.5       +11 -2     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ChainedClosure.java
  
  Index: ChainedClosure.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/ChainedClosure.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ChainedClosure.java       18 Feb 2004 00:59:20 -0000      1.4
  +++ ChainedClosure.java       13 Mar 2004 17:17:03 -0000      1.5
  @@ -118,5 +118,14 @@
               iClosures[i].execute(input);
           }
       }
  -    
  +
  +    /**
  +     * Gets the closures, do not modify the array.
  +     * @return the closures
  +     * @since Commons Collections 3.1
  +     */
  +    public Closure[] getClosures() {
  +        return iClosures;
  +    }
  +
   }
  
  
  
  1.4       +30 -3     
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/SwitchTransformer.java
  
  Index: SwitchTransformer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/SwitchTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SwitchTransformer.java    18 Feb 2004 00:59:20 -0000      1.3
  +++ SwitchTransformer.java    13 Mar 2004 17:17:03 -0000      1.4
  @@ -34,7 +34,7 @@
   public class SwitchTransformer implements Transformer, Serializable {
   
       /** Serial version UID */
  -
  +    static final long serialVersionUID = -6404460890903469332L;
   
       /** The tests to consider */
       private final Predicate[] iPredicates;
  @@ -137,5 +137,32 @@
           }
           return iDefault.transform(input);
       }
  -    
  +
  +    /**
  +     * Gets the predicates, do not modify the array.
  +     * @return the predicates
  +     * @since Commons Collections 3.1
  +     */
  +    public Predicate[] getPredicates() {
  +        return iPredicates;
  +    }
  +
  +    /**
  +     * Gets the transformers, do not modify the array.
  +     * @return the transformers
  +     * @since Commons Collections 3.1
  +     */
  +    public Transformer[] getTransformers() {
  +        return iTransformers;
  +    }
  +
  +    /**
  +     * Gets the default transformer.
  +     * @return the default transformer
  +     * @since Commons Collections 3.1
  +     */
  +    public Transformer getDefaultTransformer() {
  +        return iDefault;
  +    }
  +
   }
  
  
  
  1.14      +4 -3      jakarta-commons/collections/RELEASE-NOTES.html
  
  Index: RELEASE-NOTES.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/RELEASE-NOTES.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- RELEASE-NOTES.html        13 Mar 2004 16:34:46 -0000      1.13
  +++ RELEASE-NOTES.html        13 Mar 2004 17:17:03 -0000      1.14
  @@ -25,22 +25,23 @@
   
   <center><h3>NEW CLASSES</h3></center>
   <ul>
  -<li>[26946] TransformedPredicate - A predicate where the input object is 
transformed</li>
  +<li>TransformedPredicate - A predicate where the input object is transformed 
[26946]</li>
   </ul>
   
   <center><h3>ENHANCEMENTS</h3></center>
   <ul>
   <li>MultiKey - Add getKey(index) and size() methods and make constructor public</li>
   <li>AbstractHashedMap,AbstractLinkedMap - Add methods to access entry methods when 
protected scope blocks</li>
  +<li>Functors - Add get methods to retrieve internal state [27515]</li>
   </ul>
   
   <center><h3>BUG FIXES</h3></center>
   <ul>
  -<li>[27159] AbstractHashedMap subclasses failed to clone() correctly</li>
  +<li>AbstractHashedMap subclasses failed to clone() correctly [27159]</li>
   </ul>
   
   <center><h3>JAVADOC</h3></center>
   <ul>
  -<li>[26470] TreeBidiMap - Add javadoc about requiring Comparable entries</li>
  +<li>TreeBidiMap - Add javadoc about requiring Comparable entries [26470]</li>
   <li>MultiKey - Add extra explanatations, examples and warnings</li>
   </ul>
  
  
  

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

Reply via email to