// 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 InstantUtility extends ComparableUtility<Instant> {

    public InstantUtility(Instant object) {
        super(object);
    }

    public OffsetDateTime toOffsetDateTime() {
        return map(OffsetDateTime::from).orElse(null);
    }

    public OffsetDateTime toOffsetDateTime(ZoneId zoneId) {
        return map(o -> OffsetDateTime.ofInstant(o, zoneId)).orElse(null);
    }

    public OffsetDateTime toOffsetDateTimeWithDefaultZoneId() {
        return map(o -> OffsetDateTime.ofInstant(o, ZoneId.systemDefault())).orElse(null);
    }

    public OffsetDateTimeUtility mapToOffsetDateTime() {
// 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/InstantUtility.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 InstantUtility extends ComparableUtility<Instant> {

    public InstantUtility(Instant object) {
        super(object);
    }

    public OffsetDateTime toOffsetDateTime() {
        return map(OffsetDateTime::from).orElse(null);
    }

    public OffsetDateTime toOffsetDateTime(ZoneId zoneId) {
        return map(o -> OffsetDateTime.ofInstant(o, zoneId)).orElse(null);
    }

    public OffsetDateTime toOffsetDateTimeWithDefaultZoneId() {
        return map(o -> OffsetDateTime.ofInstant(o, ZoneId.systemDefault())).orElse(null);
    }

    public OffsetDateTimeUtility mapToOffsetDateTime() {
        return $(toOffsetDateTime());