MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / indexOf

Method indexOf

src/org/kxml2/kdom/Node.java:198–212  ·  view source on GitHub ↗

Performs search for an element with the given namespace and name, starting at the given start index. A null namespace matches any namespace, please use Xml.NO_NAMESPACE for no namespace). returns -1 if no matching element was found.

(String namespace, String name, int startIndex)

Source from the content-addressed store, hash-verified

196 namespace). returns -1 if no matching element was found. */
197
198 public int indexOf(String namespace, String name, int startIndex) {
199
200 int len = getChildCount();
201
202 for (int i = startIndex; i < len; i++) {
203
204 Element child = getElement(i);
205
206 if (child != null
207 && name.equals(child.getName())
208 && (namespace == null || namespace.equals(child.getNamespace())))
209 return i;
210 }
211 return -1;
212 }
213
214 public boolean isText(int i) {
215 int t = getType(i);

Callers 3

getElementMethod · 0.95
adjustNspMethod · 0.45
setInputMethod · 0.45

Calls 5

getChildCountMethod · 0.95
getElementMethod · 0.95
getNameMethod · 0.95
getNamespaceMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected