Class FromDateToLocalTimeConverter
java.lang.Object
overit.geocallapp.utilities.rs.converter.FromDateToLocalTimeConverter
public class FromDateToLocalTimeConverter
extends Object
implements ConditionalConverter<Date,LocalTime>
A
This converter extracts the time portion from a
The converter is designed to be registered with
ConditionalConverter implementation that transforms Date objects into LocalTime objects.This converter extracts the time portion from a
Date and converts it to a LocalTime using the system default timezone.The converter is designed to be registered with
M2Mapper for automatic date-to-time conversions during object mapping.- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.modelmapper.spi.ConditionalConverter
ConditionalConverter.MatchResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(MappingContext<Date, LocalTime> context) Determines if this converter can handle the conversion between the specified source and destination types.
-
Constructor Details
-
FromDateToLocalTimeConverter
public FromDateToLocalTimeConverter()Creates a new instance of the converter.
-
-
Method Details
-
match
Determines if this converter can handle the conversion between the specified source and destination types. Returns FULL match if source type is assignable fromDateand destination type is assignable fromLocalTime.- Specified by:
matchin interfaceConditionalConverter<Date,LocalTime> - Parameters:
sourceType- the source class type to evaluate for conversion compatibilitydestinationType- the destination class type to evaluate for conversion compatibility- Returns:
ConditionalConverter.MatchResult.FULLif conversion is supported,ConditionalConverter.MatchResult.NONEotherwise
-
convert
-