Package org.jbehave.core.steps
Class ConvertedParameters
java.lang.Object
org.jbehave.core.steps.ConvertedParameters
- All Implemented Interfaces:
Parameters,Row
Implementation of Parameters that uses
ParameterConverters to convert
values.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionConvertedParameters(Map<String, String> values, ParameterConverters parameterConverters) Creates an instance of ConvertedParameters with given valuesConvertedParameters(Row row, ParameterConverters parameterConverters) Creates an instance of ConvertedParameters from a Row which provides the values -
Method Summary
Modifier and TypeMethodDescription<T> TConverts the parameters object to the specified type<T> TMaps parameters fields to the fields of specified type<T> TMaps parameters fields to the fields of specified type<T> TReturns the value of a named parameter as a given type<T> TReturns the value of a named parameter as a given type while providing a default value if the name is not foundvalues()Returns the values as a Map, where the key is the column name and the value is the row value.
-
Constructor Details
-
ConvertedParameters
Creates an instance of ConvertedParameters from a Row which provides the values- Parameters:
row- the Row to get the values fromparameterConverters- the ParameterConverters used for conversion
-
ConvertedParameters
Creates an instance of ConvertedParameters with given values- Parameters:
values- the Map<String,String> of valuesparameterConverters- the ParameterConverters used for conversion
-
-
Method Details
-
as
Description copied from interface:ParametersConverts the parameters object to the specified type- Specified by:
asin interfaceParameters- Parameters:
type- the Type or Class of type <T> to convert to- Returns:
- The value of type <T>
-
valueAs
Description copied from interface:ParametersReturns the value of a named parameter as a given type- Specified by:
valueAsin interfaceParameters- Parameters:
name- the name of the parametertype- the Type or Class of type <T> to convert to- Returns:
- The value of type <T>
-
valueAs
Description copied from interface:ParametersReturns the value of a named parameter as a given type while providing a default value if the name is not found- Specified by:
valueAsin interfaceParameters- Parameters:
name- the name of the parametertype- Type or Class of type <T> to convert todefaultValue- the default value if the name is not found- Returns:
- The value of type <T>
-
mapTo
Description copied from interface:ParametersMaps parameters fields to the fields of specified type- Specified by:
mapToin interfaceParameters- Parameters:
type- The target type- Returns:
- The object of type <T>
-
mapTo
Description copied from interface:ParametersMaps parameters fields to the fields of specified type- Specified by:
mapToin interfaceParameters- Parameters:
type- The target typefieldNameMapping- The field mapping between parameters and target type fields- Returns:
- The object of type <T>
-
values
Description copied from interface:RowReturns the values as a Map, where the key is the column name and the value is the row value.
-