lejos.nxt
Class SystemSettings

java.lang.Object
  extended by lejos.nxt.SystemSettings

public class SystemSettings
extends Object

This class is designed for use by other lejos classes to read persistent settings. User programs should use the Settings class

Author:
Lawrie Griffiths

Field Summary
static int MAX_SETTING_SIZE
           
 
Constructor Summary
SystemSettings()
           
 
Method Summary
static int getIntSetting(String key, int defaultValue)
          Get the value for a leJOS NXJ persistent setting as an Integer
static String getStringSetting(String key, String defaultValue)
          Get the value for a leJOS NXJ persistent setting as a String
static void setSetting(String key, String value)
          Set a leJOS NXJ persistent setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SETTING_SIZE

public static final int MAX_SETTING_SIZE
See Also:
Constant Field Values
Constructor Detail

SystemSettings

public SystemSettings()
Method Detail

getStringSetting

public static String getStringSetting(String key,
                                      String defaultValue)
Get the value for a leJOS NXJ persistent setting as a String

Parameters:
key - the name of the setting
defaultValue - the default value
Returns:
the value

getIntSetting

public static int getIntSetting(String key,
                                int defaultValue)
Get the value for a leJOS NXJ persistent setting as an Integer

Parameters:
key - the name of the setting
defaultValue - the default value
Returns:
the value

setSetting

public static void setSetting(String key,
                              String value)
Set a leJOS NXJ persistent setting.

Parameters:
key - the name of the setting
value - the value to set it to