From d7321ef14da783fa0fda9c0d25300a1a436b3bb1 Mon Sep 17 00:00:00 2001 From: Stephen Colebourne Date: Sun, 16 May 2004 11:16:01 +0000 Subject: [PATCH] Javadoc git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131723 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/collections/functors/AllPredicate.java | 8 ++++++-- .../commons/collections/functors/AndPredicate.java | 9 +++++++-- .../commons/collections/functors/AnyPredicate.java | 8 ++++++-- .../collections/functors/EqualPredicate.java | 8 ++++++-- .../collections/functors/ExceptionPredicate.java | 8 ++++++-- .../collections/functors/FalsePredicate.java | 9 ++++++--- .../collections/functors/IdentityPredicate.java | 9 +++++++-- .../collections/functors/InstanceofPredicate.java | 8 ++++++-- .../collections/functors/NonePredicate.java | 8 ++++++-- .../commons/collections/functors/NotPredicate.java | 8 ++++++-- .../functors/NullIsExceptionPredicate.java | 10 ++++++++-- .../collections/functors/NullIsFalsePredicate.java | 9 +++++++-- .../collections/functors/NullIsTruePredicate.java | 9 +++++++-- .../collections/functors/NullPredicate.java | 9 ++++++--- .../commons/collections/functors/OnePredicate.java | 9 +++++++-- .../commons/collections/functors/OrPredicate.java | 8 ++++++-- .../collections/functors/TransformedPredicate.java | 13 +++++++++++-- .../collections/functors/TransformerPredicate.java | 14 +++++++++++--- .../collections/functors/TruePredicate.java | 9 ++++++--- .../collections/functors/UniquePredicate.java | 10 +++++++--- 20 files changed, 138 insertions(+), 45 deletions(-) diff --git a/src/java/org/apache/commons/collections/functors/AllPredicate.java b/src/java/org/apache/commons/collections/functors/AllPredicate.java index db33f68ee..9b4341346 100644 --- a/src/java/org/apache/commons/collections/functors/AllPredicate.java +++ b/src/java/org/apache/commons/collections/functors/AllPredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns true if all the predicates return true. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -77,7 +77,10 @@ public final class AllPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if all predicates return true. + * + * @param object the input object + * @return true if all decorated predicates return true */ public boolean evaluate(Object object) { for (int i = 0; i < iPredicates.length; i++) { @@ -90,6 +93,7 @@ public final class AllPredicate implements Predicate, Serializable { /** * Gets the predicates, do not modify the array. + * * @return the predicates * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/AndPredicate.java b/src/java/org/apache/commons/collections/functors/AndPredicate.java index 80b55e73b..7b5a74d5b 100644 --- a/src/java/org/apache/commons/collections/functors/AndPredicate.java +++ b/src/java/org/apache/commons/collections/functors/AndPredicate.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns true if both the predicates return true. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -66,7 +66,10 @@ public final class AndPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if both predicates return true. + * + * @param object the input object + * @return true if both decorated predicates return true */ public boolean evaluate(Object object) { return (iPredicate1.evaluate(object) && iPredicate2.evaluate(object)); @@ -74,6 +77,7 @@ public final class AndPredicate implements Predicate, Serializable { /** * Gets the first predicate. + * * @return the predicate * @since Commons Collections 3.1 */ @@ -83,6 +87,7 @@ public final class AndPredicate implements Predicate, Serializable { /** * Gets the second predicate. + * * @return the predicate * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/AnyPredicate.java b/src/java/org/apache/commons/collections/functors/AnyPredicate.java index 80aad90da..83d14344e 100644 --- a/src/java/org/apache/commons/collections/functors/AnyPredicate.java +++ b/src/java/org/apache/commons/collections/functors/AnyPredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns true if any of the predicates return true. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -77,7 +77,10 @@ public final class AnyPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if any predicate returns true. + * + * @param object the input object + * @return true if any decorated predicate return true */ public boolean evaluate(Object object) { for (int i = 0; i < iPredicates.length; i++) { @@ -90,6 +93,7 @@ public final class AnyPredicate implements Predicate, Serializable { /** * Gets the predicates, do not modify the array. + * * @return the predicates * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/EqualPredicate.java b/src/java/org/apache/commons/collections/functors/EqualPredicate.java index e34e43487..9ce875b76 100644 --- a/src/java/org/apache/commons/collections/functors/EqualPredicate.java +++ b/src/java/org/apache/commons/collections/functors/EqualPredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * as the one stored in this predicate by equals. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -62,7 +62,10 @@ public final class EqualPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if the input equals the stored value. + * + * @param object the input object + * @return true if input object equals stored value */ public boolean evaluate(Object object) { return (iValue.equals(object)); @@ -70,6 +73,7 @@ public final class EqualPredicate implements Predicate, Serializable { /** * Gets the value. + * * @return the value * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/ExceptionPredicate.java b/src/java/org/apache/commons/collections/functors/ExceptionPredicate.java index 19fa838f9..e4bb2a72f 100644 --- a/src/java/org/apache/commons/collections/functors/ExceptionPredicate.java +++ b/src/java/org/apache/commons/collections/functors/ExceptionPredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that always throws an exception. * * @since Commons Collections 3.0 - * @version $Revision: 1.6 $ $Date: 2004/03/31 23:13:04 $ + * @version $Revision: 1.7 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -54,7 +54,11 @@ public final class ExceptionPredicate implements Predicate, Serializable { } /** - * Always throw an exception + * Evaluates the predicate always throwing an exception. + * + * @param object the input object + * @return never + * @throws FunctorException always */ public boolean evaluate(Object object) { throw new FunctorException("ExceptionPredicate invoked"); diff --git a/src/java/org/apache/commons/collections/functors/FalsePredicate.java b/src/java/org/apache/commons/collections/functors/FalsePredicate.java index 56bce4326..0f827e579 100644 --- a/src/java/org/apache/commons/collections/functors/FalsePredicate.java +++ b/src/java/org/apache/commons/collections/functors/FalsePredicate.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that always returns false. * * @since Commons Collections 3.0 - * @version $Revision: 1.5 $ $Date: 2004/03/31 23:13:04 $ + * @version $Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -53,10 +53,13 @@ public final class FalsePredicate implements Predicate, Serializable { } /** - * Always return true. + * Evaluates the predicate returning false always. + * + * @param object the input object + * @return false always */ public boolean evaluate(Object object) { return false; } - + } diff --git a/src/java/org/apache/commons/collections/functors/IdentityPredicate.java b/src/java/org/apache/commons/collections/functors/IdentityPredicate.java index fcd4028cd..5421d86a1 100644 --- a/src/java/org/apache/commons/collections/functors/IdentityPredicate.java +++ b/src/java/org/apache/commons/collections/functors/IdentityPredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * as the one stored in this predicate. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -63,7 +63,11 @@ public final class IdentityPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if the input object is identical to + * the stored object. + * + * @param object the input object + * @return true if input is the same object as the stored value */ public boolean evaluate(Object object) { return (iValue == object); @@ -71,6 +75,7 @@ public final class IdentityPredicate implements Predicate, Serializable { /** * Gets the value. + * * @return the value * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/InstanceofPredicate.java b/src/java/org/apache/commons/collections/functors/InstanceofPredicate.java index 23028d42c..da3ec92bb 100644 --- a/src/java/org/apache/commons/collections/functors/InstanceofPredicate.java +++ b/src/java/org/apache/commons/collections/functors/InstanceofPredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * the type stored in this predicate. * * @since Commons Collections 3.0 - * @version $Revision: 1.5 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -62,7 +62,10 @@ public final class InstanceofPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if the input object is of the correct type. + * + * @param object the input object + * @return true if input is of stored type */ public boolean evaluate(Object object) { return (iType.isInstance(object)); @@ -70,6 +73,7 @@ public final class InstanceofPredicate implements Predicate, Serializable { /** * Gets the type to compare to. + * * @return the type * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/NonePredicate.java b/src/java/org/apache/commons/collections/functors/NonePredicate.java index 4b91f2e4a..19a7a99bd 100644 --- a/src/java/org/apache/commons/collections/functors/NonePredicate.java +++ b/src/java/org/apache/commons/collections/functors/NonePredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns true if none of the predicates return true. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -77,7 +77,10 @@ public final class NonePredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning false if any stored predicate returns false. + * + * @param object the input object + * @return true if none of decorated predicates return true */ public boolean evaluate(Object object) { for (int i = 0; i < iPredicates.length; i++) { @@ -90,6 +93,7 @@ public final class NonePredicate implements Predicate, Serializable { /** * Gets the predicates, do not modify the array. + * * @return the predicates * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/NotPredicate.java b/src/java/org/apache/commons/collections/functors/NotPredicate.java index 00a01671e..34b9975b6 100644 --- a/src/java/org/apache/commons/collections/functors/NotPredicate.java +++ b/src/java/org/apache/commons/collections/functors/NotPredicate.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns the opposite of the decorated predicate. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -61,7 +61,10 @@ public final class NotPredicate implements Predicate, Serializable { } /** - * Return the negated predicate result. + * Evaluates the predicate returning the opposite to the stored predicate. + * + * @param object the input object + * @return true if predicate returns false */ public boolean evaluate(Object object) { return !(iPredicate.evaluate(object)); @@ -69,6 +72,7 @@ public final class NotPredicate implements Predicate, Serializable { /** * Gets the predicate. + * * @return the predicate * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java b/src/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java index a89984c56..f7a4a6d99 100644 --- a/src/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java +++ b/src/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that throws an exception if the input is null. * * @since Commons Collections 3.0 - * @version $Revision: 1.5 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -62,7 +62,12 @@ public final class NullIsExceptionPredicate implements Predicate, Serializable { } /** - * Return true if the object equals null else call the decorated predicate. + * Evaluates the predicate returning the result of the decorated predicate + * once a null check is performed. + * + * @param object the input object + * @return true if decorated predicate returns true + * @throws FunctorException if input is null */ public boolean evaluate(Object object) { if (object == null) { @@ -73,6 +78,7 @@ public final class NullIsExceptionPredicate implements Predicate, Serializable { /** * Gets the predicate. + * * @return the predicate * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java b/src/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java index 59efe021a..8abbb8a3d 100644 --- a/src/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java +++ b/src/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns false if the input is null. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -61,7 +61,11 @@ public final class NullIsFalsePredicate implements Predicate, Serializable { } /** - * Return false if the object equals null else call the decorated predicate. + * Evaluates the predicate returning the result of the decorated predicate + * once a null check is performed. + * + * @param object the input object + * @return true if decorated predicate returns true, false if input is null */ public boolean evaluate(Object object) { if (object == null) { @@ -72,6 +76,7 @@ public final class NullIsFalsePredicate implements Predicate, Serializable { /** * Gets the predicate. + * * @return the predicate * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/NullIsTruePredicate.java b/src/java/org/apache/commons/collections/functors/NullIsTruePredicate.java index e9569de38..21d27154d 100644 --- a/src/java/org/apache/commons/collections/functors/NullIsTruePredicate.java +++ b/src/java/org/apache/commons/collections/functors/NullIsTruePredicate.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns true if the input is null. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -61,7 +61,11 @@ public final class NullIsTruePredicate implements Predicate, Serializable { } /** - * Return true if the object equals null else call the decorated predicate. + * Evaluates the predicate returning the result of the decorated predicate + * once a null check is performed. + * + * @param object the input object + * @return true if decorated predicate returns true or input is null */ public boolean evaluate(Object object) { if (object == null) { @@ -72,6 +76,7 @@ public final class NullIsTruePredicate implements Predicate, Serializable { /** * Gets the predicate. + * * @return the predicate * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/NullPredicate.java b/src/java/org/apache/commons/collections/functors/NullPredicate.java index c1485eaaf..151e27a9a 100644 --- a/src/java/org/apache/commons/collections/functors/NullPredicate.java +++ b/src/java/org/apache/commons/collections/functors/NullPredicate.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns true if the input is null. * * @since Commons Collections 3.0 - * @version $Revision: 1.5 $ $Date: 2004/03/31 23:13:04 $ + * @version $Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -53,10 +53,13 @@ public final class NullPredicate implements Predicate, Serializable { } /** - * Return true if the object equals null. + * Evaluates the predicate returning true if the input is null. + * + * @param object the input object + * @return true if input is null */ public boolean evaluate(Object object) { return (object == null); } - + } diff --git a/src/java/org/apache/commons/collections/functors/OnePredicate.java b/src/java/org/apache/commons/collections/functors/OnePredicate.java index 371ebb135..9e6793084 100644 --- a/src/java/org/apache/commons/collections/functors/OnePredicate.java +++ b/src/java/org/apache/commons/collections/functors/OnePredicate.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns true if only one of the predicates return true. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -77,7 +77,11 @@ public final class OnePredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if only one decorated predicate + * returns true. + * + * @param object the input object + * @return true if only one decorated predicate returns true */ public boolean evaluate(Object object) { boolean match = false; @@ -94,6 +98,7 @@ public final class OnePredicate implements Predicate, Serializable { /** * Gets the predicates, do not modify the array. + * * @return the predicates * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/OrPredicate.java b/src/java/org/apache/commons/collections/functors/OrPredicate.java index 05cc44712..a6bcdeb45 100644 --- a/src/java/org/apache/commons/collections/functors/OrPredicate.java +++ b/src/java/org/apache/commons/collections/functors/OrPredicate.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that returns true if either of the predicates return true. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.5 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -66,7 +66,10 @@ public final class OrPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if either predicate returns true. + * + * @param object the input object + * @return true if either decorated predicate returns true */ public boolean evaluate(Object object) { return (iPredicate1.evaluate(object) || iPredicate2.evaluate(object)); @@ -74,6 +77,7 @@ public final class OrPredicate implements Predicate, Serializable { /** * Gets the first predicate. + * * @return the predicate * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/TransformedPredicate.java b/src/java/org/apache/commons/collections/functors/TransformedPredicate.java index 1aede2da4..c3970bdc1 100644 --- a/src/java/org/apache/commons/collections/functors/TransformedPredicate.java +++ b/src/java/org/apache/commons/collections/functors/TransformedPredicate.java @@ -25,7 +25,7 @@ import org.apache.commons.collections.Transformer; * another Predicate. * * @since Commons Collections 3.1 - * @version $Revision: 1.2 $ $Date: 2004/03/13 17:15:17 $ + * @version $Revision: 1.3 $ $Date: 2004/05/16 11:16:01 $ * @author Alban Peignier * @author Stephen Colebourne */ @@ -60,6 +60,9 @@ public final class TransformedPredicate implements Predicate, Serializable { /** * Constructor that performs no validation. * Use getInstance if you want that. + * + * @param transformer the transformer to use + * @param predicate the predicate to decorate */ public TransformedPredicate(Transformer transformer, Predicate predicate) { iTransformer = transformer; @@ -67,7 +70,11 @@ public final class TransformedPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning the result of the decorated predicate + * once the input has been transformed + * + * @param object the input object which will be transformed + * @return true if decorated predicate returns true */ public boolean evaluate(Object object) { Object result = iTransformer.transform(object); @@ -76,6 +83,7 @@ public final class TransformedPredicate implements Predicate, Serializable { /** * Gets the predicate in use. + * * @return the predicate */ public Predicate getPredicate() { @@ -84,6 +92,7 @@ public final class TransformedPredicate implements Predicate, Serializable { /** * Gets the transformer in use. + * * @return the transformer */ public Transformer getTransformer() { diff --git a/src/java/org/apache/commons/collections/functors/TransformerPredicate.java b/src/java/org/apache/commons/collections/functors/TransformerPredicate.java index 170e0a885..73f74be55 100644 --- a/src/java/org/apache/commons/collections/functors/TransformerPredicate.java +++ b/src/java/org/apache/commons/collections/functors/TransformerPredicate.java @@ -25,7 +25,7 @@ import org.apache.commons.collections.Transformer; * Predicate implementation that returns the result of a transformer. * * @since Commons Collections 3.0 - * @version $Revision: 1.5 $ $Date: 2004/03/13 17:17:03 $ + * @version $Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -40,7 +40,8 @@ public final class TransformerPredicate implements Predicate, Serializable { /** * Factory to create the predicate. * - * @return the transformer + * @param transformer the transformer to decorate + * @return the predicate * @throws IllegalArgumentException if the transformer is null */ public static Predicate getInstance(Transformer transformer) { @@ -53,6 +54,8 @@ public final class TransformerPredicate implements Predicate, Serializable { /** * Constructor that performs no validation. * Use getInstance if you want that. + * + * @param transformer the transformer to decorate */ public TransformerPredicate(Transformer transformer) { super(); @@ -60,7 +63,11 @@ public final class TransformerPredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning the result of the decorated transformer. + * + * @param object the input object + * @return true if decorated transformer returns Boolean.TRUE + * @throws FunctorException if the transformer returns an invalid type */ public boolean evaluate(Object object) { Object result = iTransformer.transform(object); @@ -74,6 +81,7 @@ public final class TransformerPredicate implements Predicate, Serializable { /** * Gets the transformer. + * * @return the transformer * @since Commons Collections 3.1 */ diff --git a/src/java/org/apache/commons/collections/functors/TruePredicate.java b/src/java/org/apache/commons/collections/functors/TruePredicate.java index c2135a602..a8f028d56 100644 --- a/src/java/org/apache/commons/collections/functors/TruePredicate.java +++ b/src/java/org/apache/commons/collections/functors/TruePredicate.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; * Predicate implementation that always returns true. * * @since Commons Collections 3.0 - * @version $Revision: 1.5 $ $Date: 2004/03/31 23:13:04 $ + * @version $Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -53,10 +53,13 @@ public final class TruePredicate implements Predicate, Serializable { } /** - * Always return true. + * Evaluates the predicate returning true always. + * + * @param object the input object + * @return true always */ public boolean evaluate(Object object) { return true; } - + } diff --git a/src/java/org/apache/commons/collections/functors/UniquePredicate.java b/src/java/org/apache/commons/collections/functors/UniquePredicate.java index 9892677db..56264a711 100644 --- a/src/java/org/apache/commons/collections/functors/UniquePredicate.java +++ b/src/java/org/apache/commons/collections/functors/UniquePredicate.java @@ -26,7 +26,7 @@ import org.apache.commons.collections.Predicate; * passed into the predicate. * * @since Commons Collections 3.0 - * @version $Revision: 1.3 $ $Date: 2004/02/18 00:59:20 $ + * @version $Revision: 1.4 $ $Date: 2004/05/16 11:16:01 $ * * @author Stephen Colebourne */ @@ -57,10 +57,14 @@ public final class UniquePredicate implements Predicate, Serializable { } /** - * Return the predicate result. + * Evaluates the predicate returning true if the input object hasn't been + * received yet. + * + * @param object the input object + * @return true if this is the first time the object is seen */ public boolean evaluate(Object object) { return iSet.add(object); } - + }