⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.functors

Class NonePredicate

java.lang.Object
|
+--org.apache.commons.collections.functors.NonePredicate

All Implemented Interfaces:
Predicate, Serializable


public final class NonePredicate
extends java.lang.Object
implements Predicate, Serializable

Predicate implementation that returns true if none of the predicates return true.
Since:
Commons Collections 3.0
Author:
Stephen Colebourne

Constructor Summary

NonePredicate(Predicate[] predicates)

Constructor that performs no validation.

Method Summary

boolean

evaluate(Object object)

Return the predicate result.

static Predicate

getInstance(Predicate[] predicates)

Factory to create the predicate.

static Predicate

getInstance(Collection predicates)

Factory to create the predicate.

Constructor Details

NonePredicate

public NonePredicate(Predicate[] predicates)

Constructor that performs no validation. Use getInstance if you want that.

Parameters:
predicates - the predicates to check, not cloned, not null

Method Details

evaluate

public boolean evaluate(Object object)

Return the predicate result.

Parameters:
object

getInstance

public static Predicate getInstance(Collection predicates)

Factory to create the predicate.

Parameters:
predicates - the predicates to check, cloned, not null
Returns:
the one predicate
Throws:
- if the predicates array is null
- if any predicate in the array is null
- if the predicates array has less than 2 elements

getInstance

public static Predicate getInstance(Predicate[] predicates)

Factory to create the predicate.

Parameters:
predicates - the predicates to check, cloned, not null
Returns:
the any predicate
Throws:
- if the predicates array is null
- if the predicates array has less than 2 elements
- if any predicate in the array is null