org.apache.camel.builder
Class PredicateBuilder

java.lang.Object
  extended by org.apache.camel.builder.PredicateBuilder

public class PredicateBuilder
extends Object

A helper class for working with predicates

Version:
$Revision: 520261 $

Constructor Summary
PredicateBuilder()
           
 
Method Summary
static
<E extends Exchange>
Predicate<E>
and(Predicate<E> left, Predicate<E> right)
          A helper method to combine multiple predicates by a logical AND
static
<E extends Exchange>
Predicate<E>
contains(Expression<E> left, Expression<E> right)
           
static
<E extends Exchange>
Predicate<E>
isEqualTo(Expression<E> left, Expression<E> right)
           
static
<E extends Exchange>
Predicate<E>
isGreaterThan(Expression<E> left, Expression<E> right)
           
static
<E extends Exchange>
Predicate<E>
isGreaterThanOrEqualTo(Expression<E> left, Expression<E> right)
           
static
<E extends Exchange>
Predicate<E>
isInstanceOf(Expression<E> expression, Class type)
           
static
<E extends Exchange>
Predicate<E>
isLessThan(Expression<E> left, Expression<E> right)
           
static
<E extends Exchange>
Predicate<E>
isLessThanOrEqualTo(Expression<E> left, Expression<E> right)
           
static
<E extends Exchange>
Predicate<E>
isNotEqualTo(Expression<E> left, Expression<E> right)
           
static
<E extends Exchange>
Predicate<E>
isNotNull(Expression<E> expression)
           
static
<E extends Exchange>
Predicate<E>
isNull(Expression<E> expression)
           
static
<E extends Exchange>
Predicate<E>
or(Predicate<E> left, Predicate<E> right)
          A helper method to combine multiple predicates by a logical OR
static
<E extends Exchange>
Predicate<E>
regex(Expression<E> expression, Pattern pattern)
          Returns a predicate which is true if the expression matches the given regular expression
static
<E extends Exchange>
Predicate<E>
regex(Expression<E> expression, String regex)
          Returns a predicate which is true if the expression matches the given regular expression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredicateBuilder

public PredicateBuilder()
Method Detail

and

public static <E extends Exchange> Predicate<E> and(Predicate<E> left,
                                                    Predicate<E> right)
A helper method to combine multiple predicates by a logical AND


or

public static <E extends Exchange> Predicate<E> or(Predicate<E> left,
                                                   Predicate<E> right)
A helper method to combine multiple predicates by a logical OR


isEqualTo

public static <E extends Exchange> Predicate<E> isEqualTo(Expression<E> left,
                                                          Expression<E> right)

isNotEqualTo

public static <E extends Exchange> Predicate<E> isNotEqualTo(Expression<E> left,
                                                             Expression<E> right)

isLessThan

public static <E extends Exchange> Predicate<E> isLessThan(Expression<E> left,
                                                           Expression<E> right)

isLessThanOrEqualTo

public static <E extends Exchange> Predicate<E> isLessThanOrEqualTo(Expression<E> left,
                                                                    Expression<E> right)

isGreaterThan

public static <E extends Exchange> Predicate<E> isGreaterThan(Expression<E> left,
                                                              Expression<E> right)

isGreaterThanOrEqualTo

public static <E extends Exchange> Predicate<E> isGreaterThanOrEqualTo(Expression<E> left,
                                                                       Expression<E> right)

contains

public static <E extends Exchange> Predicate<E> contains(Expression<E> left,
                                                         Expression<E> right)

isNull

public static <E extends Exchange> Predicate<E> isNull(Expression<E> expression)

isNotNull

public static <E extends Exchange> Predicate<E> isNotNull(Expression<E> expression)

isInstanceOf

public static <E extends Exchange> Predicate<E> isInstanceOf(Expression<E> expression,
                                                             Class type)

regex

public static <E extends Exchange> Predicate<E> regex(Expression<E> expression,
                                                      String regex)
Returns a predicate which is true if the expression matches the given regular expression

Parameters:
expression - the expression to evaluate
regex - the regular expression to match against
Returns:
a new predicate

regex

public static <E extends Exchange> Predicate<E> regex(Expression<E> expression,
                                                      Pattern pattern)
Returns a predicate which is true if the expression matches the given regular expression

Parameters:
expression - the expression to evaluate
pattern - the regular expression to match against
Returns:
a new predicate


Copyright © 2007 Apache Software Foundation. All Rights Reserved.