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.
236 * Look up an attribute's index by qualified (prefixed) name.
239 * @return The attribute's index, or -1 if none matches.
423 * @param index The index of the attribute (zero-based).
434 * supplied index does not point to an attribute
437 public void setAttribute (int index, String uri, String localName,
440 if (index >= 0 && index < length) {
441 data[index*5] = uri;
442 data[index*5+1] = localName;
443 data[index*5+2] = qName;
444 data[index*5+3] = type;
445 data[index*5+4] = value;
447 badIndex(index);
455 * @param index The index of the attribute (zero-based).
457 * supplied index does not point to an attribute
460 public void removeAttribute (int index)
462 if (index >= 0 && index < length) {
463 if (index < length - 1) {
464 System.arraycopy(data, (index+1)*5, data, index*5,
465 (length-index-1)*5);
467 index = (length - 1) * 5;
468 data [index++] = null;
469 data [index++] = null;
470 data [index++] = null;
471 data [index++] = null;
472 data [index] = null;
475 badIndex(index);
483 * @param index The index of the attribute (zero-based).
487 * supplied index does not point to an attribute
490 public void setURI (int index, String uri)
492 if (index >= 0 && index < length) {
493 data[index*5] = uri;
495 badIndex(index);
503 * @param index The index of the attribute (zero-based).
507 * supplied index does not point to an attribute
510 public void setLocalName (int index, String localName)
512 if (index >= 0 && index < length) {
513 data[index*5+1] = localName;
515 badIndex(index);
523 * @param index The index of the attribute (zero-based).
527 * supplied index does not point to an attribute
530 public void setQName (int index, String qName)
532 if (index >= 0 && index < length) {
533 data[index*5+2] = qName;
535 badIndex(index);
543 * @param index The index of the attribute (zero-based).
546 * supplied index does not point to an attribute
549 public void setType (int index, String type)
551 if (index >= 0 && index < length) {
552 data[index*5+3] = type;
554 badIndex(index);
562 * @param index The index of the attribute (zero-based).
565 * supplied index does not point to an attribute
568 public void setValue (int index, String value)
570 if (index >= 0 && index < length) {
571 data[index*5+4] = value;
573 badIndex(index);
617 * Report a bad array index in a manipulator.
619 * @param index The index to report.
622 private void badIndex (int index)
626 "Attempt to modify attribute at illegal index: " + index;