// Path: src/main/java/io/taciturn/Utility.java
// public static <Item> ClassUtility<Item> $(Class<Item> object) {
//     return new ClassUtility<>(object);
// }


import java.time.Instant;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.util.Date;
import static io.taciturn.Utility.$;
package io.taciturn.utility;



public class DateUtility extends ComparableUtility<Date> {

    public DateUtility(Date object) {
        super(object);
    }

    public LocalDateTime toLocalDateTime() {
        return mapToInstant().map(LocalDateTime::from).orElse(null);
    }

    public LocalDateTime toLocalDateTimeWithDefaultZoneId() {
        return mapToInstant().map(o -> LocalDateTime.ofInstant(o, ZoneId.systemDefault())).orElse(null);
    }

    public LocalDateTime toLocalDateTime(ZoneId zoneId) {
        return mapToInstant().map(o -> LocalDateTime.ofInstant(o, zoneId)).orElse(null);
    }

    public LocalDateTimeUtility mapToLocalDateTimeWithDefaultZoneId() {
// Path: src/main/java/io/taciturn/Utility.java
// public static <Item> ClassUtility<Item> $(Class<Item> object) {
//     return new ClassUtility<>(object);
// }


// Path: src/main/java/io/taciturn/utility/DateUtility.java
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.util.Date;
import static io.taciturn.Utility.$;

package io.taciturn.utility;



public class DateUtility extends ComparableUtility<Date> {

    public DateUtility(Date object) {
        super(object);
    }

    public LocalDateTime toLocalDateTime() {
        return mapToInstant().map(LocalDateTime::from).orElse(null);
    }

    public LocalDateTime toLocalDateTimeWithDefaultZoneId() {
        return mapToInstant().map(o -> LocalDateTime.ofInstant(o, ZoneId.systemDefault())).orElse(null);
    }

    public LocalDateTime toLocalDateTime(ZoneId zoneId) {
        return mapToInstant().map(o -> LocalDateTime.ofInstant(o, zoneId)).orElse(null);
    }

    public LocalDateTimeUtility mapToLocalDateTimeWithDefaultZoneId() {
        return $(toLocalDateTimeWithDefaultZoneId());