Class ComponentTree
java.lang.Object
com.botwithus.bot.api.component.ComponentTree
An immutable, materialized interface subtree fetched in a single
get_interface_tree round-trip. Holds the flattened node list plus
parent/child linkage so navigation (ComponentNode.parent(),
ComponentNode.children(), ComponentNode.descendants()) is
pure in-memory work — no further RPC.
The tree is a snapshot of one tick; don't hold it across ticks. Build a
fresh one (via Components.in(int) / Components.under(int, int))
when you need current state.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentTreeFetch + materialize the subtree rooted at(interfaceId, componentId).node(int interfaceId, int componentId) First node matching(interfaceId, componentId), ornull.nodes()All nodes in breadth-first order.root()The root node, ornullwhen the subtree didn't resolve (empty tree).
-
Method Details
-
fetch
Fetch + materialize the subtree rooted at(interfaceId, componentId). -
root
The root node, ornullwhen the subtree didn't resolve (empty tree). -
nodes
All nodes in breadth-first order. Unmodifiable. -
node
First node matching(interfaceId, componentId), ornull.
-