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

## net.i2p.desktopgui.util
Class ConfigurationManager

    java.lang.Object
      net.i2p.desktopgui.util.ConfigurationManager

    public class ConfigurationManager

extends Object

Manage the configuration of desktopgui.

Author:
  mathias

Method Summary
`boolean` | `getBooleanConfiguration(String arg, boolean defaultValue)` Check if a specific boolean configuration exists.
`static ConfigurationManager` | `getInstance()`
`String` | `getStringConfiguration(String arg, String defaultValue)` Get a specific String configuration.
`void` | `loadArguments(String[] args)` Collects arguments of the form --word, --word=otherword and -blah to determine user parameters.
`void` | `loadBooleanConfiguration(String arg)` Add a boolean configuration.
`void` | `loadStringConfiguration(String arg, int equalsPosition)` Add a String configuration which consists a key and a value.

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

Method Detail

### getInstance

    public static ConfigurationManager getInstance()

### loadArguments

    public void loadArguments(String[] args)

  Collects arguments of the form --word, --word=otherword and -blah to determine user parameters.

  Parameters:
    `args` - Command line arguments to the application

### loadBooleanConfiguration

    public void loadBooleanConfiguration(String arg)

  Add a boolean configuration.

  Parameters:
    `arg` - The key we wish to add as a configuration.

### loadStringConfiguration

    public void loadStringConfiguration(String arg,
                                        int equalsPosition)

  Add a String configuration which consists a key and a value.

  Parameters:
    `arg` - String of the form substring1=substring2.
    `equalsPosition` - Position of the '=' element.

### getBooleanConfiguration

    public boolean getBooleanConfiguration(String arg,
                                           boolean defaultValue)

  Check if a specific boolean configuration exists.

  Parameters:
    `arg` - The key for the configuration.
    `defaultValue` - If the configuration is not found, we use a default value.
  Returns:
    The value of a configuration: true if found, defaultValue if not found.

### getStringConfiguration

    public String getStringConfiguration(String arg,
                                         String defaultValue)

  Get a specific String configuration.

  Parameters:
    `arg` - The key for the configuration.
    `defaultValue` - If the configuration is not found, we use a default value.
  Returns:
    The value of the configuration, or the defaultValue.

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