org.apache.camel.builder
Class PredicateSupport<E extends Exchange>

java.lang.Object
  extended by org.apache.camel.builder.PredicateSupport<E>
All Implemented Interfaces:
Predicate<E>

public abstract class PredicateSupport<E extends Exchange>
extends Object
implements Predicate<E>

A useful base class for Predicate implementations

Version:
$Revision: 42232 $

Constructor Summary
PredicateSupport()
           
 
Method Summary
protected  String assertionFailureMessage(E exchange)
           
 void assertMatches(String text, E exchange)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Predicate
matches
 

Constructor Detail

PredicateSupport

public PredicateSupport()
Method Detail

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 message
exchange - the exchange to evaluate the expression on

assertionFailureMessage

protected String assertionFailureMessage(E exchange)


Copyright © 2008 IONA Open Source Community. All Rights Reserved.