Add getters to functor classes

bug 27515


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131605 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2004-03-13 17:17:03 +00:00
parent a02862092a
commit 5bd1ed25de
29 changed files with 412 additions and 61 deletions

View File

@ -25,22 +25,23 @@ No interface changes, or deprecations have occurred.
<center><h3>NEW CLASSES</h3></center> <center><h3>NEW CLASSES</h3></center>
<ul> <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> </ul>
<center><h3>ENHANCEMENTS</h3></center> <center><h3>ENHANCEMENTS</h3></center>
<ul> <ul>
<li>MultiKey - Add getKey(index) and size() methods and make constructor public</li> <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>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> </ul>
<center><h3>BUG FIXES</h3></center> <center><h3>BUG FIXES</h3></center>
<ul> <ul>
<li>[27159] AbstractHashedMap subclasses failed to clone() correctly</li> <li>AbstractHashedMap subclasses failed to clone() correctly [27159]</li>
</ul> </ul>
<center><h3>JAVADOC</h3></center> <center><h3>JAVADOC</h3></center>
<ul> <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> <li>MultiKey - Add extra explanatations, examples and warnings</li>
</ul> </ul>

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns true if all the predicates return true. * Predicate implementation that returns true if all the predicates return true.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -88,4 +88,13 @@ public final class AllPredicate implements Predicate, Serializable {
return true; return true;
} }
/**
* Gets the predicates, do not modify the array.
* @return the predicates
* @since Commons Collections 3.1
*/
public Predicate[] getPredicates() {
return iPredicates;
}
} }

View File

@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns true if both the predicates return true. * Predicate implementation that returns true if both the predicates return true.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -72,4 +72,22 @@ public final class AndPredicate implements Predicate, Serializable {
return (iPredicate1.evaluate(object) && iPredicate2.evaluate(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;
}
} }

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns true if any of the predicates return true. * Predicate implementation that returns true if any of the predicates return true.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -88,4 +88,13 @@ public final class AnyPredicate implements Predicate, Serializable {
return false; return false;
} }
/**
* Gets the predicates, do not modify the array.
* @return the predicates
* @since Commons Collections 3.1
*/
public Predicate[] getPredicates() {
return iPredicates;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Closure;
* Closure implementation that chains the specified closures together. * Closure implementation that chains the specified closures together.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.5 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -119,4 +119,13 @@ public class ChainedClosure implements Closure, Serializable {
} }
} }
/**
* Gets the closures, do not modify the array.
* @return the closures
* @since Commons Collections 3.1
*/
public Closure[] getClosures() {
return iClosures;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Transformer;
* Transformer implementation that chains the specified closures together. * Transformer implementation that chains the specified closures together.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.6 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -120,4 +120,13 @@ public class ChainedTransformer implements Transformer, Serializable {
return object; return object;
} }
/**
* Gets the transformers, do not modify the array.
* @return the transformers
* @since Commons Collections 3.1
*/
public Transformer[] getTransformers() {
return iTransformers;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Transformer;
* and then returns the input. * and then returns the input.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -70,4 +70,13 @@ public class ClosureTransformer implements Transformer, Serializable {
return input; return input;
} }
/**
* Gets the closure.
* @return the closure
* @since Commons Collections 3.1
*/
public Closure getClosure() {
return iClosure;
}
} }

View File

@ -27,7 +27,7 @@ import org.apache.commons.collections.Factory;
* use the prototype factory. * use the prototype factory.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -73,4 +73,13 @@ public class ConstantFactory implements Factory, Serializable {
return iConstant; return iConstant;
} }
/**
* Gets the constant.
* @return the constant
* @since Commons Collections 3.1
*/
public Object getConstant() {
return iConstant;
}
} }

View File

