org.encog.util

## Class ParamsHolder

- java.lang.Object
- - org.encog.util.ParamsHolder

-     public class ParamsHolder
      extends Object

  A class that can be used to parse parameters stored in a map. Allows the params to be accessed as various data types and to be validated.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParamsHolder(Map<String,String> theParams)` Construct the object.
    `ParamsHolder(Map<String,String> theParams, CSVFormat theFormat)` Construct the object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getBoolean(String name, boolean required, boolean defaultValue)` Get a param as a boolean.
    `double` | `getDouble(String name, boolean required, double defaultValue)` Get a param as a double.
    `int` | `getInt(String name, boolean required, int defaultValue)` Get a param as a integer.
    `Map<String,String>` | `getParams()`
    `String` | `getString(String name, boolean required, String defaultValue)` Get a param as a string.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ParamsHolder

          public ParamsHolder(Map<String,String> theParams,
                      CSVFormat theFormat)

      Construct the object. Allow the format to be specified.
      Parameters:
        `theParams` - The params to be used.
        `theFormat` - The format to be used.

    - #### ParamsHolder

          public ParamsHolder(Map<String,String> theParams)

      Construct the object. Allow the format to be specified.
      Parameters:
        `theParams` - The params to be used.

  - ### Method Detail

    - #### getParams

          public Map<String,String> getParams()

      Returns:
        the params

    - #### getString

          public String getString(String name,
                         boolean required,
                         String defaultValue)

      Get a param as a string.
      Parameters:
        `name` - The name of the string.
        `required` - True if this value is required.
        `defaultValue` - The default value.
      Returns:
        The value.

    - #### getInt

          public int getInt(String name,
                   boolean required,
                   int defaultValue)

      Get a param as a integer.
      Parameters:
        `name` - The name of the integer.
        `required` - True if this value is required.
        `defaultValue` - The default value.
      Returns:
        The value.

    - #### getDouble

          public double getDouble(String name,
                         boolean required,
                         double defaultValue)

      Get a param as a double.
      Parameters:
        `name` - The name of the double.
        `required` - True if this value is required.
        `defaultValue` - The default value.
      Returns:
        The value.

    - #### getBoolean

          public boolean getBoolean(String name,
                           boolean required,
                           boolean defaultValue)

      Get a param as a boolean.
      Parameters:
        `name` - The name of the double.
        `required` - True if this value is required.
        `defaultValue` - The default value.
      Returns:
        The value.

Copyright © 2014. All Rights Reserved.