Overview | Package | Class | Tree | Deprecated | Index | Help
| Simian - Similarity Analyser v2.2.21
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## au.com.redhillconsulting.simian
Class Options

    java.lang.Object
      au.com.redhillconsulting.simian.Options

    public final class Options

extends java.lang.Object

Encapsulates all checking options.

Version:
  $Id: Options.java 2993 2007-06-07 21:54:52Z haruki_zaemon $
Author:
  Simon Harris

Field Summary
`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
`Options()` Default constructor.

Method Summary
`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`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Simian - Similarity Analyser v2.2.21
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2003-07 RedHill Consulting Pty. Ltd. All rights reserved.