|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.builder.ValueBuilder
public class ValueBuilder
A builder of expressions or predicates based on values.
Constructor Summary | |
---|---|
ValueBuilder(Expression expression)
|
Method Summary | ||
---|---|---|
ValueBuilder |
append(Object value)
Appends the string evaluation of this expression with the given value |
|
protected Expression |
asExpression(Object value)
|
|
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 |
|
Predicate |
endsWith(Object value)
|
|
|
evaluate(Exchange exchange,
Class<T> type)
Returns the value of the expression on the given exchange |
|
Expression |
getExpression()
|
|
Predicate |
in(Object... values)
|
|
Predicate |
in(Predicate... predicates)
|
|
Predicate |
isEqualTo(Object value)
|
|
Predicate |
isGreaterThan(Object value)
|
|
Predicate |
isGreaterThanOrEqualTo(Object value)
|
|
Predicate |
isInstanceOf(Class<?> type)
|
|
Predicate |
isLessThan(Object value)
|
|
Predicate |
isLessThanOrEqualTo(Object value)
|
|
Predicate |
isNotEqualTo(Object value)
|
|
Predicate |
isNotNull()
|
|
Predicate |
isNull()
|
|
ExpressionClause<Predicate> |
matches()
|
|
Predicate |
matches(Expression expression)
|
|
ValueBuilder |
not()
Negates the built expression. |
|
Predicate |
not(Predicate predicate)
|
|
protected Predicate |
onNewPredicate(Predicate predicate)
A strategy method to allow derived classes to deal with the newly created predicate in different ways |
|
ValueBuilder |
prepend(Object value)
Prepends the string evaluation of this expression with the given value |
|
Predicate |
regex(String regex)
Creates a predicate which is true if this expression matches the given regular expression |
|
ValueBuilder |
regexReplaceAll(String regex,
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. |
|
Predicate |
startsWith(Object value)
|
|
ValueBuilder |
tokenize()
|
|
ValueBuilder |
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 expression)
Method Detail |
---|
public <T> T evaluate(Exchange exchange, Class<T> type)
Expression
evaluate
in interface Expression
exchange
- the message exchange on which to evaluate the expressiontype
- the expected type of the evaluation result
public Expression getExpression()
public String toString()
toString
in class Object
public Predicate matches(Expression expression)
public ExpressionClause<Predicate> matches()
public Predicate isNotEqualTo(Object value)
public Predicate isEqualTo(Object value)
public Predicate isLessThan(Object value)
public Predicate isLessThanOrEqualTo(Object value)
public Predicate isGreaterThan(Object value)
public Predicate isGreaterThanOrEqualTo(Object value)
public Predicate isInstanceOf(Class<?> type)
public Predicate isNull()
public Predicate isNotNull()
public Predicate not(Predicate predicate)
public Predicate in(Object... values)
public Predicate in(Predicate... predicates)
public Predicate startsWith(Object value)
public Predicate endsWith(Object value)
public Predicate contains(Object value)
value
- the element which is compared to be contained within this
expression
public Predicate regex(String regex)
regex
- the regular expression to match
public ValueBuilder tokenize()
public ValueBuilder tokenize(String token)
public ValueBuilder regexTokenize(String regex)
public ValueBuilder regexReplaceAll(String regex, String replacement)
public ValueBuilder regexReplaceAll(String regex, Expression replacement)
public ValueBuilder convertTo(Class<?> type)
type
- the type to convert the value to
public ValueBuilder convertToString()
public ValueBuilder append(Object value)
value
- the value or expression to append
public ValueBuilder prepend(Object value)
value
- the value or expression to prepend
public ValueBuilder sort(Comparator<?> comparator)
List
to allow sorting using the comparator.
comparator
- the comparator used by sorting
public ValueBuilder not()
protected Predicate onNewPredicate(Predicate predicate)
protected Expression asExpression(Object value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |