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) |
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 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
getNodeStyle, getOptions, getTag, setAnchor, getStartColumn, addComments, getStartLine, hashCode, getEndColumn, getEndLine, getComments, setTag, setNodeStyle, addComment, getToken, getAnchor, equals
Method Details
getKey
public YamlNode getKey()
Returns the key corresponding to this entry.
Specified By:
getValue
public YamlNode getValue()
Returns the value corresponding to this entry.
Specified By:
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:
Overrides:
accept
public void accept(YamlVisitor visitor)
Overrides:
setValue
public YamlNode setValue(YamlNode value)