Package io.cucumber.cucumberexpressions
Interface Transformer<T>
-
- Type Parameters:
T- the type to transform to.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Transformer<T>
Transformer for a @ParameterTypewith zero or one capture groups.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Ttransform(String arg)Transforms a string into to an object.
-
-
-
Method Detail
-
transform
T transform(String arg) throws Throwable
Transforms a string into to an object. The string is either taken from the sole capture group or matches the whole expression. Nested capture groups are ignored.If the capture group is optional
argmay be null.- Parameters:
arg- the value of the single capture group- Returns:
- the transformed object
- Throws:
Throwable- if transformation failed
-
-