Skip to content

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

Class YamlMapEntry

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

All Implemented Interfaces:
    MapEntryAstNode<YamlNode, YamlNode>


public class YamlMapEntry
extends YamlNode

Represents the structural pairing of a key and a value.

Constructor Summary

Constructor Description
YamlMapEntry(YamlNode key, YamlNode value)
YamlMapEntry(YamlNode key, YamlNode value, boolean hasExplicitKey)

Method Summary

Modifier and Type Method Description
public YamlNode getKey() Returns the key corresponding to this entry.
public YamlNode getValue() Returns the value corresponding to this entry.
public boolean hasExplicitKey()
public YamlMapEntry setHasExplicityKey(boolean b)
public YamlMapEntry setRaw(YamlNode value)
public List<YamlNode> getChildren() Implementation-specific nodes must return their constituent children. For example, a Map node returns its entries.
public void accept(YamlVisitor visitor)
public YamlNode setValue(YamlNode value)

Methods inherited from YamlNode

isPreceededByNewLine, getOptions, setFileEndsWithNewLine, getTag, setAnchor, addComments, getStartLine, hashCode, fileEndsWithNewLine, getEndColumn, setTag, addComment, setPreceededByNewLine, getResolvedTag, getToken, getAnchor, getNodeStyle, toString, setNodeStyle, getStartColumn, getSemanticColumn, getEndLine, getComments, getProperties, equals, setResolvedTag, setSemanticColumn

Method Details

getKey

public YamlNode getKey()

Returns the key corresponding to this entry.

Specified By:

MapEntryAstNode


getValue

public YamlNode getValue()

Returns the value corresponding to this entry.

Specified By:

MapEntryAstNode


hasExplicitKey

public boolean hasExplicitKey()


setHasExplicityKey

public YamlMapEntry setHasExplicityKey(boolean b)


setRaw

public YamlMapEntry setRaw(YamlNode value)


getChildren

public List<YamlNode> getChildren()

Implementation-specific nodes must return their constituent children. For example, a Map node returns its entries.

Specified By:

MapEntryAstNode

Overrides:

YamlNode


accept

public void accept(YamlVisitor visitor)

Overrides:

YamlNode


setValue

public YamlNode setValue(YamlNode value)