lejos.nxt
Class Settings

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

public class Settings
extends Object

leJOS NXJ persistent settings.

Author:
Lawrie Griffiths

Constructor Summary
Settings()
           
 
Method Summary
static Properties getProperties()
          Get leJOS NXJ persistent settings as Java Properties.
static String getProperty(String key, String defaultValue)
          Get the value for a leJOS NXJ persistent setting
static void setProperty(String key, String value)
          Set a leJOS NXJ persistent setting.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

Settings

public Settings()
Method Detail

getProperty

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

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

setProperty

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

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

getProperties

public static Properties getProperties()
Get leJOS NXJ persistent settings as Java Properties. Note that the returned Properties object is read-only: setting property values in this Properties object has no effect on the settings used by the current program and no effect on the persistent settings.

Returns:
a Properties object containing all the leJOS NXJ settings.