Skip to content

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

Class YamlMapNode

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

All Implemented Interfaces:
    MapAstNode<YamlNode, YamlMapEntryNode>


public class YamlMapNode
extends YamlNode

Constructor Summary

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

Method Summary

Modifier and Type Method Description
public boolean containsKey(YamlNode key)
public YamlNode get(YamlNode key)
public List<YamlMapEntryNode> getChildren()
public YamlMapEntryNode getEntry(YamlNode key)
public List<YamlMapEntryNode> getEntries() We use an unmodifiable view or a cast to satisfy the wildcard contract.
public CollectionStyle getStyle()
public Set<YamlNode> keySet()
public YamlMapNode put(YamlNode key, YamlNode value)
public void remove(YamlNode key)
public void remove(String key)
public void setStyle(CollectionStyle style)
public boolean containsKey(String key)
public YamlNode get(String key)
public YamlMapNode getMap(String key)
public YamlSequenceNode getSequence(String key)
public YamlMapNode put(String key, YamlNode value) Associates the specified value with the specified string key.
public YamlMapNode put(YamlMapEntryNode entry)
public Set<YamlMapEntryNode> entrySet()
public Collection<YamlNode> values()
public YamlNode put(String key, String value)

Methods inherited from YamlNode

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

Method Details

containsKey

public boolean containsKey(YamlNode key)


get

public YamlNode get(YamlNode key)


getChildren

public List<YamlMapEntryNode> getChildren()

Specified By:

MapAstNode


getEntry

@io.github.qishr.cascara.common.lang.annotation.Nullable
public YamlMapEntryNode getEntry(YamlNode key)


getEntries

public List<YamlMapEntryNode> getEntries()

We use an unmodifiable view or a cast to satisfy the wildcard contract.

Specified By:

MapAstNode


getStyle

public CollectionStyle getStyle()


keySet

public Set<YamlNode> keySet()

Specified By:

MapAstNode


put

public YamlMapNode put(YamlNode key, YamlNode value)


remove

public void remove(YamlNode key)


remove

public void remove(String key)

Specified By:

MapAstNode


setStyle

public void setStyle(CollectionStyle style)


containsKey

public boolean containsKey(String key)

Specified By:

MapAstNode


get

public YamlNode get(String key)

Specified By:

MapAstNode


getMap

public YamlMapNode getMap(String key)

Specified By:

MapAstNode


getSequence

public YamlSequenceNode getSequence(String key)

Specified By:

MapAstNode


put

public YamlMapNode put(String key, YamlNode value)

Associates the specified value with the specified string key.If the map previously contained a mapping for the key, the old value is replaced. This method automatically wraps the string in a PLAIN scalar node.

Parameters:

key - The string key to be associated with the value.

value - The value node to be associated with the key.


put

public YamlMapNode put(YamlMapEntryNode entry)


entrySet

public Set<YamlMapEntryNode> entrySet()

Specified By:

MapAstNode


values

public Collection<YamlNode> values()

Specified By:

MapAstNode


put

public YamlNode put(String key, String value)

Specified By:

MapAstNode