Class ReadablePartialPrinter
- java.lang.Object
- org.springframework.format.datetime.joda.ReadablePartialPrinter
- All Implemented Interfaces:
Printer<ReadablePartial>
public final class ReadablePartialPrinter extends Object implements Printer<ReadablePartial>
Prints Joda-TimeReadablePartialinstances using aDateTimeFormatter.- Since:
- 3.0
- Author:
- Keith Donald
Constructor Summary
Constructors Constructor Description ReadablePartialPrinter(DateTimeFormatter formatter)Create a new ReadableInstantPrinter.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringprint(ReadablePartial partial, Locale locale)Print the object of type T for display.
Constructor Detail
ReadablePartialPrinter
public ReadablePartialPrinter(DateTimeFormatter formatter)
Create a new ReadableInstantPrinter.- Parameters:
formatter- the Joda DateTimeFormatter instance
Method Detail
print
public String print(ReadablePartial partial, Locale locale)
Description copied from interface:PrinterPrint the object of type T for display.- Specified by:
printin interfacePrinter<ReadablePartial>- Parameters:
partial- the instance to printlocale- the current user locale- Returns:
- the printed text string