org.apache.camel.util
Class PredicateToExpressionAdapter

java.lang.Object
  extended by org.apache.camel.util.PredicateToExpressionAdapter
All Implemented Interfaces:
Expression

public final class PredicateToExpressionAdapter
extends Object
implements Expression


Constructor Summary
PredicateToExpressionAdapter(Predicate predicate)
           
 
Method Summary
<T> T
evaluate(Exchange exchange, Class<T> type)
          Returns the value of the expression on the given exchange
static Expression toExpression(Predicate predicate)
          Converts the given predicate into an Expression
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PredicateToExpressionAdapter

public PredicateToExpressionAdapter(Predicate predicate)
Method Detail

evaluate

public <T> T evaluate(Exchange exchange,
                      Class<T> type)
Description copied from interface: Expression
Returns the value of the expression on the given exchange

Specified by:
evaluate in interface Expression
Parameters:
exchange - the message exchange on which to evaluate the expression
type - the expected type of the evaluation result
Returns:
the value of the expression

toString

public String toString()
Overrides:
toString in class Object

toExpression

public static Expression toExpression(Predicate predicate)
Converts the given predicate into an Expression



Apache Camel