Class StructNode
- java.lang.Object
-
- ru.vyarus.yaml.updater.parse.common.model.TreeNode<T>
-
- ru.vyarus.yaml.updater.parse.common.model.YamlLine<StructNode>
-
- ru.vyarus.yaml.updater.parse.struct.model.StructNode
-
- All Implemented Interfaces:
LineNumberAware
public class StructNode extends YamlLine<StructNode>
Structure build by snakeyaml-based parser. Represents one or multiple lines in yaml file (multiple lines only in case of multiline value). Usually represent some property, except list values where pure scalar might appear.For lists, parsed structure is a bit weird for objects: dashed property goes first and later object properties are children of this value (so item object become split, but this simplifies parsing (node always one or more lines)).
- Since:
- 05.05.2021
-
-
Field Summary
-
Fields inherited from class ru.vyarus.yaml.updater.parse.common.model.YamlLine
PATH_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description StructNode(StructNode root, int padding, int lineNum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetIdentityValue()Returned values assumed to be used in node comparisons.java.lang.StringgetValue()voidsetValue(java.lang.String value)java.lang.StringtoString()-
Methods inherited from class ru.vyarus.yaml.updater.parse.common.model.YamlLine
find, getAllPropertiesIncludingScalarLists, getKey, getLineNum, getPadding, getTreeLeaves, getYamlPath, getYamlPathElement, isEmptyDash, isListItem, isListItemWithProperty, isObjectListItem, isProperty, setKey, setListItem, setListItemWithProperty, setPadding
-
Methods inherited from class ru.vyarus.yaml.updater.parse.common.model.TreeNode
add, addAll, getChildren, getRoot, getRootProperties, hasChildren, hasListValue, setRoot
-
-
-
-
Constructor Detail
-
StructNode
public StructNode(StructNode root, int padding, int lineNum)
-
-
Method Detail
-
getValue
public java.lang.String getValue()
-
setValue
public void setValue(java.lang.String value)
-
getIdentityValue
public java.lang.String getIdentityValue()
Description copied from class:YamlLineReturned values assumed to be used in node comparisons.- Specified by:
getIdentityValuein classYamlLine<StructNode>- Returns:
- maximally accurate node value (as much as possible for used parser)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-