Update of /var/cvs/src/org/mmbase/module/core
In directory james.mmbase.org:/tmp/cvs-serv620

Modified Files:
        MMObjectBuilder.java 
Log Message:
Some cleaning. Hashtable -> Map. Some scoping


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/core


Index: MMObjectBuilder.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/core/MMObjectBuilder.java,v
retrieving revision 1.430
retrieving revision 1.431
diff -u -b -r1.430 -r1.431
--- MMObjectBuilder.java        19 Aug 2008 20:34:39 -0000      1.430
+++ MMObjectBuilder.java        3 Sep 2008 15:25:17 -0000       1.431
@@ -62,7 +62,7 @@
  * @author Rob van Maris
  * @author Michiel Meeuwissen
  * @author Ernst Bunders
- * @version $Id: MMObjectBuilder.java,v 1.430 2008/08/19 20:34:39 michiel Exp $
+ * @version $Id: MMObjectBuilder.java,v 1.431 2008/09/03 15:25:17 michiel Exp $
  */
 public class MMObjectBuilder extends MMTable implements NodeEventListener, 
RelationEventListener {
 
@@ -172,14 +172,13 @@
      * Not that the first time the builder is created, this value is what is 
stored in the TypeDef table.
      * @scope protected
      */
-    public String description="Base Object";
+    public String description = "Base Object";
 
     /**
      * Descriptions of the builder per language
      * Can be set with the <descriptions> tag in the xml builder file.
-     * @scope protected
      */
-    public Hashtable<String,String> descriptions;
+    protected Map<String,String> descriptions;
 
     /**
      * The default search age for this builder.
@@ -213,14 +212,12 @@
     String maintainer = "mmbase.org";
 
     /** Collections of (GUI) names (singular) for the builder's objects, 
divided by language
-     * @scope protected
      */
-    Hashtable<String,String> singularNames;
+    protected Map<String,String> singularNames;
 
     /** Collections of (GUI) names (plural) for the builder's objects, divided 
by language
-     * @scope protected
      */
-    Hashtable<String,String> pluralNames;
+    protected Map<String,String> pluralNames;
 
     /**
      * Full filename (path + buildername + ".xml") where we loaded the builder 
from
@@ -2134,10 +2131,10 @@
 
     /**
      * Set descriptions of the builder
-     * @param e a <code>Hashtable</code> containing the descriptions
+     * @param e a <code>Map</code> containing the descriptions
      */
-    public void setDescriptions(Hashtable<String,String> e) {
-        this.descriptions = e;
+    public void setDescriptions(Map<String,String> e) {
+        this.descriptions = Collections.unmodifiableMap(e);
         update();
     }
 
@@ -2165,9 +2162,9 @@
 
     /**
      * Get descriptions of the builder
-     * @return  a <code>Hashtable</code> containing the descriptions
+     * @return  a <code>Map</code> containing the descriptions
      */
-    public Hashtable<String,String> getDescriptions() {
+    public Map<String,String> getDescriptions() {
         return descriptions;
     }
 
@@ -2298,30 +2295,30 @@
     /**
      * Sets a list of singular names (language - value pairs)
      */
-    public void setSingularNames(Hashtable<String,String> names) {
-        singularNames = names;
+    public void setSingularNames(Map<String,String> names) {
+        singularNames = Collections.unmodifiableMap(names);
         update();
     }
 
     /**
      * Gets a list of singular names (language - value pairs)
      */
-    public Hashtable<String,String> getSingularNames() {
+    public Map<String,String> getSingularNames() {
         return singularNames;
     }
 
     /**
      * Sets a list of plural names (language - value pairs)
      */
-    public void setPluralNames(Hashtable<String,String> names) {
-        pluralNames = names;
+    public void setPluralNames(Map<String,String> names) {
+        pluralNames = Collections.unmodifiableMap(names);
         update();
     }
 
     /**
      * Gets a list of plural names (language - value pairs)
      */
-    public Hashtable<String,String> getPluralNames() {
+    public Map<String,String> getPluralNames() {
         return pluralNames;
     }
 
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to