Package io.github.qishr.cascara.common.lang.generic
Class GenericAstSequence
java.lang.Object
io.github.qishr.cascara.common.lang.generic.GenericAstNode
io.github.qishr.cascara.common.lang.generic.GenericAstSequence
All Implemented Interfaces:
SequenceAstNode<AstNode>
public final class GenericAstSequence
extends GenericAstNode
Constructor Summary
| Constructor | Description |
|---|---|
| GenericAstSequence() |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public int | size() | |
| public boolean | isEmpty() | |
| public GenericAstSequence | clear() | |
| public GenericAstSequence | add(AstNode node) | |
| public GenericAstSequence | remove(AstNode node) | |
| public GenericAstSequence | remove(int index) | |
| public AstNode | get(int index) | |
| public AstNode | getFirst() | |
| public AstNode | getLast() | |
| public MapAstNode<AstNode, AstNode, GenericAstMapEntry> | getMap(int i) | |
| public SequenceAstNode<AstNode> | getSequence(int i) | |
| public ScalarAstNode<AstNode> | getScalar(int i) | |
| public List<AstNode> | getElements() | |
| public List<AstNode> | getChildren() | |
| public List<CommentAstNode> | getComments() | |
| public Iterator<AstNode> | iterator() | Returns Iterator instance |
Methods inherited from GenericAstNode
getEndColumn, getEndLine, getStartColumn, getToken, getStartLine
Method Details
size
public int size()
Specified By:
isEmpty
public boolean isEmpty()
Specified By:
clear
public GenericAstSequence clear()
Specified By:
add
public GenericAstSequence add(AstNode node)
remove
public GenericAstSequence remove(AstNode node)
remove
public GenericAstSequence remove(int index)
Specified By:
get
public AstNode get(int index)
Specified By:
getFirst
public AstNode getFirst()
Specified By:
getLast
public AstNode getLast()
Specified By:
getMap
public MapAstNode<AstNode, AstNode, GenericAstMapEntry> getMap(int i)
Specified By:
getSequence
public SequenceAstNode<AstNode> getSequence(int i)
Specified By:
getScalar
public ScalarAstNode<AstNode> getScalar(int i)
Specified By:
getElements
public List<AstNode> getElements()
Specified By:
getChildren
public List<AstNode> getChildren()
getComments
public List<CommentAstNode> getComments()
iterator
public Iterator<AstNode> iterator()
Returns Iterator instance
Specified By: