Added the ability to construct a config with custom properties.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1190 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Config.java,v 1.21 2003/01/22 01:41:17 mdb Exp $
|
// $Id: Config.java,v 1.22 2003/08/12 01:27:35 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -131,6 +131,17 @@ public class Config
|
|||||||
_prefs = Preferences.userRoot().node(path);
|
_prefs = Preferences.userRoot().node(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a config object which will obtain information from the
|
||||||
|
* supplied properties, rooted at the specified path in the
|
||||||
|
* preferences hieriarchy.
|
||||||
|
*/
|
||||||
|
public Config (String path, Properties props)
|
||||||
|
{
|
||||||
|
_props = props;
|
||||||
|
_prefs = Preferences.userRoot().node(path);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches and returns the value for the specified configuration
|
* Fetches and returns the value for the specified configuration
|
||||||
* property. If the value is not specified in the associated
|
* property. If the value is not specified in the associated
|
||||||
|
|||||||
Reference in New Issue
Block a user