org.apache.camel.builder
Class BinaryPredicateSupport

java.lang.Object
  extended by org.apache.camel.builder.BinaryPredicateSupport
All Implemented Interfaces:
Predicate

public abstract class BinaryPredicateSupport
extends Object
implements Predicate

A useful base class for Predicate implementations

Version:
$Revision: 766032 $

Constructor Summary
protected BinaryPredicateSupport(Expression left, Expression right)
           
 
Method Summary
protected  String assertionFailureMessage(Exchange exchange, Object leftValue, Object rightValue)
           
 void assertMatches(String text, Exchange exchange)
           
protected abstract  String getOperationText()
           
 boolean matches(Exchange exchange)
          Evaluates the predicate on the message exchange and returns true if this exchange matches the predicate
protected abstract  boolean matches(Exchange exchange, Object leftValue, Object rightValue)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryPredicateSupport

protected BinaryPredicateSupport(Expression left,
                                 Expression right)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

matches

public boolean matches(Exchange exchange)
Description copied from interface: Predicate
Evaluates the predicate on the message exchange and returns true if this exchange matches the predicate

Specified by:
matches in interface Predicate
Parameters:
exchange - the message exchange
Returns:
true if the predicate matches

assertMatches

public void assertMatches(String text,
                          Exchange exchange)

matches

protected abstract boolean matches(Exchange exchange,
                                   Object leftValue,
                                   Object rightValue)

getOperationText

protected abstract String getOperationText()

assertionFailureMessage

protected String assertionFailureMessage(Exchange exchange,
                                         Object leftValue,
                                         Object rightValue)


Apache CAMEL