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 Type Method Description boolean
canConvertFrom(Type type)
Returntrue
if the converter can convert from the desired target type.boolean
canConvertTo(Type type)
Returntrue
if the converter can convert to the desired target type.T
convertValue(S value, Type type)
Convert the value from one type to another, for example from aboolean
to aString
.Type
getSourceType()
Type
getTargetType()
-
-
-
Method Detail
-
canConvertTo
boolean canConvertTo(Type type)
Returntrue
if the converter can convert to the desired target type.- Parameters:
type
- the type descriptor that describes the requested result type- Returns:
true
if that conversion can be performed
-
canConvertFrom
boolean canConvertFrom(Type type)
Returntrue
if the converter can convert from the desired target type.- Parameters:
type
- the type descriptor that describes the source type- Returns:
true
if that conversion can be performed
-
convertValue
T convertValue(S value, Type type)
Convert the value from one type to another, for example from aboolean
to 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()
-
-