com.harukizaemon.simian

## Class Options

- java.lang.Object
- - com.harukizaemon.simian.Options

-     public final class Options
      extends java.lang.Object

  Encapsulates all checking options.
  Author:
    Simon Harris

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_THRESHOLD` The default minimum number of lines that are considered significant.
    `static int` | `MINIMUM_THRESHOLD` The smallest legal value for threshold.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Options()` Default constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears the options.
    `boolean` | `equals(java.lang.Object object)`
    `java.lang.Object` | `getOption(Option option)` Obtains the value of a specified option.
    `java.util.Map` | `getOptions()` Obtains the value of all options that have been set/enabled.
    `int` | `getThreshold()` Obtain the value of the `Option.THRESHOLD` option.
    `int` | `hashCode()`
    `boolean` | `hasOption(Option option)` Determines if an option has been set or enabled.
    `void` | `setOption(Option option, boolean enable)` Enables/disables an option.
    `void` | `setOption(Option option, java.lang.Object value)` Sets the value of a specified option.
    `void` | `setThreshold(int threshold)` Sets the value of the `Option.THRESHOLD` option.
    `java.lang.String` | `toString()`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### MINIMUM_THRESHOLD

          public static final int MINIMUM_THRESHOLD

      The smallest legal value for threshold.
      See Also:
        Constant Field Values

    - #### DEFAULT_THRESHOLD

          public static final int DEFAULT_THRESHOLD

      The default minimum number of lines that are considered significant.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Options

          public Options()

      Default constructor.

  - ### Method Detail

    - #### clear

          public void clear()

      Clears the options.

    - #### getThreshold

          public int getThreshold()

      Obtain the value of the `Option.THRESHOLD` option.
      Returns:
        The minimum number of lines considered a match.

    - #### setThreshold

          public void setThreshold(int threshold)

      Sets the value of the `Option.THRESHOLD` option.
      Parameters:
        `threshold` - The minimum number of lines considered a match.

    - #### getOption

          public java.lang.Object getOption(Option option)

      Obtains the value of a specified option.
      Parameters:
        `option` - The option to get.
      Returns:
        value The value; or `null` if the option should be cleared.

    - #### setOption

          public void setOption(Option option,
                       java.lang.Object value)

      Sets the value of a specified option.
      Parameters:
        `option` - The option to set.
        `value` - The value; or `null` if the option should be cleared.

    - #### setOption

          public void setOption(Option option,
                       boolean enable)

      Enables/disables an option.
      Parameters:
        `option` - The option to set.
        `enable` - `true` if the option should be enabled; otherwise `false`.

    - #### hasOption

          public boolean hasOption(Option option)

      Determines if an option has been set or enabled.
      Parameters:
        `option` - The option to check for.
      Returns:
        `true` if the option has been set or enabled; otherwise `false`.

    - #### getOptions

          public java.util.Map getOptions()

      Obtains the value of all options that have been set/enabled.
      Returns:
        Values keyed by option.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object object)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright (c) 2003-2013 Simon Harris. All rights reserved.