Package net.time4j.engine
Interface Converter<S,T>
- Type Parameters:
S
- source type in other libraryT
- target type in Time4J
- All Known Implementing Classes:
JDBCAdapter
,TemporalType
,XMLAdapter
public interface Converter<S,T>
Serves as bridge to temporal types of JDK or other date and time libraries.
Note: All implementations must be immutable, ideally stateless.
- Since:
- 3.24/4.20
- Author:
- Meno Hochschild
-
Method Summary
-
Method Details
-
translate
Converts the external type to a type in Time4J.
- Parameters:
source
- external object- Returns:
- translated Time4J-object
- Throws:
ArithmeticException
- in case of numerical overflowChronoException
- if conversion fails
-
from
Converts the Time4J-type to an external type.
- Parameters:
time4j
- Time4J-object- Returns:
- translated object of external type
- Throws:
ArithmeticException
- in case of numerical overflowChronoException
- if conversion fails
-
getSourceType
Obtains the type of the source.
- Returns:
- Class
- Since:
- 3.24/4.20
-