public class ValueBuilder extends Object implements org.apache.camel.Expression, org.apache.camel.Predicate
Constructor and Description |
---|
ValueBuilder(org.apache.camel.Expression expression) |
Modifier and Type | Method and Description |
---|---|
ValueBuilder |
append(Object value)
Appends the string evaluation of this expression with the given value
|
protected org.apache.camel.Expression |
asExpression(Object value) |
org.apache.camel.Predicate |
contains(Object value)
Create a predicate that the left hand expression contains the value of the right hand expression
|
ValueBuilder |
convertTo(Class<?> type)
Converts the current value to the given type using the registered type converters
|
ValueBuilder |
convertToString()
Converts the current value to a String using the registered type converters
|
org.apache.camel.Predicate |
endsWith(Object value) |
<T> T |
evaluate(org.apache.camel.Exchange exchange,
Class<T> type) |
org.apache.camel.Expression |
getExpression() |
org.apache.camel.Predicate |
in(Object... values) |
org.apache.camel.Predicate |
in(org.apache.camel.Predicate... predicates) |
void |
init(org.apache.camel.CamelContext context) |
org.apache.camel.Predicate |
isEqualTo(Object value) |
org.apache.camel.Predicate |
isEqualToIgnoreCase(Object value) |
org.apache.camel.Predicate |
isGreaterThan(Object value) |
org.apache.camel.Predicate |
isGreaterThanOrEqualTo(Object value) |
org.apache.camel.Predicate |
isInstanceOf(Class<?> type) |
org.apache.camel.Predicate |
isLessThan(Object value) |
org.apache.camel.Predicate |
isLessThanOrEqualTo(Object value) |
org.apache.camel.Predicate |
isNotEqualTo(Object value) |
org.apache.camel.Predicate |
isNotNull() |
org.apache.camel.Predicate |
isNull() |
boolean |
matches(org.apache.camel.Exchange exchange) |
ValueBuilder |
not()
Negates the built expression.
|
org.apache.camel.Predicate |
not(org.apache.camel.Predicate predicate) |
protected org.apache.camel.Predicate |
onNewPredicate(org.apache.camel.Predicate predicate)
A strategy method to allow derived classes to deal with the newly created predicate in different ways
|
protected ValueBuilder |
onNewValueBuilder(org.apache.camel.Expression exp) |
ValueBuilder |
prepend(Object value)
Prepends the string evaluation of this expression with the given value
|
org.apache.camel.Predicate |
regex(String regex)
Creates a predicate which is true if this expression matches the given regular expression
|
ValueBuilder |
regexReplaceAll(String regex,
org.apache.camel.Expression replacement)
Replaces all occurrences of the regular expression with the given replacement
|
ValueBuilder |
regexReplaceAll(String regex,
String replacement)
Replaces all occurrences of the regular expression with the given replacement
|
ValueBuilder |
regexTokenize(String regex)
Tokenizes the string conversion of this expression using the given regular expression
|
ValueBuilder |
sort(Comparator<?> comparator)
Sorts the current value using the given comparator.
|
org.apache.camel.Predicate |
startsWith(Object value) |
ValueBuilder |
tokenize() |
ValueBuilder |
tokenize(String token) |
ValueBuilder |
tokenize(String token,
int group,
boolean skipFirst) |
ValueBuilder |
tokenize(String token,
String group,
boolean skipFirst) |
String |
toString() |
public void init(org.apache.camel.CamelContext context)
init
in interface org.apache.camel.Expression
init
in interface org.apache.camel.Predicate
public <T> T evaluate(org.apache.camel.Exchange exchange, Class<T> type)
evaluate
in interface org.apache.camel.Expression
public boolean matches(org.apache.camel.Exchange exchange)
matches
in interface org.apache.camel.Predicate
public org.apache.camel.Expression getExpression()
public org.apache.camel.Predicate isNotEqualTo(Object value)
public org.apache.camel.Predicate isEqualTo(Object value)
public org.apache.camel.Predicate isEqualToIgnoreCase(Object value)
public org.apache.camel.Predicate isLessThan(Object value)
public org.apache.camel.Predicate isLessThanOrEqualTo(Object value)
public org.apache.camel.Predicate isGreaterThan(Object value)
public org.apache.camel.Predicate isGreaterThanOrEqualTo(Object value)
public org.apache.camel.Predicate isInstanceOf(Class<?> type)
public org.apache.camel.Predicate isNull()
public org.apache.camel.Predicate isNotNull()
public org.apache.camel.Predicate not(org.apache.camel.Predicate predicate)
public org.apache.camel.Predicate in(Object... values)
public org.apache.camel.Predicate in(org.apache.camel.Predicate... predicates)
public org.apache.camel.Predicate startsWith(Object value)
public org.apache.camel.Predicate endsWith(Object value)
public org.apache.camel.Predicate contains(Object value)
value
- the element which is compared to be contained within this expressionpublic org.apache.camel.Predicate regex(String regex)
regex
- the regular expression to matchpublic ValueBuilder tokenize()
public ValueBuilder tokenize(String token)
public ValueBuilder tokenize(String token, int group, boolean skipFirst)
public ValueBuilder tokenize(String token, String group, boolean skipFirst)
public ValueBuilder regexTokenize(String regex)
public ValueBuilder regexReplaceAll(String regex, String replacement)
public ValueBuilder regexReplaceAll(String regex, org.apache.camel.Expression replacement)
public ValueBuilder convertTo(Class<?> type)
type
- the type to convert the value topublic ValueBuilder convertToString()
public ValueBuilder append(Object value)
value
- the value or expression to appendpublic ValueBuilder prepend(Object value)
value
- the value or expression to prependpublic ValueBuilder sort(Comparator<?> comparator)
List
to
allow sorting using the comparator.comparator
- the comparator used by sortingpublic ValueBuilder not()
protected org.apache.camel.Predicate onNewPredicate(org.apache.camel.Predicate predicate)
protected org.apache.camel.Expression asExpression(Object value)
protected ValueBuilder onNewValueBuilder(org.apache.camel.Expression exp)
Apache Camel