@ -27,7 +27,7 @@ import org.apache.commons.collections.Transformer;
* use the prototype factory. * use the prototype factory.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -73,4 +73,13 @@ public class ConstantTransformer implements Transformer, Serializable {
return iConstant; return iConstant;
} }
/**
* Gets the constant.
* @return the constant
* @since Commons Collections 3.1
*/
public Object getConstant() {
return iConstant;
}
} }

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate;
* as the one stored in this predicate by equals. * as the one stored in this predicate by equals.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -68,4 +68,13 @@ public final class EqualPredicate implements Predicate, Serializable {
return (iValue.equals(object)); return (iValue.equals(object));
} }
/**
* Gets the value.
* @return the value
* @since Commons Collections 3.1
*/
public Object getValue() {
return iValue;
}
} }

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Transformer;
* Transformer implementation that calls a Factory and returns the result. * Transformer implementation that calls a Factory and returns the result.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -68,4 +68,13 @@ public class FactoryTransformer implements Transformer, Serializable {
return iFactory.create(); return iFactory.create();
} }
/**
* Gets the factory.
* @return the factory
* @since Commons Collections 3.1
*/
public Factory getFactory() {
return iFactory;
}
} }

View File

@ -23,7 +23,7 @@ import org.apache.commons.collections.Closure;
* Closure implementation that calls another closure n times, like a for loop. * Closure implementation that calls another closure n times, like a for loop.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -79,4 +79,22 @@ public class ForClosure implements Closure, Serializable {
} }
} }
/**
* 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;
}
} }

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate;
* as the one stored in this predicate. * as the one stored in this predicate.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -69,4 +69,13 @@ public final class IdentityPredicate implements Predicate, Serializable {
return (iValue == object); return (iValue == object);
} }
/**
* Gets the value.
* @return the value
* @since Commons Collections 3.1
*/
public Object getValue() {
return iValue;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Predicate;
* based on a predicate. * based on a predicate.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.5 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -86,4 +86,31 @@ public class IfClosure implements Closure, Serializable {
} }
} }
/**
* 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;
}
} }

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate;
* the type stored in this predicate. * the type stored in this predicate.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.5 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -68,4 +68,13 @@ public final class InstanceofPredicate implements Predicate, Serializable {
return (iType.isInstance(object)); return (iType.isInstance(object));
} }
/**
* Gets the type to compare to.
* @return the type
* @since Commons Collections 3.1
*/
public Class getType() {
return iType;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Transformer;
* using the input parameter as a key. * using the input parameter as a key.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.6 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -70,4 +70,13 @@ public final class MapTransformer implements Transformer, Serializable {
return iMap.get(input); return iMap.get(input);
} }
/**
* Gets the map to lookup in.
* @return the map
* @since Commons Collections 3.1
*/
public Map getMap() {
return iMap;
}
} }

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns true if none of the predicates return true. * Predicate implementation that returns true if none of the predicates return true.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -88,4 +88,13 @@ public final class NonePredicate implements Predicate, Serializable {
return true; return true;
} }
/**
* Gets the predicates, do not modify the array.
* @return the predicates
* @since Commons Collections 3.1
*/
public Predicate[] getPredicates() {
return iPredicates;
}
} }

View File

@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns the opposite of the decorated predicate. * Predicate implementation that returns the opposite of the decorated predicate.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -67,4 +67,13 @@ public final class NotPredicate implements Predicate, Serializable {
return !(iPredicate.evaluate(object)); return !(iPredicate.evaluate(object));
} }
/**
* Gets the predicate.
* @return the predicate
* @since Commons Collections 3.1
*/
public Predicate getPredicate() {
return iPredicate;
}
} }

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that throws an exception if the input is null. * Predicate implementation that throws an exception if the input is null.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.5 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -71,4 +71,13 @@ public final class NullIsExceptionPredicate implements Predicate, Serializable {
return iPredicate.evaluate(object); return iPredicate.evaluate(object);
} }
/**
* Gets the predicate.
* @return the predicate
* @since Commons Collections 3.1
*/
public Predicate getPredicate() {
return iPredicate;
}
} }

View File

