Here you can find the source of listOf(final NodeList nodeList)
static List<Node> listOf(final NodeList nodeList)
//package com.java2s; /*/*w ww . ja v a 2s. c o m*/ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. // Copyright (C) 2007-2010 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ import java.util.AbstractList; import java.util.List; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { static List<Node> listOf(final NodeList nodeList) { return new AbstractList<Node>() { public Node get(int index) { return nodeList.item(index); } public int size() { return nodeList.getLength(); } }; } }