Class ForNode

java.lang.Object
cloud.opencode.base.string.template.node.ForNode
All Implemented Interfaces:
TemplateNode

public final class ForNode extends Object implements TemplateNode
For Node - Template node for loop iteration. 循环节点 - 用于循环迭代的模板节点。

Features | 主要功能:

  • Iterable collection loop rendering - 可迭代集合循环渲染
  • Nested body node support - 嵌套体节点支持

Usage Examples | 使用示例:

ForNode node = new ForNode("item", "items", bodyNodes);
String result = node.render(Map.of("items", List.of("a", "b")));

Security | 安全性:

  • Thread-safe: Yes (immutable after construction) - 线程安全: 是(构造后不可变)
Since:
JDK 25, opencode-base-string V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also: