NodeListImpl.java
878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.dom;
import com.adobe.xfa.dom.NodeImpl;
import java.util.ArrayList;
import java.util.List;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
class NodeListImpl
implements NodeList {
private final List<NodeImpl> mNodes;
NodeListImpl(int initialCapacity) {
this.mNodes = new ArrayList<NodeImpl>(initialCapacity);
}
@Override
public int getLength() {
return this.mNodes.size();
}
@Override
public Node item(int index) {
return 0 <= index && index < this.mNodes.size() ? this.mNodes.get(index) : null;
}
void addNode(NodeImpl node) {
this.mNodes.add(node);
}
void addNodes(NodeImpl startNode) {
while (startNode != null) {
this.addNode(startNode);
startNode = startNode.getNext();
}
}
}