functionalj.lens.lenses.java.time.MonthLens Maven / Gradle / Ivy
package functionalj.lens.lenses.java.time;
import static java.time.Month.APRIL;
import static java.time.Month.AUGUST;
import static java.time.Month.DECEMBER;
import static java.time.Month.FEBRUARY;
import static java.time.Month.JANUARY;
import static java.time.Month.JULY;
import static java.time.Month.JUNE;
import static java.time.Month.MARCH;
import static java.time.Month.MAY;
import static java.time.Month.NOVEMBER;
import static java.time.Month.OCTOBER;
import static java.time.Month.SEPTEMBER;
import java.time.Month;
import functionalj.function.Func1;
import functionalj.lens.core.LensSpec;
import functionalj.lens.lenses.ObjectLensImpl;
public class MonthLens
extends ObjectLensImpl
implements MonthAccess {
public static final MonthLens theMonth = new MonthLens(LensSpec.of(Month.class));
public static MonthLens of(LensSpec spec) {
return new MonthLens(spec);
}
public MonthLens(LensSpec spec) {
super(spec);
}
public final Func1 toJanuary = changeTo(JANUARY);
public final Func1 toFebruary = changeTo(FEBRUARY);
public final Func1 toMarch = changeTo(MARCH);
public final Func1 toApril = changeTo(APRIL);
public final Func1 toMay = changeTo(MAY);
public final Func1 toJune = changeTo(JUNE);
public final Func1 toJuly = changeTo(JULY);
public final Func1 toAugust = changeTo(AUGUST);
public final Func1 toSeptember = changeTo(SEPTEMBER);
public final Func1 toOctober = changeTo(OCTOBER);
public final Func1 toNovember = changeTo(NOVEMBER);
public final Func1 toDecember = changeTo(DECEMBER);
}