N - the type of nodes contained.public class NodeList<N extends Node> extends Object implements Iterable<N>, HasParentNode<NodeList<N>>, Visitable
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
NodeList<N> |
add(int index,
N node) |
NodeList<N> |
add(N node) |
void |
addAll(NodeList<N> otherList) |
boolean |
contains(N node) |
N |
get(int i) |
Node |
getParentNode()
Return the parent node or null, if no parent is set.
|
Node |
getParentNodeForChildren()
this for everything except NodeLists.
|
boolean |
isEmpty() |
Iterator<N> |
iterator() |
static <X extends Node> |
nodeList(Collection<X> nodes) |
static <X extends Node> |
nodeList(NodeList<X> nodes) |
static <X extends Node> |
nodeList(X... nodes) |
NodeList<N> |
remove(int index) |
boolean |
remove(Node node) |
NodeList<N> |
set(int index,
N element) |
NodeList<N> |
setParentNode(Node parentNode)
Set the parent node.
|
int |
size() |
void |
sort(Comparator<? super N> comparator) |
Stream<N> |
stream() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorgetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfpublic NodeList()
public NodeList(Node parent)
public boolean remove(Node node)
public static <X extends Node> NodeList<X> nodeList(Collection<X> nodes)
public boolean contains(N node)
public int size()
public N get(int i)
public boolean isEmpty()
public void sort(Comparator<? super N> comparator)
public Node getParentNode()
HasParentNodegetParentNode in interface HasParentNode<NodeList<N extends Node>>public NodeList<N> setParentNode(Node parentNode)
HasParentNodesetParentNode in interface HasParentNode<NodeList<N extends Node>>parentNode - the parent node or null, to set no parentpublic Node getParentNodeForChildren()
HasParentNodegetParentNodeForChildren in interface HasParentNode<NodeList<N extends Node>>public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
VisitableCopyright © 2007–2016. All rights reserved.