From 30bbfaf6d6920bca647889026339a13dd63d6736 Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Thu, 26 Jul 2012 19:53:10 +0000 Subject: [PATCH] Javadoc fixes for predicates. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1366175 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/collections/functors/FalsePredicate.java | 1 + .../commons/collections/functors/IdentityPredicate.java | 1 + .../apache/commons/collections/functors/NonePredicate.java | 2 ++ .../commons/collections/functors/NotNullPredicate.java | 1 + .../apache/commons/collections/functors/NotPredicate.java | 1 + .../collections/functors/NullIsExceptionPredicate.java | 1 + .../commons/collections/functors/NullIsFalsePredicate.java | 1 + .../commons/collections/functors/NullIsTruePredicate.java | 1 + .../apache/commons/collections/functors/NullPredicate.java | 3 ++- .../apache/commons/collections/functors/OnePredicate.java | 2 ++ .../org/apache/commons/collections/functors/OrPredicate.java | 1 + .../commons/collections/functors/TransformedPredicate.java | 4 +++- .../commons/collections/functors/TransformerPredicate.java | 1 + .../apache/commons/collections/functors/TruePredicate.java | 1 + .../apache/commons/collections/functors/UniquePredicate.java | 5 +++-- 15 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/collections/functors/FalsePredicate.java b/src/main/java/org/apache/commons/collections/functors/FalsePredicate.java index 071b0cdc3..fa60ccd15 100644 --- a/src/main/java/org/apache/commons/collections/functors/FalsePredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/FalsePredicate.java @@ -37,6 +37,7 @@ public final class FalsePredicate implements Predicate, Serializable { /** * Get a typed instance. * + * @param the type that the predicate queries * @return the singleton instance * @since 4.0 */ diff --git a/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java b/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java index 5d91ff7ac..3b8abe091 100644 --- a/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/IdentityPredicate.java @@ -38,6 +38,7 @@ public final class IdentityPredicate implements Predicate, Serializable { /** * Factory to create the identity predicate. * + * @param the type that the predicate queries * @param object the object to compare to * @return the predicate * @throws IllegalArgumentException if the predicate is null diff --git a/src/main/java/org/apache/commons/collections/functors/NonePredicate.java b/src/main/java/org/apache/commons/collections/functors/NonePredicate.java index 291cbdb39..1f42a5056 100644 --- a/src/main/java/org/apache/commons/collections/functors/NonePredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/NonePredicate.java @@ -45,6 +45,7 @@ public final class NonePredicate implements Predicate, PredicateDecorator< *

* If the array is size zero, the predicate always returns true. * + * @param the type that the predicate queries * @param predicates the predicates to check, cloned, not null * @return the any predicate * @throws IllegalArgumentException if the predicates array is null @@ -63,6 +64,7 @@ public final class NonePredicate implements Predicate, PredicateDecorator< *

* If the collection is size zero, the predicate always returns true. * + * @param the type that the predicate queries * @param predicates the predicates to check, cloned, not null * @return the one predicate * @throws IllegalArgumentException if the predicates array is null diff --git a/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java b/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java index fc2710f0d..8c68ed191 100644 --- a/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/NotNullPredicate.java @@ -37,6 +37,7 @@ public final class NotNullPredicate implements Predicate, Serializable { /** * Factory returning the singleton instance. * + * @param the type that the predicate queries * @return the singleton instance * @since 3.1 */ diff --git a/src/main/java/org/apache/commons/collections/functors/NotPredicate.java b/src/main/java/org/apache/commons/collections/functors/NotPredicate.java index 7c249aa19..1bf0e3fe0 100644 --- a/src/main/java/org/apache/commons/collections/functors/NotPredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/NotPredicate.java @@ -37,6 +37,7 @@ public final class NotPredicate implements Predicate, PredicateDecorator the type that the predicate queries * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null diff --git a/src/main/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java b/src/main/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java index 6ee82d605..8b4650685 100644 --- a/src/main/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/NullIsExceptionPredicate.java @@ -38,6 +38,7 @@ public final class NullIsExceptionPredicate implements Predicate, Predicat /** * Factory to create the null exception predicate. * + * @param the type that the predicate queries * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null diff --git a/src/main/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java b/src/main/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java index 9a91651eb..be28e3a11 100644 --- a/src/main/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/NullIsFalsePredicate.java @@ -37,6 +37,7 @@ public final class NullIsFalsePredicate implements Predicate, PredicateDec /** * Factory to create the null false predicate. * + * @param the type that the predicate queries * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null diff --git a/src/main/java/org/apache/commons/collections/functors/NullIsTruePredicate.java b/src/main/java/org/apache/commons/collections/functors/NullIsTruePredicate.java index d2680c716..4281ef6af 100644 --- a/src/main/java/org/apache/commons/collections/functors/NullIsTruePredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/NullIsTruePredicate.java @@ -37,6 +37,7 @@ public final class NullIsTruePredicate implements Predicate, PredicateDeco /** * Factory to create the null true predicate. * + * @param the type that the predicate queries * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null diff --git a/src/main/java/org/apache/commons/collections/functors/NullPredicate.java b/src/main/java/org/apache/commons/collections/functors/NullPredicate.java index 5427a8b68..c1efe0381 100644 --- a/src/main/java/org/apache/commons/collections/functors/NullPredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/NullPredicate.java @@ -37,6 +37,7 @@ public final class NullPredicate implements Predicate, Serializable { /** * Factory returning the singleton instance. * + * @param the type that the predicate queries * @return the singleton instance * @since 3.1 */ @@ -58,7 +59,7 @@ public final class NullPredicate implements Predicate, Serializable { * @param object the input object * @return true if input is null */ - public boolean evaluate(Object object) { + public boolean evaluate(T object) { return (object == null); } diff --git a/src/main/java/org/apache/commons/collections/functors/OnePredicate.java b/src/main/java/org/apache/commons/collections/functors/OnePredicate.java index 4c88467b7..0b0adc5dd 100644 --- a/src/main/java/org/apache/commons/collections/functors/OnePredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/OnePredicate.java @@ -46,6 +46,7 @@ public final class OnePredicate implements Predicate, PredicateDecorator the type that the predicate queries * @param predicates the predicates to check, cloned, not null * @return the any predicate * @throws IllegalArgumentException if the predicates array is null @@ -66,6 +67,7 @@ public final class OnePredicate implements Predicate, PredicateDecorator the type that the predicate queries * @param predicates the predicates to check, cloned, not null * @return the one predicate * @throws IllegalArgumentException if the predicates array is null diff --git a/src/main/java/org/apache/commons/collections/functors/OrPredicate.java b/src/main/java/org/apache/commons/collections/functors/OrPredicate.java index e9bca26a6..dc8009fb3 100644 --- a/src/main/java/org/apache/commons/collections/functors/OrPredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/OrPredicate.java @@ -39,6 +39,7 @@ public final class OrPredicate implements Predicate, PredicateDecorator /** * Factory to create the predicate. * + * @param the type that the predicate queries * @param predicate1 the first predicate to check, not null * @param predicate2 the second predicate to check, not null * @return the and predicate diff --git a/src/main/java/org/apache/commons/collections/functors/TransformedPredicate.java b/src/main/java/org/apache/commons/collections/functors/TransformedPredicate.java index 13e8ef7c8..ce70bb37b 100644 --- a/src/main/java/org/apache/commons/collections/functors/TransformedPredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/TransformedPredicate.java @@ -42,12 +42,14 @@ public final class TransformedPredicate implements Predicate, PredicateDec /** * Factory to create the predicate. * + * @param the type that the predicate queries * @param transformer the transformer to call * @param predicate the predicate to call with the result of the transform * @return the predicate * @throws IllegalArgumentException if the transformer or the predicate is null */ - public static Predicate transformedPredicate(Transformer transformer, Predicate predicate) { + public static Predicate transformedPredicate(Transformer transformer, + Predicate predicate) { if (transformer == null) { throw new IllegalArgumentException("The transformer to call must not be null"); } diff --git a/src/main/java/org/apache/commons/collections/functors/TransformerPredicate.java b/src/main/java/org/apache/commons/collections/functors/TransformerPredicate.java index dc705f54f..109749117 100644 --- a/src/main/java/org/apache/commons/collections/functors/TransformerPredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/TransformerPredicate.java @@ -39,6 +39,7 @@ public final class TransformerPredicate implements Predicate, Serializable /** * Factory to create the predicate. * + * @param the type that the predicate queries * @param transformer the transformer to decorate * @return the predicate * @throws IllegalArgumentException if the transformer is null diff --git a/src/main/java/org/apache/commons/collections/functors/TruePredicate.java b/src/main/java/org/apache/commons/collections/functors/TruePredicate.java index 68203ba56..960b49e91 100644 --- a/src/main/java/org/apache/commons/collections/functors/TruePredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/TruePredicate.java @@ -37,6 +37,7 @@ public final class TruePredicate implements Predicate, Serializable { /** * Factory returning the singleton instance. * + * @param the type that the predicate queries * @return the singleton instance * @since 3.1 */ diff --git a/src/main/java/org/apache/commons/collections/functors/UniquePredicate.java b/src/main/java/org/apache/commons/collections/functors/UniquePredicate.java index db92d9c17..784aa81f3 100644 --- a/src/main/java/org/apache/commons/collections/functors/UniquePredicate.java +++ b/src/main/java/org/apache/commons/collections/functors/UniquePredicate.java @@ -40,11 +40,12 @@ public final class UniquePredicate implements Predicate, Serializable { /** * Factory to create the predicate. * + * @param the type that the predicate queries * @return the predicate * @throws IllegalArgumentException if the predicate is null */ - public static Predicate uniquePredicate() { - return new UniquePredicate(); + public static Predicate uniquePredicate() { + return new UniquePredicate(); } /**