47 * <p>This class provides a default implementation of the SAX2
48 * {@link org.xml.sax.Attributes Attributes} interface, with the
49 * addition of manipulators so that the list can be modified or
50 * reused.</p>
51 *
52 * <p>There are two typical uses of this class:</p>
53 *
54 * <ol>
55 * <li>to take a persistent snapshot of an Attributes object
56 * in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
57 * <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
58 * </ol>
59 *
60 * <p>This class replaces the now-deprecated SAX1 {@link
61 * org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
62 * class; in addition to supporting the updated Attributes
63 * interface rather than the deprecated {@link org.xml.sax.AttributeList
64 * AttributeList} interface, it also includes a much more efficient
65 * implementation using a single array rather than a set of Vectors.</p>
66 *
67 * @since SAX 2.0
68 * @author David Megginson
69 */
70 public class AttributesImpl implements Attributes
71 {
72
73
74 ////////////////////////////////////////////////////////////////////
75 // Constructors.
76 ////////////////////////////////////////////////////////////////////
77
78
79 /**
80 * Construct a new, empty AttributesImpl object.
81 */
82 public AttributesImpl ()
83 {
84 length = 0;
85 data = null;
86 }
87
|
47 * <p>This class provides a default implementation of the SAX2
48 * {@link org.xml.sax.Attributes Attributes} interface, with the
49 * addition of manipulators so that the list can be modified or
50 * reused.</p>
51 *
52 * <p>There are two typical uses of this class:</p>
53 *
54 * <ol>
55 * <li>to take a persistent snapshot of an Attributes object
56 * in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
57 * <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
58 * </ol>
59 *
60 * <p>This class replaces the now-deprecated SAX1 {@link
61 * org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
62 * class; in addition to supporting the updated Attributes
63 * interface rather than the deprecated {@link org.xml.sax.AttributeList
64 * AttributeList} interface, it also includes a much more efficient
65 * implementation using a single array rather than a set of Vectors.</p>
66 *
67 * @since 1.4, SAX 2.0
68 * @author David Megginson
69 */
70 public class AttributesImpl implements Attributes
71 {
72
73
74 ////////////////////////////////////////////////////////////////////
75 // Constructors.
76 ////////////////////////////////////////////////////////////////////
77
78
79 /**
80 * Construct a new, empty AttributesImpl object.
81 */
82 public AttributesImpl ()
83 {
84 length = 0;
85 data = null;
86 }
87
|