palmed.option
Class Configuration

java.lang.Object
  extended by palmed.option.Configuration

public final class Configuration
extends java.lang.Object

This class stores configuration keys and values.

Version:
$Revision: 359 $ $Date: 2005-12-23 23:26:53 +0900 (ven., 23 déc. 2005) $
Author:
Mathieu Champlon

Constructor Summary
Configuration()
          Create a configuration manager.
 
Method Summary
 boolean get(java.lang.String key, boolean initial)
          Retrieve a boolean value.
 java.lang.String get(java.lang.String key, java.lang.String initial)
          Retrieve a string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Create a configuration manager.

Method Detail

get

public boolean get(java.lang.String key,
                   boolean initial)
Retrieve a boolean value.

If the key does not exist it gets added with the initial value.

Parameters:
key - the key to look for
initial - the default value if the key is not found
Returns:
the value associated to the given key

get

public java.lang.String get(java.lang.String key,
                            java.lang.String initial)
Retrieve a string value.

If the key does not exist it gets added with the initial value.

Parameters:
key - the key to look for
initial - the default value if the key is not found
Returns:
the value associated to the given key


Copyright © 2004-2006 PalmEd. All Rights Reserved.