类 TemporalAccessorPrinter
- java.lang.Object
- org.springframework.format.datetime.standard.TemporalAccessorPrinter
- 所有已实现的接口:
Printer<TemporalAccessor>
@UsesJava8 public final class TemporalAccessorPrinter extends Object implements Printer<TemporalAccessor>
Printer
implementation for a JSR-310TemporalAccessor
, using aDateTimeFormatter
) (the contextual one, if available).
构造器概要
构造器 构造器 说明 TemporalAccessorPrinter(DateTimeFormatter formatter)
Create a new TemporalAccessorPrinter.
构造器详细资料
TemporalAccessorPrinter
public TemporalAccessorPrinter(DateTimeFormatter formatter)
Create a new TemporalAccessorPrinter.- 参数:
formatter
- the base DateTimeFormatter instance
方法详细资料
print
public String print(TemporalAccessor partial, Locale locale)
从接口复制的说明:Printer
Print the object of type T for display.- 指定者:
print
在接口中Printer<TemporalAccessor>
- 参数:
partial
- the instance to printlocale
- the current user locale- 返回:
- the printed text string