public class MockValueBuilder extends Object implements org.apache.camel.Expression, org.apache.camel.Predicate
Constructor and Description |
---|
MockValueBuilder(org.apache.camel.Expression expression) |
Modifier and Type | Method and Description |
---|---|
MockValueBuilder |
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
|
MockValueBuilder |
convertTo(Class<?> type)
Converts the current value to the given type using the registered type converters
|
MockValueBuilder |
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() |
MockExpressionClause<org.apache.camel.Predicate> |
matches() |
boolean |
matches(org.apache.camel.Exchange exchange) |
org.apache.camel.Predicate |
matches(org.apache.camel.Expression expression) |
MockValueBuilder |
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 MockValueBuilder |
onNewValueBuilder(org.apache.camel.Expression exp) |
MockValueBuilder |
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
|
MockValueBuilder |
regexReplaceAll(String regex,
org.apache.camel.Expression replacement)
Replaces all occurrences of the regular expression with the given replacement
|
MockValueBuilder |
regexReplaceAll(String regex,
String replacement)
Replaces all occurrences of the regular expression with the given replacement
|
MockValueBuilder |
regexTokenize(String regex)
Tokenizes the string conversion of this expression using the given regular expression
|
MockValueBuilder |
sort(Comparator<?> comparator)
Sorts the current value using the given comparator.
|
org.apache.camel.Predicate |
startsWith(Object value) |
MockValueBuilder |
tokenize() |
MockValueBuilder |
tokenize(String token) |
MockValueBuilder |
tokenize(String token,
int group,
boolean skipFirst) |
MockValueBuilder |
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 matches(org.apache.camel.Expression expression)
public MockExpressionClause<org.apache.camel.Predicate> matches()
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 MockValueBuilder tokenize()
public MockValueBuilder tokenize(String token)
public MockValueBuilder tokenize(String token, int group, boolean skipFirst)
public MockValueBuilder tokenize(String token, String group, boolean skipFirst)
public MockValueBuilder regexTokenize(String regex)
public MockValueBuilder regexReplaceAll(String regex, String replacement)
public MockValueBuilder regexReplaceAll(String regex, org.apache.camel.Expression replacement)
public MockValueBuilder convertTo(Class<?> type)
type
- the type to convert the value topublic MockValueBuilder convertToString()
public MockValueBuilder append(Object value)
value
- the value or expression to appendpublic MockValueBuilder prepend(Object value)
value
- the value or expression to prependpublic MockValueBuilder sort(Comparator<?> comparator)
List
to
allow sorting using the comparator.comparator
- the comparator used by sortingpublic MockValueBuilder not()
protected org.apache.camel.Predicate onNewPredicate(org.apache.camel.Predicate predicate)
protected org.apache.camel.Expression asExpression(Object value)
protected MockValueBuilder onNewValueBuilder(org.apache.camel.Expression exp)
Apache Camel