/** * Constructs a left side of the disjoint union, as opposed to the Right side. * * @param value The value of the left side * @return A left sided disjoint union */ public static <A, B> Either<A, B> Left(A value) { return new Either<A, B>(Some(value), None()); }
/** * Constructs a right side of the disjoint union, as opposed to the Left side. * * @param value The value of the right side * @return A right sided disjoint union */ public static <A, B> Either<A, B> Right(B value) { return new Either<A, B>(None(), Some(value)); }
@SuppressWarnings("unchecked") public Form(String name, Class<T> clazz) { this(name, clazz, new HashMap<String,String>(), new HashMap<String,List<ValidationError>>(), None(), null); }
@SuppressWarnings("unchecked") public Form(String name, Class<T> clazz) { this(name, clazz, new HashMap<String,String>(), new HashMap<String,List<ValidationError>>(), None(), null); }
@SuppressWarnings("unchecked") public Form(String name, Class<T> clazz, Class<?> groups) { this(name, clazz, new HashMap<String,String>(), new HashMap<String,List<ValidationError>>(), None(), groups); }
@SuppressWarnings("unchecked") public Form(String name, Class<T> clazz, Class<?> groups) { this(name, clazz, new HashMap<String,String>(), new HashMap<String,List<ValidationError>>(), None(), groups); }