| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Parameters |
|
| 1.0;1 |
| 1 | package org.jbehave.core.steps; | |
| 2 | ||
| 3 | /** | |
| 4 | * Provides parameter values as given types | |
| 5 | */ | |
| 6 | public interface Parameters extends Row { | |
| 7 | ||
| 8 | /** | |
| 9 | * Returns the value of a named parameter as a given type | |
| 10 | * | |
| 11 | * @param type the Class of type <T> to convert to | |
| 12 | * @param name the name of the parameter | |
| 13 | * @return The value of type <T> | |
| 14 | */ | |
| 15 | <T> T valueAs(String name, Class<T> type); | |
| 16 | ||
| 17 | /** | |
| 18 | * Returns the value of a named parameter as a given type while providing a | |
| 19 | * default value if the name is not found | |
| 20 | * | |
| 21 | * @param type Class of type <T> to convert to | |
| 22 | * @param name the name of the parameter | |
| 23 | * @param defaultValue the default value if the name is not found | |
| 24 | * @return The value of type <T> | |
| 25 | */ | |
| 26 | <T> T valueAs(String name, Class<T> type, T defaultValue); | |
| 27 | ||
| 28 | } |