fr.vergne.parsing.samples.xml.layer.NodeList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parsing-samples Show documentation
Show all versions of parsing-samples Show documentation
Examples of uses of the parsing features.
package fr.vergne.parsing.samples.xml.layer;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import fr.vergne.parsing.layer.impl.Loop;
public class NodeList extends Loop {
public NodeList() {
super(new Generator() {
@Override
public Node generates() {
return new Node();
}
});
}
public List getNodes() {
List nodes = new LinkedList();
for (Node node : this) {
nodes.add(node);
}
return Collections.unmodifiableList(nodes);
}
}