org.apache.camel.builder
Class BinaryPredicateSupport<E extends Exchange>
java.lang.Object
org.apache.camel.builder.BinaryPredicateSupport<E>
- All Implemented Interfaces:
- Predicate<E>
public abstract class BinaryPredicateSupport<E extends Exchange>
- extends Object
- implements Predicate<E>
A useful base class for Predicate
implementations
- Version:
- $Revision: 42232 $
BinaryPredicateSupport
protected BinaryPredicateSupport(Expression<E> left,
Expression<E> right)
toString
public String toString()
- Overrides:
toString
in class Object
matches
public boolean matches(E 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<E extends Exchange>
- Parameters:
exchange
- the message exchange
- Returns:
- true if the predicate matches
assertMatches
public void assertMatches(String text,
E exchange)
- Description copied from interface:
Predicate
- Allows this predicate to be used nicely in testing to generate a nicely
formatted exception and message if this predicate does not match for the
given exchange.
- Specified by:
assertMatches
in interface Predicate<E extends Exchange>
- Parameters:
text
- the description to use in the exception messageexchange
- the exchange to evaluate the expression on
matches
protected abstract boolean matches(E exchange,
Object leftValue,
Object rightValue)
getOperationText
protected abstract String getOperationText()
assertionFailureMessage
protected String assertionFailureMessage(E exchange,
Object leftValue,
Object rightValue)
Copyright © 2008 IONA Open Source Community. All Rights Reserved.