Javadoc fixes for predicates.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1366175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-07-26 19:53:10 +00:00
parent b7327a42da
commit 30bbfaf6d6
15 changed files with 22 additions and 4 deletions

View File

@ -37,6 +37,7 @@ public final class FalsePredicate<T> implements Predicate<T>, Serializable {
/**
* Get a typed instance.
*
* @param <T> the type that the predicate queries
* @return the singleton instance
* @since 4.0
*/

View File

@ -38,6 +38,7 @@ public final class IdentityPredicate<T> implements Predicate<T>, Serializable {
/**
* Factory to create the identity predicate.
*
* @param <T> the type that the predicate queries
* @param object the object to compare to
* @return the predicate
* @throws IllegalArgumentException if the predicate is null

View File

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

View File

@ -37,6 +37,7 @@ public final class NotNullPredicate<T> implements Predicate<T>, Serializable {
/**
* Factory returning the singleton instance.
*
* @param <T> the type that the predicate queries
* @return the singleton instance
* @since 3.1
*/

View File

@ -37,6 +37,7 @@ public final class NotPredicate<T> implements Predicate<T>, PredicateDecorator<T
/**
* Factory to create the not predicate.
*
* @param <T> the type that the predicate queries
* @param predicate the predicate to decorate, not null
* @return the predicate
* @throws IllegalArgumentException if the predicate is null

View File

@ -38,6 +38,7 @@ public final class NullIsExceptionPredicate<T> implements Predicate<T>, Predicat
/**
* Factory to create the null exception predicate.
*
* @param <T> the type that the predicate queries
* @param predicate the predicate to decorate, not null
* @return the predicate
* @throws IllegalArgumentException if the predicate is null

View File

@ -37,6 +37,7 @@ public final class NullIsFalsePredicate<T> implements Predicate<T>, PredicateDec
/**
* Factory to create the null false predicate.
*
* @param <T> the type that the predicate queries
* @param predicate the predicate to decorate, not null
* @return the predicate
* @throws IllegalArgumentException if the predicate is null

View File

@ -37,6 +37,7 @@ public final class NullIsTruePredicate<T> implements Predicate<T>, PredicateDeco
/**
* Factory to create the null true predicate.
*
* @param <T> the type that the predicate queries
* @param predicate the predicate to decorate, not null
* @return the predicate
* @throws IllegalArgumentException if the predicate is null

View File

@ -37,6 +37,7 @@ public final class NullPredicate<T> implements Predicate<T>, Serializable {
/**
* Factory returning the singleton instance.
*
* @param <T> the type that the predicate queries
* @return the singleton instance
* @since 3.1
*/
@ -58,7 +59,7 @@ public final class NullPredicate<T> implements Predicate<T>, 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);
}

View File

@ -46,6 +46,7 @@ public final class OnePredicate<T> implements Predicate<T>, PredicateDecorator<T
* If the array is size zero, the predicate always returns false.
* If the array is size one, then that predicate is returned.
*
* @param <T> the type that the predicate queries
* @param predicates the predicates to check, cloned, not null
* @return the <code>any</code> predicate
* @throws IllegalArgumentException if the predicates array is null
@ -66,6 +67,7 @@ public final class OnePredicate<T> implements Predicate<T>, PredicateDecorator<T
/**
* Factory to create the predicate.
*
* @param <T> the type that the predicate queries
* @param predicates the predicates to check, cloned, not null
* @return the <code>one</code> predicate
* @throws IllegalArgumentException if the predicates array is null

View File

@ -39,6 +39,7 @@ public final class OrPredicate<T> implements Predicate<T>, PredicateDecorator<T>
/**
* Factory to create the predicate.
*
* @param <T> 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 <code>and</code> predicate

View File

@ -42,12 +42,14 @@ public final class TransformedPredicate<T> implements Predicate<T>, PredicateDec
/**
* Factory to create the predicate.
*
* @param <T> 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 <T> Predicate<T> transformedPredicate(Transformer<? super T, ? extends T> transformer, Predicate<? super T> predicate) {
public static <T> Predicate<T> transformedPredicate(Transformer<? super T, ? extends T> transformer,
Predicate<? super T> predicate) {
if (transformer == null) {
throw new IllegalArgumentException("The transformer to call must not be null");
}

View File

@ -39,6 +39,7 @@ public final class TransformerPredicate<T> implements Predicate<T>, Serializable
/**
* Factory to create the predicate.
*
* @param <T> the type that the predicate queries
* @param transformer the transformer to decorate
* @return the predicate
* @throws IllegalArgumentException if the transformer is null

View File

@ -37,6 +37,7 @@ public final class TruePredicate<T> implements Predicate<T>, Serializable {
/**
* Factory returning the singleton instance.
*
* @param <T> the type that the predicate queries
* @return the singleton instance
* @since 3.1
*/

View File

@ -40,11 +40,12 @@ public final class UniquePredicate<T> implements Predicate<T>, Serializable {
/**
* Factory to create the predicate.
*
* @param <T> the type that the predicate queries
* @return the predicate
* @throws IllegalArgumentException if the predicate is null
*/
public static <E> Predicate<E> uniquePredicate() {
return new UniquePredicate<E>();
public static <T> Predicate<T> uniquePredicate() {
return new UniquePredicate<T>();
}
/**