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

functionalj.lens.lenses.java.time.ZonedDateTimeAccess Maven / Gradle / Ivy

There is a newer version: 1.0.17
Show newest version
package functionalj.lens.lenses.java.time;

import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.temporal.TemporalAdjuster;
import java.time.temporal.TemporalAmount;
import java.time.temporal.TemporalField;
import java.time.temporal.TemporalUnit;
import java.util.function.Function;

import functionalj.lens.lenses.AnyAccess;
import functionalj.lens.lenses.ConcreteAccess;
import functionalj.lens.lenses.IntegerAccessPrimitive;
import lombok.val;


@FunctionalInterface
public interface ZonedDateTimeAccess
                    extends AnyAccess                
                    ,       TemporalAccess           
                    ,       ChronoZonedDateTimeAccess
                    ,       ConcreteAccess           > {
    
    public static  ZonedDateTimeAccess of(Function func) {
        return func::apply;
    }
    
    public default ZonedDateTimeAccess newAccess(Function accessToValue) {
        return host -> accessToValue.apply(host);
    }
    
    public default ZonedDateTimeAccess withLaterOffsetAtOverlap() {
        return host -> {
            val value = apply(host);
            return value.withLaterOffsetAtOverlap();
        };
    }
    public default ZoneIdAccess getZone() {
        return host -> {
            val value = apply(host);
            return value.getZone();
        };
    }
    public default ZonedDateTimeAccess withZoneSameLocal(ZoneId zone) {
        return host -> {
            val value = apply(host);
            return value.withZoneSameLocal(zone);
        };
    }
    public default ZonedDateTimeAccess withZoneSameInstant(ZoneId zone) {
        return host -> {
            val value = apply(host);
            return value.withZoneSameInstant(zone);
        };
    }
    public default ZonedDateTimeAccess withFixedOffsetZone() {
        return host -> {
            val value = apply(host);
            return value.withFixedOffsetZone();
        };
    }
    public default LocalDateTimeAccess toLocalDateTime() {
        return host -> {
            val value = apply(host);
            return value.toLocalDateTime();
        };
    }
    public default LocalDateAccess toLocalDate() {
        return host -> {
            val value = apply(host);
            return value.toLocalDate();
        };
    }
    public default IntegerAccessPrimitive getYear() {
        return host -> {
            val value = apply(host);
            return value.getYear();
        };
    }
    public default IntegerAccessPrimitive getMonthValue() {
        return host -> {
            val value = apply(host);
            return value.getMonthValue();
        };
    }
    public default MonthAccess getMonth() {
        return host -> {
            val value = apply(host);
            return value.getMonth();
        };
    }
    public default IntegerAccessPrimitive getDayOfMonth() {
        return host -> {
            val value = apply(host);
            return value.getDayOfMonth();
        };
    }
    public default IntegerAccessPrimitive getDayOfYear() {
        return host -> {
            val value = apply(host);
            return value.getDayOfYear();
        };
    }
    public default DayOfWeekAccess getDayOfWeek() {
        return host -> {
            val value = apply(host);
            return value.getDayOfWeek();
        };
    }
    public default LocalTimeAccess toLocalTime() {
        return host -> {
            val value = apply(host);
            return value.toLocalTime();
        };
    }
    public default IntegerAccessPrimitive getHour() {
        return host -> {
            val value = apply(host);
            return value.getHour();
        };
    }
    public default IntegerAccessPrimitive getMinute() {
        return host -> {
            val value = apply(host);
            return value.getMinute();
        };
    }
    public default IntegerAccessPrimitive getSecond() {
        return host -> {
            val value = apply(host);
            return value.getSecond();
        };
    }
    public default IntegerAccessPrimitive getNano() {
        return host -> {
            val value = apply(host);
            return value.getNano();
        };
    }
    public default ZonedDateTimeAccess with(TemporalAdjuster adjuster) {
        return host -> {
            val value = apply(host);
            return value.with(adjuster);
        };
    }
    public default ZonedDateTimeAccess with(TemporalField field, long newValue) {
        return host -> {
            val value = apply(host);
            return value.with(field, newValue);
        };
    }
    public default ZonedDateTimeAccess withYear(int year) {
        return host -> {
            val value = apply(host);
            return value.withYear(year);
        };
    }
    public default ZonedDateTimeAccess withMonth(int month) {
        return host -> {
            val value = apply(host);
            return value.withMonth(month);
        };
    }
    public default ZonedDateTimeAccess withDayOfMonth(int dayOfMonth) {
        return host -> {
            val value = apply(host);
            return value.withDayOfMonth(dayOfMonth);
        };
    }
    public default ZonedDateTimeAccess withDayOfYear(int dayOfYear) {
        return host -> {
            val value = apply(host);
            return value.withDayOfYear(dayOfYear);
        };
    }
    public default ZonedDateTimeAccess withHour(int hour) {
        return host -> {
            val value = apply(host);
            return value.withHour(hour);
        };
    }
    public default ZonedDateTimeAccess withMinute(int minute) {
        return host -> {
            val value = apply(host);
            return value.withMinute(minute);
        };
    }
    public default ZonedDateTimeAccess withSecond(int second) {
        return host -> {
            val value = apply(host);
            return value.withSecond(second);
        };
    }
    public default ZonedDateTimeAccess withNano(int nanoOfSecond) {
        return host -> {
            val value = apply(host);
            return value.withNano(nanoOfSecond);
        };
    }
    public default ZonedDateTimeAccess truncatedTo(TemporalUnit unit) {
        return host -> {
            val value = apply(host);
            return value.truncatedTo(unit);
        };
    }
    public default ZonedDateTimeAccess plus(TemporalAmount amountToAdd) {
        return host -> {
            val value = apply(host);
            return value.plus(amountToAdd);
        };
    }
    public default ZonedDateTimeAccess plus(long amountToAdd, TemporalUnit unit) {
        return host -> {
            val value = apply(host);
            return value.plus(amountToAdd, unit);
        };
    }
    public default ZonedDateTimeAccess plusYears(long years) {
        return host -> {
            val value = apply(host);
            return value.plusYears(years);
        };
    }
    public default ZonedDateTimeAccess plusMonths(long months) {
        return host -> {
            val value = apply(host);
            return value.plusMonths(months);
        };
    }
    public default ZonedDateTimeAccess plusWeeks(long weeks) {
        return host -> {
            val value = apply(host);
            return value.plusWeeks(weeks);
        };
    }
    public default ZonedDateTimeAccess plusDays(long days) {
        return host -> {
            val value = apply(host);
            return value.plusDays(days);
        };
    }
    public default ZonedDateTimeAccess plusHours(long hours) {
        return host -> {
            val value = apply(host);
            return value.plusHours(hours);
        };
    }
    public default ZonedDateTimeAccess plusMinutes(long minutes) {
        return host -> {
            val value = apply(host);
            return value.plusMinutes(minutes);
        };
    }
    public default ZonedDateTimeAccess plusSeconds(long seconds) {
        return host -> {
            val value = apply(host);
            return value.plusSeconds(seconds);
        };
    }
    public default ZonedDateTimeAccess plusNanos(long nanos) {
        return host -> {
            val value = apply(host);
            return value.plusNanos(nanos);
        };
    }
    public default ZonedDateTimeAccess minus(TemporalAmount amountToSubtract) {
        return host -> {
            val value = apply(host);
            return value.minus(amountToSubtract);
        };
    }
    public default ZonedDateTimeAccess minus(long amountToSubtract, TemporalUnit unit) {
        return host -> {
            val value = apply(host);
            return value.minus(amountToSubtract, unit);
        };
    }
    public default ZonedDateTimeAccess minusYears(long years) {
        return host -> {
            val value = apply(host);
            return value.minusYears(years);
        };
    }
    public default ZonedDateTimeAccess minusMonths(long months) {
        return host -> {
            val value = apply(host);
            return value.minusMonths(months);
        };
    }
    public default ZonedDateTimeAccess minusWeeks(long weeks) {
        return host -> {
            val value = apply(host);
            return value.minusWeeks(weeks);
        };
    }
    public default ZonedDateTimeAccess minusDays(long days) {
        return host -> {
            val value = apply(host);
            return value.minusDays(days);
        };
    }
    public default ZonedDateTimeAccess minusHours(long hours) {
        return host -> {
            val value = apply(host);
            return value.minusHours(hours);
        };
    }
    public default ZonedDateTimeAccess minusMinutes(long minutes) {
        return host -> {
            val value = apply(host);
            return value.minusMinutes(minutes);
        };
    }
    public default ZonedDateTimeAccess minusSeconds(long seconds) {
        return host -> {
            val value = apply(host);
            return value.minusSeconds(seconds);
        };
    }
    public default ZonedDateTimeAccess minusNanos(long nanos) {
        return host -> {
            val value = apply(host);
            return value.minusNanos(nanos);
        };
    }
    public default OffsetDateTimeAccess toOffsetDateTime() {
        return host -> {
            val value = apply(host);
            return value.toOffsetDateTime();
        };
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy