Package org.jbehave.core.steps
Interface ParameterConverters.ParameterConverter<S,T>
- Type Parameters:
T- the target converted outputS- the source input value
- All Known Implementing Classes:
ParameterConverters.AbstractListParameterConverter,ParameterConverters.AbstractParameterConverter,ParameterConverters.BooleanConverter,ParameterConverters.BooleanListConverter,ParameterConverters.DateConverter,ParameterConverters.EnumConverter,ParameterConverters.EnumListConverter,ParameterConverters.ExamplesTableConverter,ParameterConverters.ExamplesTableParametersConverter,ParameterConverters.FluentEnumConverter,ParameterConverters.FromStringParameterConverter,ParameterConverters.FunctionalParameterConverter,ParameterConverters.JsonConverter,ParameterConverters.MethodReturningConverter,ParameterConverters.NumberConverter,ParameterConverters.NumberListConverter,ParameterConverters.StringConverter,ParameterConverters.StringListConverter
- Enclosing class:
- ParameterConverters
public static interface ParameterConverters.ParameterConverter<S,T>
A parameter converter for generic type of source input and target output.
The converters can be chained to allow for the target of one converter
can be used as the source for another.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvertFrom(Type type) Returntrueif the converter can convert from the desired target type.booleancanConvertTo(Type type) Returntrueif the converter can convert to the desired target type.convertValue(S value, Type type) Convert the value from one type to another, for example from abooleanto aString.
-
Method Details
-
canConvertTo
Returntrueif the converter can convert to the desired target type.- Parameters:
type- the type descriptor that describes the requested result type- Returns:
trueif that conversion can be performed
-
canConvertFrom
Returntrueif the converter can convert from the desired target type.- Parameters:
type- the type descriptor that describes the source type- Returns:
trueif that conversion can be performed
-
convertValue
Convert the value from one type to another, for example from abooleanto aString.- Parameters:
value- the value to be convertedtype- the type descriptor that supplies extra information about the requested result type- Returns:
- the converted value
-
getSourceType
Type getSourceType() -
getTargetType
Type getTargetType()
-