Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# NameList

` public interface NameList `   
` `

|---|
| org.w3c.dom.NameList |

<br />

*** ** * ** ***

The `NameList` interface provides the abstraction of an ordered collection of parallel pairs of name and namespace values (which could be null values), without defining or constraining how this collection is implemented. The items in the `NameList` are accessible via an integral index, starting from 0.

See also the [Document Object Model (DOM) Level 3 Core Specification](http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407).

## Summary

| ### Public methods ||
|---|---|
| ` abstract boolean` | ` https://developer.android.com/reference/org/w3c/dom/NameList#contains(java.lang.String)(https://developer.android.com/reference/java/lang/String str) ` Test if a name is part of this `NameList`. |
| ` abstract boolean` | ` https://developer.android.com/reference/org/w3c/dom/NameList#containsNS(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String namespaceURI, https://developer.android.com/reference/java/lang/String name) ` Test if the pair namespaceURI/name is part of this `NameList`. |
| ` abstract int` | ` https://developer.android.com/reference/org/w3c/dom/NameList#getLength()() ` The number of pairs (name and namespaceURI) in the list. |
| ` abstract https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/org/w3c/dom/NameList#getName(int)(int index) ` Returns the `index`th name item in the collection. |
| ` abstract https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/org/w3c/dom/NameList#getNamespaceURI(int)(int index) ` Returns the `index`th namespaceURI item in the collection. |

## Public methods

### contains

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract boolean contains (String str)
```

Test if a name is part of this `NameList`.

<br />

| Parameters ||
|---|---|
| `str` | `String`: The name to look for. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the name has been found, `false` otherwise. <br /> |

### containsNS

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract boolean containsNS (String namespaceURI, 
                String name)
```

Test if the pair namespaceURI/name is part of this `NameList`.

<br />

| Parameters ||
|---|---|
| `namespaceURI` | `String`: The namespace URI to look for. <br /> |
| `name` | `String`: The name to look for. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the pair namespaceURI/name has been found, `false` otherwise. <br /> |

### getLength

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getLength ()
```

The number of pairs (name and namespaceURI) in the list. The range of valid child node indices is 0 to `length-1` inclusive.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getName

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract String getName (int index)
```

Returns the `index`th name item in the collection.

<br />

| Parameters ||
|---|---|
| `index` | `int`: Index into the collection. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The name at the `index`th position in the `NameList`, or `null` if there is no name for the specified index or if the index is out of range. <br /> |

### getNamespaceURI

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract String getNamespaceURI (int index)
```

Returns the `index`th namespaceURI item in the collection.

<br />

| Parameters ||
|---|---|
| `index` | `int`: Index into the collection. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The namespace URI at the `index`th position in the `NameList`, or `null` if there is no name for the specified index or if the index is out of range. <br /> |