Author: xor
Date: 2008-09-17 13:46:29 +0000 (Wed, 17 Sep 2008)
New Revision: 22667

Modified:
   trunk/plugins/WoT/Config.java
Log:
Comments.

Modified: trunk/plugins/WoT/Config.java
===================================================================
--- trunk/plugins/WoT/Config.java       2008-09-17 13:46:22 UTC (rev 22666)
+++ trunk/plugins/WoT/Config.java       2008-09-17 13:46:29 UTC (rev 22667)
@@ -10,6 +10,9 @@
 import com.db4o.ObjectContainer;

 /**
+ * Contains a HashMap<String, String> which maps configuration variable names
+ * to their values and stores them in the database.
+ * 
  * @author Julien Cornuwel (batosai at freenetproject.org)
  */
 public class Config {
@@ -17,6 +20,10 @@
        private ObjectContainer db;
        private HashMap<String, String> params = null;

+       /**
+        * 
+        * @param db The database where the configuration is stored.
+        */
        public Config(ObjectContainer db) {
                this.db = db;
                if(params == null) {
@@ -34,6 +41,10 @@
                return params.get(key);
        }

+       /**
+        * Add the default configuration values to the database.
+        * @param overwrite If true, overwrite already set values with the 
default value.
+        */
        public void initDefault(boolean overwrite) {

                if (!params.containsKey("delayBetweenInserts") || overwrite) 
set("delayBetweenInserts", "30");


Reply via email to