Package org.jbehave.core.steps
Class ParameterConverters.StringListConverter
java.lang.Object
org.jbehave.core.steps.ParameterConverters.AbstractParameterConverter<String,T>
org.jbehave.core.steps.ParameterConverters.FromStringParameterConverter<List<T>>
org.jbehave.core.steps.ParameterConverters.AbstractListParameterConverter<String>
org.jbehave.core.steps.ParameterConverters.StringListConverter
- All Implemented Interfaces:
ParameterConverters.ParameterConverter<String,
List<String>>
- Enclosing class:
- ParameterConverters
public static class ParameterConverters.StringListConverter
extends ParameterConverters.AbstractListParameterConverter<String>
Converts value to list of String. Splits value to a list, using an
injectable value separator (defaults to ",") and trimming each element of
the list.
-
Constructor Summary
ConstructorDescriptionStringListConverter
(String valueSeparator) Creates converter for a list of strings using the value separator -
Method Summary
Modifier and TypeMethodDescriptionconvertValue
(String value, Type type) Convert the value from one type to another, for example from aboolean
to aString
.Methods inherited from class org.jbehave.core.steps.ParameterConverters.AbstractListParameterConverter
canConvertTo
Methods inherited from class org.jbehave.core.steps.ParameterConverters.AbstractParameterConverter
canConvertFrom, getSourceType, getTargetType
-
Constructor Details
-
StringListConverter
public StringListConverter() -
StringListConverter
Creates converter for a list of strings using the value separator- Parameters:
valueSeparator
- A regexp to use as list separator
-
-
Method Details
-
convertValue
Description copied from interface:ParameterConverters.ParameterConverter
Convert the value from one type to another, for example from aboolean
to aString
.- Specified by:
convertValue
in interfaceParameterConverters.ParameterConverter<String,
List<String>> - Overrides:
convertValue
in classParameterConverters.AbstractListParameterConverter<String>
- Parameters:
value
- the value to be convertedtype
- the type descriptor that supplies extra information about the requested result type- Returns:
- the converted value
-