Skip to content

Package io.github.qishr.cascara.lang.yaml.ast

Class YamlSequenceNode

java.lang.Object
        io.github.qishr.cascara.lang.yaml.ast.YamlNode
                io.github.qishr.cascara.lang.yaml.ast.YamlSequenceNode

All Implemented Interfaces:
    SequenceAstNode<YamlNode>


public class YamlSequenceNode
extends YamlNode

Represents a YAML sequence (a list of items).

Constructor Summary

Constructor Description
YamlSequenceNode()
YamlSequenceNode(int line, int column)

Method Summary

Modifier and Type Method Description
public YamlSequenceNode remove(int index)
public void clear()
public YamlSequenceNode add(YamlNode item) Appends an item to the sequence.
public int size()
public YamlNode get(int index)
public List<YamlNode> getElements()
public YamlSequenceNode remove(YamlNode node)
public List<YamlNode> getChildren()
public CollectionStyle getStyle()
public void setStyle(CollectionStyle style)
public boolean isExpanded()
public void setExpanded(boolean expanded)
public Iterator<YamlNode> iterator() Returns Iterator instance

Methods inherited from YamlNode

getEndColumn, getEndLine, getComments, setAnchor, getStartColumn, getToken, getAnchor, equals, addComment, getStartLine, setToken, hashCode

Method Details

remove

public YamlSequenceNode remove(int index)

Specified By:

SequenceAstNode


clear

public void clear()

Specified By:

SequenceAstNode


add

public YamlSequenceNode add(YamlNode item)

Appends an item to the sequence.


size

public int size()

Specified By:

SequenceAstNode


get

public YamlNode get(int index)

Specified By:

SequenceAstNode


getElements

public List<YamlNode> getElements()

Specified By:

SequenceAstNode


remove

public YamlSequenceNode remove(YamlNode node)


getChildren

public List<YamlNode> getChildren()


getStyle

public CollectionStyle getStyle()


setStyle

public void setStyle(CollectionStyle style)


isExpanded

public boolean isExpanded()


setExpanded

public void setExpanded(boolean expanded)


iterator

public Iterator<YamlNode> iterator()

Returns Iterator instance

Specified By:

SequenceAstNode