Lines Matching refs:index

102      * @param index The attribute's index (zero-based).
104 * available, or null if the index is out of range.
107 public String getURI (int index)
109 if (index >= 0 && index < length) {
110 return data[index*5];
120 * @param index The attribute's index (zero-based).
122 * none is available, or null if the index if out of range.
125 public String getLocalName (int index)
127 if (index >= 0 && index < length) {
128 return data[index*5+1];
138 * @param index The attribute's index (zero-based).
140 * none is available, or null if the index is out of bounds.
143 public String getQName (int index)
145 if (index >= 0 && index < length) {
146 return data[index*5+2];
154 * Return an attribute's type by index.
156 * @param index The attribute's index (zero-based).
158 * if the index is out of bounds.
161 public String getType (int index)
163 if (index >= 0 && index < length) {
164 return data[index*5+3];
172 * Return an attribute's value by index.
174 * @param index The attribute's index (zero-based).
175 * @return The attribute's value or null if the index is out of bounds.
178 public String getValue (int index)
180 if (index >= 0 && index < length) {
181 return data[index*5+4];
189 * Look up an attribute's index by Namespace name.
192 * use the index query methods rather than using the name query methods
198 * @return The attribute's index, or -1 if none matches.
214 * Look up an attribute's index by qualified (prefixed) name.
217 * @return The attribute's index, or -1 if none matches.
402 * @param index The index of the attribute (zero-based).
413 * supplied index does not point to an attribute
416 public void setAttribute (int index, String uri, String localName,
419 if (index >= 0 && index < length) {
420 data[index*5] = uri;
421 data[index*5+1] = localName;
422 data[index*5+2] = qName;
423 data[index*5+3] = type;
424 data[index*5+4] = value;
426 badIndex(index);
434 * @param index The index of the attribute (zero-based).
436 * supplied index does not point to an attribute
439 public void removeAttribute (int index)
441 if (index >= 0 && index < length) {
442 if (index < length - 1) {
443 System.arraycopy(data, (index+1)*5, data, index*5,
444 (length-index-1)*5);
446 index = (length - 1) * 5;
447 data [index++] = null;
448 data [index++] = null;
449 data [index++] = null;
450 data [index++] = null;
451 data [index] = null;
454 badIndex(index);
462 * @param index The index of the attribute (zero-based).
466 * supplied index does not point to an attribute
469 public void setURI (int index, String uri)
471 if (index >= 0 && index < length) {
472 data[index*5] = uri;
474 badIndex(index);
482 * @param index The index of the attribute (zero-based).
486 * supplied index does not point to an attribute
489 public void setLocalName (int index, String localName)
491 if (index >= 0 && index < length) {
492 data[index*5+1] = localName;
494 badIndex(index);
502 * @param index The index of the attribute (zero-based).
506 * supplied index does not point to an attribute
509 public void setQName (int index, String qName)
511 if (index >= 0 && index < length) {
512 data[index*5+2] = qName;
514 badIndex(index);
522 * @param index The index of the attribute (zero-based).
525 * supplied index does not point to an attribute
528 public void setType (int index, String type)
530 if (index >= 0 && index < length) {
531 data[index*5+3] = type;
533 badIndex(index);
541 * @param index The index of the attribute (zero-based).
544 * supplied index does not point to an attribute
547 public void setValue (int index, String value)
549 if (index >= 0 && index < length) {
550 data[index*5+4] = value;
552 badIndex(index);
597 * Report a bad array index in a manipulator.
599 * @param index The index to report.
602 private void badIndex (int index)
606 "Attempt to modify attribute at illegal index: " + index;