functionalj.lens.lenses.java.time.ZoneOffsetTransitionAccess Maven / Gradle / Ivy
package functionalj.lens.lenses.java.time;
import java.time.ZoneOffset;
import java.time.zone.ZoneOffsetTransition;
import java.util.function.Function;
import functionalj.lens.lenses.AnyAccess;
import functionalj.lens.lenses.BooleanAccess;
import functionalj.lens.lenses.ConcreteAccess;
import functionalj.lens.lenses.IntegerAccess;
import functionalj.lens.lenses.LongAccess;
import lombok.val;
@FunctionalInterface
public interface ZoneOffsetTransitionAccess
extends AnyAccess
, ConcreteAccess > {
public static ZoneOffsetTransitionAccess of(Function func) {
return func::apply;
}
public default ZoneOffsetTransitionAccess newAccess(Function accessToValue) {
return ZoneOffsetTransitionAccess.of(accessToValue);
}
public default InstantAccess getInstant() {
return host -> {
val value = apply(host);
return value.getInstant();
};
}
public default LongAccess toEpochSecond() {
return host -> {
val value = apply(host);
return value.toEpochSecond();
};
}
public default LocalDateTimeAccess getDateTimeBefore() {
return host -> {
val value = apply(host);
return value.getDateTimeBefore();
};
}
public default LocalDateTimeAccess getDateTimeAfter() {
return host -> {
val value = apply(host);
return value.getDateTimeAfter();
};
}
public default ZoneOffsetAccess getOffsetBefore() {
return host -> {
val value = apply(host);
return value.getOffsetBefore();
};
}
public default ZoneOffsetAccess getOffsetAfter() {
return host -> {
val value = apply(host);
return value.getOffsetAfter();
};
}
public default DurationAccess getDuration() {
return host -> {
val value = apply(host);
return value.getDuration();
};
}
public default BooleanAccess isGap() {
return host -> {
val value = apply(host);
return value.isGap();
};
}
public default BooleanAccess isOverlap() {
return host -> {
val value = apply(host);
return value.isOverlap();
};
}
public default BooleanAccess isValidOffset(ZoneOffset offset) {
return host -> {
val value = apply(host);
return value.isValidOffset(offset);
};
}
public default IntegerAccess compareTo(ZoneOffsetTransition other) {
return host -> {
val value = apply(host);
return value.compareTo(other);
};
}
public default BooleanAccess thatGreaterThan(ZoneOffsetTransition anotherValue) {
return booleanAccess(false, any -> any.compareTo(anotherValue) > 0);
}
public default BooleanAccess thatLessThan(ZoneOffsetTransition anotherValue) {
return booleanAccess(false, any -> any.compareTo(anotherValue) < 0);
}
public default BooleanAccess thatGreaterThanOrEqualsTo(ZoneOffsetTransition anotherValue) {
return booleanAccess(false, any -> any.compareTo(anotherValue) >= 0);
}
public default BooleanAccess thatLessThanOrEqualsTo(ZoneOffsetTransition anotherValue) {
return booleanAccess(false, any -> any.compareTo(anotherValue) <= 0);
}
}