Class LiteralSegment

java.lang.Object
org.miaixz.bus.core.text.placeholder.segment.LiteralSegment
All Implemented Interfaces:
StringSegment

public class LiteralSegment extends Object implements StringSegment
字符串模板-固定文本 SectionBuffer
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • LiteralSegment

      public LiteralSegment(String text)
      构造
      Parameters:
      text - 文本
  • Method Details

    • getText

      public String getText()
      Description copied from interface: StringSegment
      获取文本值
      Specified by:
      getText in interface StringSegment
      Returns:
      文本值,对于固定文本Segment,返回文本值;对于单占位符Segment,返回占位符;对于有前后缀的占位符Segment,返回占位符完整文本,例如: "{name}"