java.lang.Object
at.syntaxerror.syntaxnbt.path.PathNode
- Direct Known Subclasses:
PathNodeCompound,PathNodeIndex,PathNodeList,PathNodeListTag,PathNodeNamed,PathNodeRoot,PathNodeSubList
The base class for all NBT path nodes
- Author:
- SyntaxError404
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Tag<?>Returns the tag with the specified name in a compound, if presentgetNext()Returns the next node in the path sequencevoidSets the next node in the path sequence.protected abstract StringStringifies only this node, without respecting thenext nodetoString()Traverse recursively through the tag's tree structure and return the matching tagstraverseAll(List<Tag<?>> tags) Traverse recursively through the tree structures of all tags and return the matching tagstraverseSelf(Tag<?> tag) Traverse through the tag's tree structure and return the matching tags.
-
Constructor Details
-
PathNode
public PathNode()
-
-
Method Details
-
setNext
Sets the next node in the path sequence. Must not be aPathNodeRoot- Parameters:
next- the next node
-
traverseSelf
Traverse through the tag's tree structure and return the matching tags. This does not respect thenext node- Parameters:
tag- tag to traverse through- Returns:
- the matching tags
-
traverse
Traverse recursively through the tag's tree structure and return the matching tags- Parameters:
tag- tag to traverse through- Returns:
- the matching tags
-
traverseAll
Traverse recursively through the tree structures of all tags and return the matching tags- Parameters:
tags- tags to traverse through- Returns:
- the matching tags
-
getNamed
Returns the tag with the specified name in a compound, if present- Parameters:
name- name of the elementtag- a compound tag- Returns:
- the named tag
-
stringify
Stringifies only this node, without respecting thenext node- Returns:
- the string representation of this node
-
toString
-
getNext
Returns the next node in the path sequence- Returns:
- the next node in the path sequence
-