public class ListNode extends Node implements java.lang.Iterable<Node>
containsVariableAssignment, newline
Constructor and Description |
---|
ListNode(ISourcePosition position) |
ListNode(ISourcePosition position,
Node firstNode)
Create a new ListNode.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(NodeVisitor<T> visitor) |
ListNode |
add(Node node) |
ListNode |
addAll(ListNode other)
Add all elements in other list to this list node.
|
ListNode |
addAll(Node other)
Add other element to this list
|
ListNode |
addAll(Node[] other,
int index,
int length) |
protected void |
addAllInternal(ListNode other) |
protected void |
addInternal(Node node) |
java.util.List<Node> |
childNodes()
Deprecated.
|
Node[] |
children() |
Node |
get(int idx) |
Node |
getLast() |
NodeType |
getNodeType() |
boolean |
isEmpty() |
java.util.Iterator<Node> |
iterator() |
int |
size() |
containsVariableAssignment, createList, createList, createList, createList, executesOnce, findFirstChild, getFile, getLine, getNodeName, getPosition, isNewline, isNil, needsDefinitionCheck, setNewline, setPosition, toString, toString, toStringInternal
public ListNode(ISourcePosition position, Node firstNode)
position
- where list isfirstNode
- first element of the listpublic ListNode(ISourcePosition position)
public NodeType getNodeType()
getNodeType
in class Node
protected void addInternal(Node node)
protected void addAllInternal(ListNode other)
public int size()
public ListNode addAll(ListNode other)
other
- list which has elementspublic ListNode addAll(Node other)
other
- list which has elementspublic Node getLast()
public boolean isEmpty()
public Node[] children()
@Deprecated public java.util.List<Node> childNodes()
childNodes
in class Node
public <T> T accept(NodeVisitor<T> visitor)
public Node get(int idx)
Copyright © 2001-2020 JRuby. All Rights Reserved.