public class StringFunction extends DefaultCondition<java.lang.String>
It contains a DslField to get the value from the model, a StringFunctionMetadata to describe this node, and a
BiFunction to take the value from the model and return an optional value.
function, metadata| Constructor and Description |
|---|
StringFunction(DslField<java.lang.String> field) |
StringFunction(PredicateMetadata metadata,
java.util.function.BiFunction<FieldModel,Context,java.util.Optional<java.lang.String>> value) |
| Modifier and Type | Method and Description |
|---|---|
StepCondition |
contains(java.lang.String value)
Returns a condition checking if the node value contains the given value.
|
StepCondition |
contains(StringFunction value)
Returns a condition checking if the node value contains the given value.
|
StepCondition |
endsWith(java.lang.String value)
Returns a condition checking if the node value ends with the given value.
|
IntegerFunction |
length()
Returns an integer condition that returns the node value length.
|
StepCondition |
matches(java.lang.String value)
Returns a condition checking if the node value matches the given value.
|
IntegerFunction |
parseInt()
Returns an integer condition that returns the node value as an integer.
|
StepCondition |
startsWith(java.lang.String value)
Returns a condition checking if the node value starts with the given value.
|
allMatch, allMatch, allMatch, anyMatch, anyMatch, eq, eq, eq, isNotNull, isNull, map, mapToInt, mapToString, mapUsing, noneMatch, noneMatch, noneMatch, notEq, notEq, notEq, position, tagsgetFunction, getMetadata, readable, value, valueModelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisUsing, markdown, markdown, readablepublic StringFunction(DslField<java.lang.String> field)
public StringFunction(PredicateMetadata metadata, java.util.function.BiFunction<FieldModel,Context,java.util.Optional<java.lang.String>> value)
public final StepCondition contains(java.lang.String value)
value - the valuepublic final StepCondition contains(StringFunction value)
value - another StringConditionpublic final StepCondition matches(java.lang.String value)
value - the valuepublic final StepCondition startsWith(java.lang.String value)
value - the valuepublic final StepCondition endsWith(java.lang.String value)
value - the valuepublic IntegerFunction length()
public IntegerFunction parseInt()