|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.builder.ValueBuilder<E>
public class ValueBuilder<E extends Exchange>
A builder of expressions or predicates based on values.
Constructor Summary | |
---|---|
ValueBuilder(Expression<E> expression)
|
Method Summary | |
---|---|
ValueBuilder<E> |
append(Object value)
Appends the string evaluation of this expression with the given value |
protected Expression<E> |
asExpression(Object value)
|
Predicate<E> |
contains(Object value)
Create a predicate that the left hand expression contains the value of the right hand expression |
ValueBuilder<E> |
convertTo(Class type)
Converts the current value to the given type using the registered type converters |
ValueBuilder<E> |
convertToString()
Converts the current value a String using the registered type converters |
Object |
evaluate(E exchange)
Returns the value of the expression on the given exchange |
Expression<E> |
getExpression()
|
Predicate<E> |
isEqualTo(Object value)
|
Predicate<E> |
isGreaterThan(Object value)
|
Predicate<E> |
isGreaterThanOrEqualTo(Object value)
|
Predicate<E> |
isInstanceOf(Class type)
|
Predicate<E> |
isLessThan(Object value)
|
Predicate<E> |
isLessThanOrEqualTo(Object value)
|
Predicate<E> |
isNotEqualTo(Object value)
|
Predicate<E> |
isNotNull()
|
Predicate<E> |
isNull()
|
Predicate<E> |
matchesRegex(String regex)
Deprecated. use regex(String) . Will be removed in Camel 2.0 |
protected Predicate<E> |
onNewPredicate(Predicate<E> predicate)
A strategy method to allow derived classes to deal with the newly created predicate in different ways |
Predicate<E> |
regex(String regex)
Creates a predicate which is true if this expression matches the given regular expression |
ValueBuilder<E> |
regexReplaceAll(String regex,
Expression<E> replacement)
Replaces all occurrences of the regular expression with the given replacement |
ValueBuilder<E> |
regexReplaceAll(String regex,
String replacement)
Replaces all occurrences of the regular expression with the given replacement |
ValueBuilder<E> |
regexTokenize(String regex)
Tokenizes the string conversion of this expression using the given regular expression |
ValueBuilder<E> |
tokenize()
|
ValueBuilder<E> |
tokenize(String token)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValueBuilder(Expression<E> expression)
Method Detail |
---|
public Object evaluate(E exchange)
Expression
evaluate
in interface Expression<E extends Exchange>
exchange
- the message exchange on which to evaluate the expression
public Expression<E> getExpression()
public String toString()
toString
in class Object
public Predicate<E> isNotEqualTo(Object value)
public Predicate<E> isEqualTo(Object value)
public Predicate<E> isLessThan(Object value)
public Predicate<E> isLessThanOrEqualTo(Object value)
public Predicate<E> isGreaterThan(Object value)
public Predicate<E> isGreaterThanOrEqualTo(Object value)
public Predicate<E> isInstanceOf(Class type)
public Predicate<E> matchesRegex(String regex)
regex(String)
. Will be removed in Camel 2.0
public Predicate<E> isNull()
public Predicate<E> isNotNull()
public Predicate<E> contains(Object value)
value
- the element which is compared to be contained within this
expression
public Predicate<E> regex(String regex)
regex
- the regular expression to match
public ValueBuilder<E> tokenize()
public ValueBuilder<E> tokenize(String token)
public ValueBuilder<E> regexTokenize(String regex)
public ValueBuilder<E> regexReplaceAll(String regex, String replacement)
public ValueBuilder<E> regexReplaceAll(String regex, Expression<E> replacement)
public ValueBuilder<E> convertTo(Class type)
type
- the type to convert the value to
public ValueBuilder<E> convertToString()
public ValueBuilder<E> append(Object value)
value
- the value or expression to append
protected Predicate<E> onNewPredicate(Predicate<E> predicate)
protected Expression<E> asExpression(Object value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |