Record Class PlaceholderParser.SimplePlaceholderPart
java.lang.Object
java.lang.Record
cn.taketoday.util.PlaceholderParser.SimplePlaceholderPart
- 记录组件:
text- the raw textkey- the key of the placeholderfallback- the fallback to use, if any
- 所有已实现的接口:
PlaceholderParser.Part
- 封闭类:
- PlaceholderParser
static record PlaceholderParser.SimplePlaceholderPart(String text, String key, String fallback)
extends Record
implements PlaceholderParser.Part
A
PlaceholderParser.Part implementation that represents a single placeholder with
a hard-coded fallback.-
字段概要
字段 -
构造器概要
构造器构造器说明SimplePlaceholderPart(String text, String key, String fallback) 创建SimplePlaceholderPart记录的实例。 -
方法概要
修饰符和类型方法说明final boolean指示某个其他对象是否“等于”此对象。fallback()返回fallback记录组件的值。final inthashCode()返回此对象的哈希代码值。private booleanisTextOnly(List<PlaceholderParser.Part> parts) key()返回key记录组件的值。resolve(PlaceholderParser.PartResolutionContext resolutionContext) Resolve this part using the specifiedPlaceholderParser.PartResolutionContext.private StringresolveToText(PlaceholderParser.PartResolutionContext resolutionContext, String text) text()返回text记录组件的值。final StringtoString()返回此记录的字符串表示形式。private StringtoText(List<PlaceholderParser.Part> parts)
-
字段详细资料
-
构造器详细资料
-
方法详细资料
-
resolve
从接口复制的说明:PlaceholderParser.PartResolve this part using the specifiedPlaceholderParser.PartResolutionContext.- 指定者:
resolve在接口中PlaceholderParser.Part- 参数:
resolutionContext- the context to use- 返回:
- the resolved part
-
resolveToText
@Nullable private String resolveToText(PlaceholderParser.PartResolutionContext resolutionContext, String text) -
isTextOnly
-
toText
-
toString
返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录中的所有组件都使用Objects::equals(Object,Object)进行比较。 -
text
返回text记录组件的值。- 指定者:
text在接口中PlaceholderParser.Part- 返回:
text记录组件的值
-
key
返回key记录组件的值。- 返回:
key记录组件的值
-
fallback
返回fallback记录组件的值。- 返回:
fallback记录组件的值
-