org.apache.jackrabbit.commons.predicate
Class Predicates

java.lang.Object
  extended by org.apache.jackrabbit.commons.predicate.Predicates

public class Predicates
extends Object

Static utility class to help working with Predicates.

Since:
Apache Jackrabbit 2.2

Constructor Summary
Predicates()
           
 
Method Summary
static Predicate and(Predicate... predicates)
          Creates an AND predicate over all the given component predicates.
static Predicate not(Predicate predicate)
          Creates a NOT predicate for the given component predicate.
static Predicate or(Predicate... predicates)
          Creates an OR predicate over all the given component predicates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Predicates

public Predicates()
Method Detail

and

public static Predicate and(Predicate... predicates)
Creates an AND predicate over all the given component predicates. All the component predicates must evaluate to true for the AND predicate to do so.

Parameters:
predicates - component predicates
Returns:
AND predicate

or

public static Predicate or(Predicate... predicates)
Creates an OR predicate over all the given component predicates. At least one of the component predicates must evaluate to true for the OR predicate to do so.

Parameters:
predicates - component predicates
Returns:
OR predicate

not

public static Predicate not(Predicate predicate)
Creates a NOT predicate for the given component predicate. The NOT predicate evaluates to true when the component predicate doesn't, and vice versa.

Parameters:
predicate - component predicate
Returns:
NOT predicate


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.