All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.craftsman.creator.ZonedDateTimeCreator Maven / Gradle / Ivy

Go to download

A library that provides the missing Java 8 type mappers for the Dozer Java Bean Mapper.

There is a newer version: 1.0.6
Show newest version
package io.craftsman.creator;

import java.time.ZonedDateTime;

public class ZonedDateTimeCreator implements Creator {

    @Override
    public ZonedDateTime create(Object source) {
        ZonedDateTime srcObject = (ZonedDateTime) source;
        return ZonedDateTime.of(
                srcObject.getYear(),
                srcObject.getMonthValue(),
                srcObject.getDayOfMonth(),
                srcObject.getHour(),
                srcObject.getMinute(),
                srcObject.getSecond(),
                srcObject.getNano(),
                srcObject.getZone()
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy