01: package com.jeta.forms.store.jml.dom;
02:
03: import java.util.HashMap;
04:
05: public class DefaultAttributes implements JMLAttributes {
06:
07: private HashMap m_attribs;
08:
09: /**
10: * Return the number of attributes in the list.
11: */
12: public int getLength() {
13: return m_attribs == null ? 0 : m_attribs.size();
14: }
15:
16: /**
17: * Look up an attribute's value by XML 1.0 qualified name.
18: */
19: public String getValue(String qName) {
20: return m_attribs == null ? null : (String) m_attribs.get(qName);
21: }
22:
23: public void setAttribute(String qname, String value) {
24: if (m_attribs == null)
25: m_attribs = new HashMap();
26: m_attribs.put(qname, value);
27: }
28:
29: }
|