aboutsummaryrefslogtreecommitdiffstats
path: root/src/codegen
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-09-24 09:17:12 +0000
committerKeiron Liddle <keiron@apache.org>2001-09-24 09:17:12 +0000
commit3cf392b13f6cab2cf343a86c8e55942656cc9bb5 (patch)
tree61f07612c59f71a3728772876ce11dddfba6f812 /src/codegen
parent5a9662ed5c350df04d0089c0b9fbba5354b4c772 (diff)
downloadxmlgraphics-fop-3cf392b13f6cab2cf343a86c8e55942656cc9bb5.tar.gz
xmlgraphics-fop-3cf392b13f6cab2cf343a86c8e55942656cc9bb5.zip
updated to use HashMap so that when using threads reading data
is not synchronized and therefore slower git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194480 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/propmap.xsl24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/codegen/propmap.xsl b/src/codegen/propmap.xsl
index bd832a9d1..28074223e 100644
--- a/src/codegen/propmap.xsl
+++ b/src/codegen/propmap.xsl
@@ -35,29 +35,29 @@
<xsl:template match="property-list">
package org.apache.fop.fo.properties;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import org.apache.fop.svg.*;
+import java.util.HashMap;
+import java.util.Set;
+//import org.apache.fop.svg.*;
public class <xsl:value-of select="@family"/>PropertyMapping {
- private static Hashtable s_htGeneric = new Hashtable(200);
- private static Hashtable s_htElementLists = new Hashtable(10);
+ private static HashMap s_htGeneric = new HashMap();
+ private static HashMap s_htElementLists = new HashMap();
<xsl:for-each select="element-property-list">
- private static Hashtable s_ht<xsl:value-of select="localname[1]"/>;</xsl:for-each>
+ private static HashMap s_ht<xsl:value-of select="localname[1]"/>;</xsl:for-each>
<xsl:apply-templates/>
- public static Hashtable getGenericMappings() {
+ public static HashMap getGenericMappings() {
return s_htGeneric;
}
- public static Enumeration getElementMappings() {
- return s_htElementLists.keys();
+ public static Set getElementMappings() {
+ return s_htElementLists.keySet();
}
- public static Hashtable getElementMapping(String elemName) {
- return (Hashtable)s_htElementLists.get(elemName);
+ public static HashMap getElementMapping(String elemName) {
+ return (HashMap)s_htElementLists.get(elemName);
}
}
</xsl:template>
@@ -74,7 +74,7 @@ public class <xsl:value-of select="@family"/>PropertyMapping {
<xsl:template match="element-property-list">
<xsl:variable name="ename" select="localname[1]"/>
static {
- s_ht<xsl:value-of select="$ename"/> = new Hashtable();
+ s_ht<xsl:value-of select="$ename"/> = new HashMap();
<xsl:for-each select="localname">
s_htElementLists.put("<xsl:value-of select='.'/>", s_ht<xsl:value-of select='$ename'/>);
</xsl:for-each>