/** * Adds an attribute to the list */ public void add(String qname, String value) { // Initialize the internal vectors at the first usage. if (_attributes == null) alloc(); // Stuff the QName into the names vector & hashtable Integer obj = (Integer)_attributes.get(qname); if (obj == null) { _attributes.put(qname, obj = new Integer(_length++)); _qnames.addElement(qname); _values.addElement(value); int col = qname.lastIndexOf(':'); if (col > -1) { _uris.addElement(qname.substring(0,col)); _names.addElement(qname.substring(col+1)); } else { _uris.addElement(EMPTYSTRING); _names.addElement(qname); } } else { final int index = obj.intValue(); _values.set(index, value); } }
/** * Adds an attribute to the list */ public void add(String qname, String value) { // Initialize the internal vectors at the first usage. if (_attributes == null) alloc(); // Stuff the QName into the names vector & hashtable Integer obj = (Integer)_attributes.get(qname); if (obj == null) { _attributes.put(qname, obj = new Integer(_length++)); _qnames.addElement(qname); _values.addElement(value); int col = qname.lastIndexOf(':'); if (col > -1) { _uris.addElement(qname.substring(0,col)); _names.addElement(qname.substring(col+1)); } else { _uris.addElement(EMPTYSTRING); _names.addElement(qname); } } else { final int index = obj.intValue(); _values.set(index, value); } }
/** * Adds an attribute to the list */ public void add(String qname, String value) { // Initialize the internal vectors at the first usage. if (_attributes == null) alloc(); // Stuff the QName into the names vector & hashtable Integer obj = (Integer)_attributes.get(qname); if (obj == null) { _attributes.put(qname, obj = new Integer(_length++)); _qnames.addElement(qname); _values.addElement(value); int col = qname.lastIndexOf(':'); if (col > -1) { _uris.addElement(qname.substring(0,col)); _names.addElement(qname.substring(col+1)); } else { _uris.addElement(EMPTYSTRING); _names.addElement(qname); } } else { final int index = obj.intValue(); _values.set(index, value); } }
/** * Adds an attribute to the list */ public void add(String qname, String value) { // Initialize the internal vectors at the first usage. if (_attributes == null) alloc(); // Stuff the QName into the names vector & hashtable Integer obj = (Integer)_attributes.get(qname); if (obj == null) { _attributes.put(qname, obj = new Integer(_length++)); _qnames.addElement(qname); _values.addElement(value); int col = qname.lastIndexOf(':'); if (col > -1) { _uris.addElement(qname.substring(0,col)); _names.addElement(qname.substring(col+1)); } else { _uris.addElement(EMPTYSTRING); _names.addElement(qname); } } else { final int index = obj.intValue(); _values.set(index, value); } }