@UsesJava8 class DurationFormatter extends java.lang.Object implements Formatter<java.time.Duration>
Formatter
implementation for a JSR-310 Duration
,
following JSR-310's parsing rules for a Duration.Duration.parse(java.lang.CharSequence)
Constructor and Description |
---|
DurationFormatter() |
Modifier and Type | Method and Description |
---|---|
java.time.Duration |
parse(java.lang.String text,
java.util.Locale locale)
Parse a text String to produce a T.
|
java.lang.String |
print(java.time.Duration object,
java.util.Locale locale)
Print the object of type T for display.
|
public java.time.Duration parse(java.lang.String text, java.util.Locale locale) throws java.text.ParseException
Parser
public java.lang.String print(java.time.Duration object, java.util.Locale locale)
Printer