@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns false if the input is null. * Predicate implementation that returns false if the input is null.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -70,4 +70,13 @@ public final class NullIsFalsePredicate implements Predicate, Serializable {
return iPredicate.evaluate(object); return iPredicate.evaluate(object);
} }
/**
* Gets the predicate.
* @return the predicate
* @since Commons Collections 3.1
*/
public Predicate getPredicate() {
return iPredicate;
}
} }

View File

@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns true if the input is null. * Predicate implementation that returns true if the input is null.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -70,4 +70,13 @@ public final class NullIsTruePredicate implements Predicate, Serializable {
return iPredicate.evaluate(object); return iPredicate.evaluate(object);
} }
/**
* Gets the predicate.
* @return the predicate
* @since Commons Collections 3.1
*/
public Predicate getPredicate() {
return iPredicate;
}
} }

View File

@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns true if only one of the predicates return true. * Predicate implementation that returns true if only one of the predicates return true.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -92,4 +92,13 @@ public final class OnePredicate implements Predicate, Serializable {
return match; return match;
} }
/**
* Gets the predicates, do not modify the array.
* @return the predicates
* @since Commons Collections 3.1
*/
public Predicate[] getPredicates() {
return iPredicates;
}
} }

View File

@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate;
* Predicate implementation that returns true if either of the predicates return true. * Predicate implementation that returns true if either of the predicates return true.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -72,4 +72,22 @@ public final class OrPredicate implements Predicate, Serializable {
return (iPredicate1.evaluate(object) || iPredicate2.evaluate(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;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Transformer;
* and then returns the input. * and then returns the input.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -69,4 +69,13 @@ public class PredicateTransformer implements Transformer, Serializable {
return (iPredicate.evaluate(input) ? Boolean.TRUE : Boolean.FALSE); return (iPredicate.evaluate(input) ? Boolean.TRUE : Boolean.FALSE);
} }
/**
* Gets the predicate.
* @return the predicate
* @since Commons Collections 3.1
*/
public Predicate getPredicate() {
return iPredicate;
}
} }

View File

@ -27,7 +27,7 @@ import org.apache.commons.collections.Predicate;
* like a switch statement. * like a switch statement.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -139,4 +139,31 @@ public class SwitchClosure implements Closure, Serializable {
iDefault.execute(input); 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;
}
} }

View File

@ -27,14 +27,14 @@ import org.apache.commons.collections.Transformer;
* like a switch statement. * like a switch statement.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class SwitchTransformer implements Transformer, Serializable { public class SwitchTransformer implements Transformer, Serializable {
/** Serial version UID */ /** Serial version UID */
static final long serialVersionUID = -6404460890903469332L;
/** The tests to consider */ /** The tests to consider */
private final Predicate[] iPredicates; private final Predicate[] iPredicates;
@ -138,4 +138,31 @@ public class SwitchTransformer implements Transformer, Serializable {
return iDefault.transform(input); 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;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Transformer;
* and ignore the result. * and ignore the result.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -70,4 +70,13 @@ public class TransformerClosure implements Closure, Serializable {
iTransformer.transform(input); iTransformer.transform(input);
} }
/**
* Gets the transformer.
* @return the transformer
* @since Commons Collections 3.1
*/
public Transformer getTransformer() {
return iTransformer;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Transformer;
* Predicate implementation that returns the result of a transformer. * Predicate implementation that returns the result of a transformer.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.5 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -72,4 +72,13 @@ public final class TransformerPredicate implements Predicate, Serializable {
return ((Boolean) result).booleanValue(); return ((Boolean) result).booleanValue();
} }
/**
* Gets the transformer.
* @return the transformer
* @since Commons Collections 3.1
*/
public Transformer getTransformer() {
return iTransformer;
}
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Predicate;
* like a do-while or while loop. * like a do-while or while loop.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
@ -87,5 +87,31 @@ public class WhileClosure implements Closure, Serializable {
} }
} }
} /**
* 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;
}
}