-
public interface NameListNameList接口提供了并行对名称和命名空间值(可以是空值)的抽象,而不定义或约束如何实现此集合。NameList中的项目可以通过整数索引访问,从0开始。- 从以下版本开始:
- 1.5,DOM 3级
-
-
方法摘要
所有方法 接口方法 抽象方法 Modifier and Type 方法 描述 booleancontains(String str)测试一个名字是否是这个NameList一部分。booleancontainsNS(String namespaceURI, String name)测试如果对namespaceURI / name是这个NameList一部分。intgetLength()列表中的对数(name和namespaceURI)。StringgetName(int index)返回集合中的indexth名称项。StringgetNamespaceURI(int index)返回集合中的indexth namespaceURI项目。
-
-
-
方法详细信息
-
getName
String getName(int index)
返回集合中的indexth名称项。- 参数
-
index- 索引到集合。 - 结果
-
名称在
index位置在NameList,或null如果没有指定索引的名称或索引超出范围。
-
getNamespaceURI
String getNamespaceURI(int index)
返回集合中的indexth namespaceURI项目。- 参数
-
index- 索引到集合。 - 结果
-
在
index中的NameList位置的命名空间URI,如果没有指定索引的名称或索引超出范围,null。
-
getLength
int getLength()
列表中的对数(name和namespaceURI)。 有效子节点索引的范围为0到length-1含)。
-
contains
boolean contains(String str)
测试一个名字是否是这个NameList一部分。- 参数
-
str- 要查找的名称。 - 结果
-
true如果已经找到该名称,false另有false。
-
-