类 ReadableInstantPrinter
- java.lang.Object
- org.springframework.format.datetime.joda.ReadableInstantPrinter
- 所有已实现的接口:
Printer<ReadableInstant>
public final class ReadableInstantPrinter extends Object implements Printer<ReadableInstant>
Prints Joda-TimeReadableInstant
instances using aDateTimeFormatter
.- 从以下版本开始:
- 3.0
- 作者:
- Keith Donald
构造器概要
构造器 构造器 说明 ReadableInstantPrinter(DateTimeFormatter formatter)
Create a new ReadableInstantPrinter.
构造器详细资料
ReadableInstantPrinter
public ReadableInstantPrinter(DateTimeFormatter formatter)
Create a new ReadableInstantPrinter.- 参数:
formatter
- the Joda DateTimeFormatter instance
方法详细资料
print
public String print(ReadableInstant instant, Locale locale)
从接口复制的说明:Printer
Print the object of type T for display.- 指定者:
print
在接口中Printer<ReadableInstant>
- 参数:
instant
- the instance to printlocale
- the current user locale- 返回:
- the printed text string