org.springframework.format.datetime.joda
Class MillisecondInstantPrinter
java.lang.Object
org.springframework.format.datetime.joda.MillisecondInstantPrinter
- All Implemented Interfaces:
- Printer<Long>
public final class MillisecondInstantPrinter
- extends Object
- implements Printer<Long>
Prints Long instances using a DateTimeFormatter
.
- Since:
- 3.0
- Author:
- Keith Donald
Constructor Summary |
MillisecondInstantPrinter(org.joda.time.format.DateTimeFormatter formatter)
Create a new ReadableInstantPrinter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MillisecondInstantPrinter
public MillisecondInstantPrinter(org.joda.time.format.DateTimeFormatter formatter)
- Create a new ReadableInstantPrinter.
- Parameters:
formatter
- the Joda DateTimeFormatter instance
print
public String print(Long instant,
Locale locale)
- Description copied from interface:
Printer
- Print the object of type T for display.
- Specified by:
print
in interface Printer<Long>
- Parameters:
instant
- the instance to printlocale
- the current user locale
- Returns:
- the printed text string