Modifier and Type | Method and Description |
---|---|
static <T extends Node> |
asList(NodeList nodeList)
Converts
nodeList into a List . |
public static <T extends Node> List<T> asList(NodeList nodeList)
nodeList
into a List
.
If nodeList
is an instance of List
already, it is casted
only. Else all elements of nodeList
are retrieved and copied into a
new list. Therefore lazy behavior of NodeList
implementations might
not work on the returned list.
T
- expected node typenodeList
- list of nodesnodeList
elementsCopyright © 2025. All rights reserved.