List

extends Node

Constructors

List other, Node deep list = new java.util.ArrayList(); if(deep){ for(int i=0; i< other.list.size(); ++i){ Node node = (Node)other.list.get(i); list.add(node.copy(true)); } }else{ list.addAll(other.list); }

Create a new, empty list.

list = new java.util.ArrayList(); Node nodes

Create a new list from a Nodeset or List.

Returns: A new List containing all the nodes in nodes

list = new java.util.ArrayList(); addAll(nodes);

Type Functions

add(Node value)

Add an entry to the list.

Returns: The List that the function was invoked on.

add(Node position, Node value)

Add an entry to the list at the given, 0-indexed position.

Returns: The List that the function was invoked on.

addAll(Node nodes)

Add several entries to the list at once.

Parameter nodes: 0 or more nodes in a Nodeset or List

Returns: The List that the function was invoked on.

all()

Get all entries in the list as a nodeset

deprecated use List.values() instead

Same as: $this.values()

clear()

Clear the list by removing all list items.

Returns: this list, cleared.

get(Node index)

Get an item from the list.

Returns: The value stored in the list at this position, or an empty nodeset if none.

last()

Get the last item in the list.

Returns: The last item in the list, or an empty nodeset if none.

nodes()

Get a Nodeset containing all Nodes in this List.

Same as: $this.values()

remove(Node index)

Remove an entry from the list.

Returns: The value stored in the list at this position, or an empty nodeset if none.

size()

determine the number of items in the list

values()

Get all entries in the list as a nodeset

Functions inherited from Node