Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbehave.core.steps
Class ConvertedParameters

    java.lang.Object
      org.jbehave.core.steps.ConvertedParameters

All Implemented Interfaces:
  Parameters, Row

    public class ConvertedParameters

extends Object
implements Parameters

Implementation of Parameters that uses `ParameterConverters` to convert values.

Nested Class Summary
`static class` | `ConvertedParameters.ValueNotFound`

Constructor Summary
`ConvertedParameters(Map<String,String> values, ParameterConverters parameterConverters)` Creates an instance of ConvertedParameters with given values
`ConvertedParameters(Row row, ParameterConverters parameterConverters)` Creates an instance of ConvertedParameters from a Row which provides the values

Method Summary
`
`<T> T`
` | `valueAs(String name, Class<T> type)` Returns the value of a named parameter as a given type
`
`<T> T`
` | `valueAs(String name, Class<T> type, T defaultValue)` Returns the value of a named parameter as a given type while providing a default value if the name is not found
`Map<String,String>` | `values()` Returns the values as a Map, where the key is the column name and the value is the row value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConvertedParameters

    public ConvertedParameters(Row row,
                               ParameterConverters parameterConverters)

  Creates an instance of ConvertedParameters from a Row which provides the values

  Parameters:
    `row` - the Row to get the values from
    `parameterConverters` - the ParameterConverters used for conversion

### ConvertedParameters

    public ConvertedParameters(Map<String,String> values,
                               ParameterConverters parameterConverters)

  Creates an instance of ConvertedParameters with given values

  Parameters:
    `values` - the Map of values
    `parameterConverters` - the ParameterConverters used for conversion

Method Detail

### valueAs

    public <T> T valueAs(String name,
                         Class<T> type)

  Description copied from interface: `Parameters`
  Returns the value of a named parameter as a given type

  Specified by:
    `valueAs` in interface `Parameters`
  Parameters:
    `name` - the name of the parameter
    `type` - the Class of type to convert to
  Returns:
    The value of type

### valueAs

    public <T> T valueAs(String name,
                         Class<T> type,
                         T defaultValue)

  Description copied from interface: `Parameters`
  Returns the value of a named parameter as a given type while providing a default value if the name is not found

  Specified by:
    `valueAs` in interface `Parameters`
  Parameters:
    `name` - the name of the parameter
    `type` - Class of type to convert to
    `defaultValue` - the default value if the name is not found
  Returns:
    The value of type

### values

    public Map<String,String> values()

  Description copied from interface: `Row`
  Returns the values as a Map, where the key is the column name and the value is the row value.

  Specified by:
    `values` in interface `Row`
  Returns:
    The Map of values

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2013. All Rights Reserved.