functionalj.lens.lenses.java.time.LocalTimeLens Maven / Gradle / Ivy
package functionalj.lens.lenses.java.time;
import java.time.LocalTime;
import functionalj.lens.core.LensSpec;
import functionalj.lens.lenses.IntegerLens;
import functionalj.lens.lenses.ObjectLensImpl;
public class LocalTimeLens
extends ObjectLensImpl
implements LocalTimeAccess {
public static final LocalTimeLens theLocalTime = new LocalTimeLens(LensSpec.of(LocalTime.class));
public final IntegerLens hour = createSubLens(LocalTime::getHour, LocalTime::withHour, IntegerLens::of);
public final IntegerLens minute = createSubLens(LocalTime::getMinute, LocalTime::withMinute, IntegerLens::of);
public final IntegerLens second = createSubLens(LocalTime::getSecond, LocalTime::withSecond, IntegerLens::of);
public final IntegerLens nano = createSubLens(LocalTime::getNano, LocalTime::withNano, IntegerLens::of);
public static LocalTimeLens of(LensSpec spec) {
return new LocalTimeLens(spec);
}
public LocalTimeLens(LensSpec spec) {
super(spec);
}
}