- All Known Implementing Classes:
TemporalConverterDefault,TemporalConverterLegacy
public interface TemporalConverter
Interface for a converter of temporal values.
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> TconvertAndEvaluate(Object temporal1, Object temporal2, BiFunction<?, ?, T> function) static TemporalConverterget()
-
Method Details
-
convertAndEvaluate
- Type Parameters:
T- type of the result.- Parameters:
temporal1- the first temporal value (with date and/or time).temporal2- the second temporal value (with date and/or time).function- the function to apply on the two given temporal values after assuring they are of same type. This method will therefore convert one of the given temporal values so it has the same type as the other one.- Returns:
- the result of the given
BiFunctionwith the given temporal values applied ornullif the a temporal value has an unknown or unsupported type.
-
get
- Returns:
- the instance of this
TemporalConverter. By default returnsTemporalConverterDefault. In order to replace, simply define your own implementation (e.g. extendingTemporalConverterLegacyif you want support forDateandCalendar) and declareprovidesfollowed by your own implementation in yourTemporalConverterwithmodule-info.javafile.
-