Package net.solarnetwork.central.support
Class InstantFormatter
java.lang.Object
net.solarnetwork.central.support.InstantFormatter
- All Implemented Interfaces:
org.springframework.format.Formatter<Instant>,org.springframework.format.Parser<Instant>,org.springframework.format.Printer<Instant>
-
Constructor Summary
ConstructorsConstructorDescriptionInstantFormatter(DateTimeFormatter formatter) Constructor.InstantFormatter(DateTimeFormatter formatter, DateTimeFormatter... fallbackFormatters) Constructor. -
Method Summary
-
Constructor Details
-
InstantFormatter
Constructor.- Parameters:
formatter- the formatter to use- Throws:
IllegalArgumentException- if any argument is null
-
InstantFormatter
Constructor.- Parameters:
formatter- the formatter to usefallbackFormatters- optional fallback formatters to use during parsing- Throws:
IllegalArgumentException- ifformatteris null
-
-
Method Details
-
print
- Specified by:
printin interfaceorg.springframework.format.Printer<Instant>
-
parse
- Specified by:
parsein interfaceorg.springframework.format.Parser<Instant>- Throws:
ParseException
-