The nodes form the node-graph described in the YAML Specification.
While loading, the node graph is usually created by the
org..
| Modifier and Type | Field and Description |
|---|---|
| private Optional | |
| private List | |
| private List | |
| protected Optional | |
| private List | |
| private Map | |
| private boolean | |
| protected boolean | resolved
true when the tag is assigned by the resolver |
| private final Optional | |
| private Tag |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | |
| public Optional | |
| public List | Returns: the comment line list.The ordered list of blank lines and block comments (full line) that appear before this node. |
| public List | Returns: the comment line list.The ordered list of blank lines and block comments (full line) that appear AFTER this node. |
| public Optional | |
| public List | |
| public abstract NodeType | |
| public Object | Returns: the value if it was specified- the key of the runtime property key)Get the custom runtime property. |
| public Optional | |
| public Tag | |
| public final int | |
| public boolean | Returns: true if the node is self referenced.Indicates if this node must be constructed in two steps. |
| public void | |
| public void | |
| public void | |
| public void | |
| public Object | Returns: the previous value for the provided key if it was defined- the key for the custom property key, Object - the value for the custom property value)Define a custom runtime property. |
| public void | |
| public void |
| anchor | back to summary |
|---|---|
| private Optional<Anchor> anchor | |
| blockComments | back to summary |
|---|---|
| private List<CommentLine> blockComments | |
| endComments | back to summary |
|---|---|
| private List<CommentLine> endComments | |
| endMark | back to summary |
|---|---|
| protected Optional<Mark> endMark | |
| inLineComments | back to summary |
|---|---|
| private List<CommentLine> inLineComments | |
| properties | back to summary |
|---|---|
| private Map<String, Object> properties | |
| recursive | back to summary |
|---|---|
| private boolean recursive | |
| resolved | back to summary |
|---|---|
| protected boolean resolved true when the tag is assigned by the resolver | |
| startMark | back to summary |
|---|---|
| private final Optional<Mark> startMark | |
| tag | back to summary |
|---|---|
| private Tag tag | |
| Node | back to summary |
|---|---|
| public Node(Tag tag, Optional<Mark> startMark, Optional<Mark> endMark) Create Node to be parsed | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object obj) Overrides java. Node is only equal to itself
| |
| getAnchor | back to summary |
|---|---|
| public Optional Get the anchor if it was defined for this Node
| |
| getBlockComments | back to summary |
|---|---|
| public List The ordered list of blank lines and block comments (full line) that appear before this node.
| |
| getEndComments | back to summary |
|---|---|
| public List The ordered list of blank lines and block comments (full line) that appear AFTER this node. Note these comment should occur only in the last node in a document, when walking the node tree "in order"
| |
| getEndMark | back to summary |
|---|---|
| public Optional | |
| getInLineComments | back to summary |
|---|---|
| public List The ordered list of in-line comments. The first of which appears at the end of the line respresent by this node. The rest are in the following lines, indented per the Spec to indicate they are continuation of the inline comment.
| |
| getNodeType | back to summary |
|---|---|
public abstract NodeType getNodeType()
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String key) Get the custom runtime property. | |
| getStartMark | back to summary |
|---|---|
| public Optional | |
| getTag | back to summary |
|---|---|
| public Tag getTag() Tag of this node. Every node has a tag assigned. The tag is either local or global.
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isRecursive | back to summary |
|---|---|
| public boolean isRecursive() Indicates if this node must be constructed in two steps. Two-step construction is required whenever a node is a child (direct or indirect) of it self. That is, if a recursive structure is build using anchors and aliases.
Set by Only relevant during loading.
| |
| setAnchor | back to summary |
|---|---|
| public void setAnchor(Optional<Anchor> anchor) Set the anchor for this Node
| |
| setBlockComments | back to summary |
|---|---|
| public void setBlockComments(List<CommentLine> blockComments) | |
| setEndComments | back to summary |
|---|---|
| public void setEndComments(List<CommentLine> endComments) | |
| setInLineComments | back to summary |
|---|---|
| public void setInLineComments(List<CommentLine> inLineComments) | |
| setProperty | back to summary |
|---|---|
| public Object setProperty(String key, Object value) Define a custom runtime property. It is not used by Engine but may be used by other tools. | |
| setRecursive | back to summary |
|---|---|
| public void setRecursive(boolean recursive) | |
| setTag | back to summary |
|---|---|
| public void setTag(Tag tag) | |