Class LiteralSegment
java.lang.Object
org.miaixz.bus.core.text.placeholder.segment.LiteralSegment
- All Implemented Interfaces:
StringSegment
字符串模板-固定文本 SectionBuffer
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LiteralSegment
构造- Parameters:
text- 文本
-
-
Method Details
-
getText
Description copied from interface:StringSegment获取文本值- Specified by:
getTextin interfaceStringSegment- Returns:
- 文本值,对于固定文本Segment,返回文本值;对于单占位符Segment,返回占位符;对于有前后缀的占位符Segment,返回占位符完整文本,例如: "{name}"
-