/[classpath]/classpath/javax/swing/text/html/parser/DTD.java
ViewVC logotype

Diff of /classpath/javax/swing/text/html/parser/DTD.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.4 by gnu_andrew, Tue Sep 20 18:46:36 2005 UTC revision 1.1.2.5 by gnu_andrew, Sun Oct 16 17:12:07 2005 UTC
# Line 88  public class DTD Line 88  public class DTD
88    /**    /**
89     * The table of existing available DTDs.     * The table of existing available DTDs.
90     */     */
91    static Hashtable dtdHash = new Hashtable();    static Hashtable<String,DTD> dtdHash = new Hashtable<String,DTD>();
92    
93    /**    /**
94     * The applet element for this DTD.     * The applet element for this DTD.
# Line 148  public class DTD Line 148  public class DTD
148    /**    /**
149     * The element for accessing all DTD elements by name.     * The element for accessing all DTD elements by name.
150     */     */
151    public Hashtable elementHash = new Hashtable();    public Hashtable<String,Element> elementHash =
152        new Hashtable<String,Element>();
153    
154    /**    /**
155     * The entity table for accessing all DTD entities by name.     * The entity table for accessing all DTD entities by name.
156     */     */
157    public Hashtable entityHash = new Hashtable();    public Hashtable<String,Entity> entityHash = new Hashtable<String,Entity>();
158    
159    /**    /**
160     *  The name of this DTD.     *  The name of this DTD.
# Line 165  public class DTD Line 166  public class DTD
166     * javax.swing.text.html.parser.Element#index field of all elements     * javax.swing.text.html.parser.Element#index field of all elements
167     * in this vector is set to the element position in this vector.     * in this vector is set to the element position in this vector.
168     */     */
169    public Vector elements = new Vector();    public Vector<Element> elements = new Vector<Element>();
170    
171    /** Create a new DTD with the specified name. */    /** Create a new DTD with the specified name. */
172    protected DTD(String a_name)    protected DTD(String a_name)
# Line 224  public class DTD Line 225  public class DTD
225      String name = Entity.mapper.get(id);      String name = Entity.mapper.get(id);
226    
227      if (name != null)      if (name != null)
228        return (Entity) entityHash.get(name);        return entityHash.get(name);
229      else      else
230        return null;        return null;
231    }    }
# Line 269  public class DTD Line 270  public class DTD
270     */     */
271    public void defineAttributes(String forElement, AttributeList attributes)    public void defineAttributes(String forElement, AttributeList attributes)
272    {    {
273      Element e = (Element) elementHash.get(forElement.toLowerCase());      Element e = elementHash.get(forElement.toLowerCase());
274    
275      if (e == null)      if (e == null)
276        e = newElement(forElement);        e = newElement(forElement);
# Line 420  public class DTD Line 421  public class DTD
421      if (allowed_values != null)      if (allowed_values != null)
422        {        {
423          StringTokenizer st = new StringTokenizer(allowed_values, " \t|");          StringTokenizer st = new StringTokenizer(allowed_values, " \t|");
424          Vector v = new Vector(st.countTokens());          Vector<String> v = new Vector<String>(st.countTokens());
425    
426          while (st.hasMoreTokens())          while (st.hasMoreTokens())
427            v.add(st.nextToken());            v.add(st.nextToken());
# Line 571  public class DTD Line 572  public class DTD
572     */     */
573    private Element newElement(String name)    private Element newElement(String name)
574    {    {
575      Element e = (Element) elementHash.get(name.toLowerCase());      Element e = elementHash.get(name.toLowerCase());
576    
577      if (e == null)      if (e == null)
578        {        {

Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.1.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26