From 171112143ed3d06e85401dcd3573c3537ed3f6b0 Mon Sep 17 00:00:00 2001 From: mdb Date: Tue, 12 Aug 2003 01:27:35 +0000 Subject: [PATCH] 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 --- .../src/java/com/samskivert/util/Config.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/Config.java b/projects/samskivert/src/java/com/samskivert/util/Config.java index 3fe4efe6..710acd34 100644 --- a/projects/samskivert/src/java/com/samskivert/util/Config.java +++ b/projects/samskivert/src/java/com/samskivert/util/Config.java @@ -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 // Copyright (C) 2001 Michael Bayne @@ -131,6 +131,17 @@ public class Config _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 * property. If the value is not specified in the associated