Here you can find the source of asList(final NodeList scripts)
public static List<Node> asList(final NodeList scripts)
//package com.java2s; import java.util.AbstractList; import java.util.List; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static List<Node> asList(final NodeList scripts) { return new AbstractList<Node>() { @Override/* w ww. j a va2s.c o m*/ public Node get(int index) { return scripts.item(index); } @Override public int size() { return scripts.getLength(); } }; } }