Lines Matching refs:index

124      * @param index The attribute's index (zero-based).
126 * available, or null if the index is out of range.
129 public String getURI (int index)
131 if (index >= 0 && index < length) {
132 return data[index*5];
142 * @param index The attribute's index (zero-based).
144 * none is available, or null if the index if out of range.
147 public String getLocalName (int index)
149 if (index >= 0 && index < length) {
150 return data[index*5+1];
160 * @param index The attribute's index (zero-based).
162 * none is available, or null if the index is out of bounds.
165 public String getQName (int index)
167 if (index >= 0 && index < length) {
168 return data[index*5+2];
176 * Return an attribute's type by index.
178 * @param index The attribute's index (zero-based).
180 * if the index is out of bounds.
183 public String getType (int index)
185 if (index >= 0 && index < length) {
186 return data[index*5+3];
194 * Return an attribute's value by index.
196 * @param index The attribute's index (zero-based).
197 * @return The attribute's value or null if the index is out of bounds.
200 public String getValue (int index)
202 if (index >= 0 && index < length) {
203 return data[index*5+4];
211 * Look up an attribute's index by Namespace name.
214 * use the index query methods rather than using the name query methods
220 * @return The attribute's index, or -1 if none matches.
249 * Look up an attribute's index by qualified (prefixed) name.
252 * @return The attribute's index, or -1 if none matches.
436 * @param index The index of the attribute (zero-based).
447 * supplied index does not point to an attribute
450 public void setAttribute (int index, String uri, String localName,
453 if (index >= 0 && index < length) {
454 data[index*5] = uri;
455 data[index*5+1] = localName;
456 data[index*5+2] = qName;
457 data[index*5+3] = type;
458 data[index*5+4] = value;
460 badIndex(index);
468 * @param index The index of the attribute (zero-based).
470 * supplied index does not point to an attribute
473 public void removeAttribute (int index)
475 if (index >= 0 && index < length) {
476 if (index < length - 1) {
477 System.arraycopy(data, (index+1)*5, data, index*5,
478 (length-index-1)*5);
480 index = (length - 1) * 5;
481 data [index++] = null;
482 data [index++] = null;
483 data [index++] = null;
484 data [index++] = null;
485 data [index] = null;
488 badIndex(index);
496 * @param index The index of the attribute (zero-based).
500 * supplied index does not point to an attribute
503 public void setURI (int index, String uri)
505 if (index >= 0 && index < length) {
506 data[index*5] = uri;
508 badIndex(index);
516 * @param index The index of the attribute (zero-based).
520 * supplied index does not point to an attribute
523 public void setLocalName (int index, String localName)
525 if (index >= 0 && index < length) {
526 data[index*5+1] = localName;
528 badIndex(index);
536 * @param index The index of the attribute (zero-based).
540 * supplied index does not point to an attribute
543 public void setQName (int index, String qName)
545 if (index >= 0 && index < length) {
546 data[index*5+2] = qName;
548 badIndex(index);
556 * @param index The index of the attribute (zero-based).
559 * supplied index does not point to an attribute
562 public void setType (int index, String type)
564 if (index >= 0 && index < length) {
565 data[index*5+3] = type;
567 badIndex(index);
575 * @param index The index of the attribute (zero-based).
578 * supplied index does not point to an attribute
581 public void setValue (int index, String value)
583 if (index >= 0 && index < length) {
584 data[index*5+4] = value;
586 badIndex(index);
630 * Report a bad array index in a manipulator.
632 * @param index The index to report.
635 private void badIndex (int index)
639 "Attempt to modify attribute at illegal index: " + index;