index
int64
repo_id
string
file_path
string
content
string
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments15Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function15; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments15Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; protected final ValueValidator<? super A, ? extends R4> v4; protected final ValueValidator<? super A, ? extends R5> v5; protected final ValueValidator<? super A, ? extends R6> v6; protected final ValueValidator<? super A, ? extends R7> v7; protected final ValueValidator<? super A, ? extends R8> v8; protected final ValueValidator<? super A, ? extends R9> v9; protected final ValueValidator<? super A, ? extends R10> v10; protected final ValueValidator<? super A, ? extends R11> v11; protected final ValueValidator<? super A, ? extends R12> v12; protected final ValueValidator<? super A, ? extends R13> v13; protected final ValueValidator<? super A, ? extends R14> v14; protected final ValueValidator<? super A, ? extends R15> v15; public Arguments15Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10, ValueValidator<? super A, ? extends R11> v11, ValueValidator<? super A, ? extends R12> v12, ValueValidator<? super A, ? extends R13> v13, ValueValidator<? super A, ? extends R14> v14, ValueValidator<? super A, ? extends R15> v15) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; this.v13 = v13; this.v14 = v14; this.v15 = v15; } public <X> Arguments1Validator<A, X> apply( Function15<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? super R13, ? super R14, ? super R15, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments15Combining.this.v1.validate(a, locale, constraintContext), Arguments15Combining.this.v2.validate(a, locale, constraintContext), Arguments15Combining.this.v3.validate(a, locale, constraintContext), Arguments15Combining.this.v4.validate(a, locale, constraintContext), Arguments15Combining.this.v5.validate(a, locale, constraintContext), Arguments15Combining.this.v6.validate(a, locale, constraintContext), Arguments15Combining.this.v7.validate(a, locale, constraintContext), Arguments15Combining.this.v8.validate(a, locale, constraintContext), Arguments15Combining.this.v9.validate(a, locale, constraintContext), Arguments15Combining.this.v10.validate(a, locale, constraintContext), Arguments15Combining.this.v11.validate(a, locale, constraintContext), Arguments15Combining.this.v12.validate(a, locale, constraintContext), Arguments15Combining.this.v13.validate(a, locale, constraintContext), Arguments15Combining.this.v14.validate(a, locale, constraintContext), Arguments15Combining.this.v15.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15), Arguments15Combining.this.v1.validate(a, locale, constraintContext), Arguments15Combining.this.v2.validate(a, locale, constraintContext), Arguments15Combining.this.v3.validate(a, locale, constraintContext), Arguments15Combining.this.v4.validate(a, locale, constraintContext), Arguments15Combining.this.v5.validate(a, locale, constraintContext), Arguments15Combining.this.v6.validate(a, locale, constraintContext), Arguments15Combining.this.v7.validate(a, locale, constraintContext), Arguments15Combining.this.v8.validate(a, locale, constraintContext), Arguments15Combining.this.v9.validate(a, locale, constraintContext), Arguments15Combining.this.v10.validate(a, locale, constraintContext), Arguments15Combining.this.v11.validate(a, locale, constraintContext), Arguments15Combining.this.v12.validate(a, locale, constraintContext), Arguments15Combining.this.v13.validate(a, locale, constraintContext), Arguments15Combining.this.v14.validate(a, locale, constraintContext), Arguments15Combining.this.v15.validate(a, locale, constraintContext)); } }; } public <R16> Arguments16Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> combine( ValueValidator<? super A, ? extends R16> v16) { return new Arguments16Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments15Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function15; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments15Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; protected final ValueValidator<? super A4, ? extends R4> v4; protected final ValueValidator<? super A5, ? extends R5> v5; protected final ValueValidator<? super A6, ? extends R6> v6; protected final ValueValidator<? super A7, ? extends R7> v7; protected final ValueValidator<? super A8, ? extends R8> v8; protected final ValueValidator<? super A9, ? extends R9> v9; protected final ValueValidator<? super A10, ? extends R10> v10; protected final ValueValidator<? super A11, ? extends R11> v11; protected final ValueValidator<? super A12, ? extends R12> v12; protected final ValueValidator<? super A13, ? extends R13> v13; protected final ValueValidator<? super A14, ? extends R14> v14; protected final ValueValidator<? super A15, ? extends R15> v15; public Arguments15Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10, ValueValidator<? super A11, ? extends R11> v11, ValueValidator<? super A12, ? extends R12> v12, ValueValidator<? super A13, ? extends R13> v13, ValueValidator<? super A14, ? extends R14> v14, ValueValidator<? super A15, ? extends R15> v15) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; this.v13 = v13; this.v14 = v14; this.v15 = v15; } public <X> Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> apply( Function15<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? super R13, ? super R14, ? super R15, ? extends X> f) { return new Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X>() { @Override public Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Supplier<X>> lazy() { return ((a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext), v8.validate(a8, locale, constraintContext), v9.validate(a9, locale, constraintContext), v10.validate(a10, locale, constraintContext), v11.validate(a11, locale, constraintContext), v12.validate(a12, locale, constraintContext), v13.validate(a13, locale, constraintContext), v14.validate(a14, locale, constraintContext), v15.validate(a15, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext), v8.validate(a8, locale, constraintContext), v9.validate(a9, locale, constraintContext), v10.validate(a10, locale, constraintContext), v11.validate(a11, locale, constraintContext), v12.validate(a12, locale, constraintContext), v13.validate(a13, locale, constraintContext), v14.validate(a14, locale, constraintContext), v15.validate(a15, locale, constraintContext)); } }; } public <A16, R16> Arguments16Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> split( ValueValidator<? super A16, ? extends R16> v16) { return new Arguments16Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments15Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> { /** * Convert an Arguments1Validator that validates Arguments15 to an * Arguments15Validator * @param validator validator for Arguments15 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <A4> type of argument at position 4 * @param <A5> type of argument at position 5 * @param <A6> type of argument at position 6 * @param <A7> type of argument at position 7 * @param <A8> type of argument at position 8 * @param <A9> type of argument at position 9 * @param <A10> type of argument at position 10 * @param <A11> type of argument at position 11 * @param <A12> type of argument at position 12 * @param <A13> type of argument at position 13 * @param <A14> type of argument at position 14 * @param <A15> type of argument at position 15 * @param <X> target result type * @return arguments15 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> unwrap( Arguments1Validator<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>, X> validator) { return new Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, Locale locale, ConstraintContext constraintContext) { return validator.validate( Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15), locale, constraintContext); } @Override public Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Supplier<X>> lazy() { return Arguments15Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments15 as a single object. * @return a validator that takes an Arguments15 * @since 0.16.0 */ default Arguments1Validator<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>, X> wrap() { return new Arguments1Validator<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>, X>() { @Override public Validated<X> validate( Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> args, Locale locale, ConstraintContext constraintContext) { final Arguments15<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9, ? extends A10, ? extends A11, ? extends A12, ? extends A13, ? extends A14, ? extends A15> nonNullArgs = Objects .requireNonNull(args); return Arguments15Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), nonNullArgs.arg4(), nonNullArgs.arg5(), nonNullArgs.arg6(), nonNullArgs.arg7(), nonNullArgs.arg8(), nonNullArgs.arg9(), nonNullArgs.arg10(), nonNullArgs.arg11(), nonNullArgs.arg12(), nonNullArgs.arg13(), nonNullArgs.arg14(), nonNullArgs.arg15(), locale, constraintContext); } @Override public Arguments1Validator<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>, Supplier<X>> lazy() { return Arguments15Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X2> andThen( Function<? super X, ? extends X2> mapper) { return new Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11, A12 a12, A13 a13, A14 a14, A15 a15, Locale locale, ConstraintContext constraintContext) { return Arguments15Validator.this .validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, locale, constraintContext) .map(mapper); } @Override public Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Supplier<X2>> lazy() { return Arguments15Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X2> andThen( ValueValidator<? super X, X2> validator) { return new Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11, A12 a12, A13 a13, A14 a14, A15 a15, Locale locale, ConstraintContext constraintContext) { return Arguments15Validator.this .validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Supplier<X2>> lazy() { return Arguments15Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments15<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9, ? extends A10, ? extends A11, ? extends A12, ? extends A13, ? extends A14, ? extends A15>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments15<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9, ? extends A10, ? extends A11, ? extends A12, ? extends A13, ? extends A14, ? extends A15> args = mapper .apply(a); return Arguments15Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), args.arg4(), args.arg5(), args.arg6(), args.arg7(), args.arg8(), args.arg9(), args.arg10(), args.arg11(), args.arg12(), args.arg13(), args.arg14(), args.arg15(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments15Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, Locale locale) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, constraintContext) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, locale) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this .validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, locale, constraintContext) .orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments16.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function16; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 16 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @param <A3> the type of argument at position 3 * @param <A4> the type of argument at position 4 * @param <A5> the type of argument at position 5 * @param <A6> the type of argument at position 6 * @param <A7> the type of argument at position 7 * @param <A8> the type of argument at position 8 * @param <A9> the type of argument at position 9 * @param <A10> the type of argument at position 10 * @param <A11> the type of argument at position 11 * @param <A12> the type of argument at position 12 * @param <A13> the type of argument at position 13 * @param <A14> the type of argument at position 14 * @param <A15> the type of argument at position 15 * @param <A16> the type of argument at position 16 * @since 0.3.0 */ public final class Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> { private final A1 arg1; private final A2 arg2; private final A3 arg3; private final A4 arg4; private final A5 arg5; private final A6 arg6; private final A7 arg7; private final A8 arg8; private final A9 arg9; private final A10 arg10; private final A11 arg11; private final A12 arg12; private final A13 arg13; private final A14 arg14; private final A15 arg15; private final A16 arg16; /** * Creates a new Arguments16 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2, arg3 the * argument at position 3, arg4 the argument at position 4, arg5 the argument at * position 5, arg6 the argument at position 6, arg7 the argument at position 7, arg8 * the argument at position 8, arg9 the argument at position 9, arg10 the argument at * position 10, arg11 the argument at position 11, arg12 the argument at position 12, * arg13 the argument at position 13, arg14 the argument at position 14, arg15 the * argument at position 15, arg16 the argument at position 16 */ Arguments16(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3, @Nullable A4 arg4, @Nullable A5 arg5, @Nullable A6 arg6, @Nullable A7 arg7, @Nullable A8 arg8, @Nullable A9 arg9, @Nullable A10 arg10, @Nullable A11 arg11, @Nullable A12 arg12, @Nullable A13 arg13, @Nullable A14 arg14, @Nullable A15 arg15, @Nullable A16 arg16) { this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; this.arg4 = arg4; this.arg5 = arg5; this.arg6 = arg6; this.arg7 = arg7; this.arg8 = arg8; this.arg9 = arg9; this.arg10 = arg10; this.arg11 = arg11; this.arg12 = arg12; this.arg13 = arg13; this.arg14 = arg14; this.arg15 = arg15; this.arg16 = arg16; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Returns the argument at position 3. * @return the argument at position 3 */ @Nullable public A3 arg3() { return this.arg3; } /** * Returns the argument at position 4. * @return the argument at position 4 */ @Nullable public A4 arg4() { return this.arg4; } /** * Returns the argument at position 5. * @return the argument at position 5 */ @Nullable public A5 arg5() { return this.arg5; } /** * Returns the argument at position 6. * @return the argument at position 6 */ @Nullable public A6 arg6() { return this.arg6; } /** * Returns the argument at position 7. * @return the argument at position 7 */ @Nullable public A7 arg7() { return this.arg7; } /** * Returns the argument at position 8. * @return the argument at position 8 */ @Nullable public A8 arg8() { return this.arg8; } /** * Returns the argument at position 9. * @return the argument at position 9 */ @Nullable public A9 arg9() { return this.arg9; } /** * Returns the argument at position 10. * @return the argument at position 10 */ @Nullable public A10 arg10() { return this.arg10; } /** * Returns the argument at position 11. * @return the argument at position 11 */ @Nullable public A11 arg11() { return this.arg11; } /** * Returns the argument at position 12. * @return the argument at position 12 */ @Nullable public A12 arg12() { return this.arg12; } /** * Returns the argument at position 13. * @return the argument at position 13 */ @Nullable public A13 arg13() { return this.arg13; } /** * Returns the argument at position 14. * @return the argument at position 14 */ @Nullable public A14 arg14() { return this.arg14; } /** * Returns the argument at position 15. * @return the argument at position 15 */ @Nullable public A15 arg15() { return this.arg15; } /** * Returns the argument at position 16. * @return the argument at position 16 */ @Nullable public A16 arg16() { return this.arg16; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map( Function16<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? super A16, ? extends X> mapper) { return mapper.apply(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments2 instance containing only the first 2 arguments. * @return an Arguments2 instance with arguments from arg1 to arg2 * @since 0.16.0 */ public Arguments2<A1, A2> first2() { return new Arguments2<>(arg1, arg2); } /** * Returns a new Arguments3 instance containing only the first 3 arguments. * @return an Arguments3 instance with arguments from arg1 to arg3 * @since 0.16.0 */ public Arguments3<A1, A2, A3> first3() { return new Arguments3<>(arg1, arg2, arg3); } /** * Returns a new Arguments4 instance containing only the first 4 arguments. * @return an Arguments4 instance with arguments from arg1 to arg4 * @since 0.16.0 */ public Arguments4<A1, A2, A3, A4> first4() { return new Arguments4<>(arg1, arg2, arg3, arg4); } /** * Returns a new Arguments5 instance containing only the first 5 arguments. * @return an Arguments5 instance with arguments from arg1 to arg5 * @since 0.16.0 */ public Arguments5<A1, A2, A3, A4, A5> first5() { return new Arguments5<>(arg1, arg2, arg3, arg4, arg5); } /** * Returns a new Arguments6 instance containing only the first 6 arguments. * @return an Arguments6 instance with arguments from arg1 to arg6 * @since 0.16.0 */ public Arguments6<A1, A2, A3, A4, A5, A6> first6() { return new Arguments6<>(arg1, arg2, arg3, arg4, arg5, arg6); } /** * Returns a new Arguments7 instance containing only the first 7 arguments. * @return an Arguments7 instance with arguments from arg1 to arg7 * @since 0.16.0 */ public Arguments7<A1, A2, A3, A4, A5, A6, A7> first7() { return new Arguments7<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7); } /** * Returns a new Arguments8 instance containing only the first 8 arguments. * @return an Arguments8 instance with arguments from arg1 to arg8 * @since 0.16.0 */ public Arguments8<A1, A2, A3, A4, A5, A6, A7, A8> first8() { return new Arguments8<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); } /** * Returns a new Arguments9 instance containing only the first 9 arguments. * @return an Arguments9 instance with arguments from arg1 to arg9 * @since 0.16.0 */ public Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9> first9() { return new Arguments9<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); } /** * Returns a new Arguments10 instance containing only the first 10 arguments. * @return an Arguments10 instance with arguments from arg1 to arg10 * @since 0.16.0 */ public Arguments10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> first10() { return new Arguments10<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); } /** * Returns a new Arguments11 instance containing only the first 11 arguments. * @return an Arguments11 instance with arguments from arg1 to arg11 * @since 0.16.0 */ public Arguments11<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11> first11() { return new Arguments11<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); } /** * Returns a new Arguments12 instance containing only the first 12 arguments. * @return an Arguments12 instance with arguments from arg1 to arg12 * @since 0.16.0 */ public Arguments12<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12> first12() { return new Arguments12<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); } /** * Returns a new Arguments13 instance containing only the first 13 arguments. * @return an Arguments13 instance with arguments from arg1 to arg13 * @since 0.16.0 */ public Arguments13<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> first13() { return new Arguments13<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); } /** * Returns a new Arguments14 instance containing only the first 14 arguments. * @return an Arguments14 instance with arguments from arg1 to arg14 * @since 0.16.0 */ public Arguments14<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14> first14() { return new Arguments14<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); } /** * Returns a new Arguments15 instance containing only the first 15 arguments. * @return an Arguments15 instance with arguments from arg1 to arg15 * @since 0.16.0 */ public Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> first15() { return new Arguments15<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg16 to arg16 * @since 0.16.0 */ public Arguments1<A16> last1() { return new Arguments1<>(arg16); } /** * Returns a new Arguments2 instance containing only the last 2 arguments. * @return an Arguments2 instance with arguments from arg15 to arg16 * @since 0.16.0 */ public Arguments2<A15, A16> last2() { return new Arguments2<>(arg15, arg16); } /** * Returns a new Arguments3 instance containing only the last 3 arguments. * @return an Arguments3 instance with arguments from arg14 to arg16 * @since 0.16.0 */ public Arguments3<A14, A15, A16> last3() { return new Arguments3<>(arg14, arg15, arg16); } /** * Returns a new Arguments4 instance containing only the last 4 arguments. * @return an Arguments4 instance with arguments from arg13 to arg16 * @since 0.16.0 */ public Arguments4<A13, A14, A15, A16> last4() { return new Arguments4<>(arg13, arg14, arg15, arg16); } /** * Returns a new Arguments5 instance containing only the last 5 arguments. * @return an Arguments5 instance with arguments from arg12 to arg16 * @since 0.16.0 */ public Arguments5<A12, A13, A14, A15, A16> last5() { return new Arguments5<>(arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments6 instance containing only the last 6 arguments. * @return an Arguments6 instance with arguments from arg11 to arg16 * @since 0.16.0 */ public Arguments6<A11, A12, A13, A14, A15, A16> last6() { return new Arguments6<>(arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments7 instance containing only the last 7 arguments. * @return an Arguments7 instance with arguments from arg10 to arg16 * @since 0.16.0 */ public Arguments7<A10, A11, A12, A13, A14, A15, A16> last7() { return new Arguments7<>(arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments8 instance containing only the last 8 arguments. * @return an Arguments8 instance with arguments from arg9 to arg16 * @since 0.16.0 */ public Arguments8<A9, A10, A11, A12, A13, A14, A15, A16> last8() { return new Arguments8<>(arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments9 instance containing only the last 9 arguments. * @return an Arguments9 instance with arguments from arg8 to arg16 * @since 0.16.0 */ public Arguments9<A8, A9, A10, A11, A12, A13, A14, A15, A16> last9() { return new Arguments9<>(arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments10 instance containing only the last 10 arguments. * @return an Arguments10 instance with arguments from arg7 to arg16 * @since 0.16.0 */ public Arguments10<A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> last10() { return new Arguments10<>(arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments11 instance containing only the last 11 arguments. * @return an Arguments11 instance with arguments from arg6 to arg16 * @since 0.16.0 */ public Arguments11<A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> last11() { return new Arguments11<>(arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments12 instance containing only the last 12 arguments. * @return an Arguments12 instance with arguments from arg5 to arg16 * @since 0.16.0 */ public Arguments12<A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> last12() { return new Arguments12<>(arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments13 instance containing only the last 13 arguments. * @return an Arguments13 instance with arguments from arg4 to arg16 * @since 0.16.0 */ public Arguments13<A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> last13() { return new Arguments13<>(arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments14 instance containing only the last 14 arguments. * @return an Arguments14 instance with arguments from arg3 to arg16 * @since 0.16.0 */ public Arguments14<A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> last14() { return new Arguments14<>(arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments15 instance containing only the last 15 arguments. * @return an Arguments15 instance with arguments from arg2 to arg16 * @since 0.16.0 */ public Arguments15<A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> last15() { return new Arguments15<>(arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); } /** * Returns a new Arguments16 instance with the arguments in reverse order. * @return an Arguments16 instance with arguments in reverse order * @since 0.16.0 */ public Arguments16<A16, A15, A14, A13, A12, A11, A10, A9, A8, A7, A6, A5, A4, A3, A2, A1> reverse() { return new Arguments16<>(arg16, arg15, arg14, arg13, arg12, arg11, arg10, arg9, arg8, arg7, arg6, arg5, arg4, arg3, arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> that = (Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2) && Objects.equals(this.arg3, that.arg3) && Objects.equals(this.arg4, that.arg4) && Objects.equals(this.arg5, that.arg5) && Objects.equals(this.arg6, that.arg6) && Objects.equals(this.arg7, that.arg7) && Objects.equals(this.arg8, that.arg8) && Objects.equals(this.arg9, that.arg9) && Objects.equals(this.arg10, that.arg10) && Objects.equals(this.arg11, that.arg11) && Objects.equals(this.arg12, that.arg12) && Objects.equals(this.arg13, that.arg13) && Objects.equals(this.arg14, that.arg14) && Objects.equals(this.arg15, that.arg15) && Objects.equals(this.arg16, that.arg16); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7, this.arg8, this.arg9, this.arg10, this.arg11, this.arg12, this.arg13, this.arg14, this.arg15, this.arg16); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments16{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + ", " + "arg3=" + this.arg3 + ", " + "arg4=" + this.arg4 + ", " + "arg5=" + this.arg5 + ", " + "arg6=" + this.arg6 + ", " + "arg7=" + this.arg7 + ", " + "arg8=" + this.arg8 + ", " + "arg9=" + this.arg9 + ", " + "arg10=" + this.arg10 + ", " + "arg11=" + this.arg11 + ", " + "arg12=" + this.arg12 + ", " + "arg13=" + this.arg13 + ", " + "arg14=" + this.arg14 + ", " + "arg15=" + this.arg15 + ", " + "arg16=" + this.arg16 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments16Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function16; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments16Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; protected final ValueValidator<? super A, ? extends R4> v4; protected final ValueValidator<? super A, ? extends R5> v5; protected final ValueValidator<? super A, ? extends R6> v6; protected final ValueValidator<? super A, ? extends R7> v7; protected final ValueValidator<? super A, ? extends R8> v8; protected final ValueValidator<? super A, ? extends R9> v9; protected final ValueValidator<? super A, ? extends R10> v10; protected final ValueValidator<? super A, ? extends R11> v11; protected final ValueValidator<? super A, ? extends R12> v12; protected final ValueValidator<? super A, ? extends R13> v13; protected final ValueValidator<? super A, ? extends R14> v14; protected final ValueValidator<? super A, ? extends R15> v15; protected final ValueValidator<? super A, ? extends R16> v16; public Arguments16Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10, ValueValidator<? super A, ? extends R11> v11, ValueValidator<? super A, ? extends R12> v12, ValueValidator<? super A, ? extends R13> v13, ValueValidator<? super A, ? extends R14> v14, ValueValidator<? super A, ? extends R15> v15, ValueValidator<? super A, ? extends R16> v16) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; this.v13 = v13; this.v14 = v14; this.v15 = v15; this.v16 = v16; } public <X> Arguments1Validator<A, X> apply( Function16<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? super R13, ? super R14, ? super R15, ? super R16, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments16Combining.this.v1.validate(a, locale, constraintContext), Arguments16Combining.this.v2.validate(a, locale, constraintContext), Arguments16Combining.this.v3.validate(a, locale, constraintContext), Arguments16Combining.this.v4.validate(a, locale, constraintContext), Arguments16Combining.this.v5.validate(a, locale, constraintContext), Arguments16Combining.this.v6.validate(a, locale, constraintContext), Arguments16Combining.this.v7.validate(a, locale, constraintContext), Arguments16Combining.this.v8.validate(a, locale, constraintContext), Arguments16Combining.this.v9.validate(a, locale, constraintContext), Arguments16Combining.this.v10.validate(a, locale, constraintContext), Arguments16Combining.this.v11.validate(a, locale, constraintContext), Arguments16Combining.this.v12.validate(a, locale, constraintContext), Arguments16Combining.this.v13.validate(a, locale, constraintContext), Arguments16Combining.this.v14.validate(a, locale, constraintContext), Arguments16Combining.this.v15.validate(a, locale, constraintContext), Arguments16Combining.this.v16.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16), Arguments16Combining.this.v1.validate(a, locale, constraintContext), Arguments16Combining.this.v2.validate(a, locale, constraintContext), Arguments16Combining.this.v3.validate(a, locale, constraintContext), Arguments16Combining.this.v4.validate(a, locale, constraintContext), Arguments16Combining.this.v5.validate(a, locale, constraintContext), Arguments16Combining.this.v6.validate(a, locale, constraintContext), Arguments16Combining.this.v7.validate(a, locale, constraintContext), Arguments16Combining.this.v8.validate(a, locale, constraintContext), Arguments16Combining.this.v9.validate(a, locale, constraintContext), Arguments16Combining.this.v10.validate(a, locale, constraintContext), Arguments16Combining.this.v11.validate(a, locale, constraintContext), Arguments16Combining.this.v12.validate(a, locale, constraintContext), Arguments16Combining.this.v13.validate(a, locale, constraintContext), Arguments16Combining.this.v14.validate(a, locale, constraintContext), Arguments16Combining.this.v15.validate(a, locale, constraintContext), Arguments16Combining.this.v16.validate(a, locale, constraintContext)); } }; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments16Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function16; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments16Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; protected final ValueValidator<? super A4, ? extends R4> v4; protected final ValueValidator<? super A5, ? extends R5> v5; protected final ValueValidator<? super A6, ? extends R6> v6; protected final ValueValidator<? super A7, ? extends R7> v7; protected final ValueValidator<? super A8, ? extends R8> v8; protected final ValueValidator<? super A9, ? extends R9> v9; protected final ValueValidator<? super A10, ? extends R10> v10; protected final ValueValidator<? super A11, ? extends R11> v11; protected final ValueValidator<? super A12, ? extends R12> v12; protected final ValueValidator<? super A13, ? extends R13> v13; protected final ValueValidator<? super A14, ? extends R14> v14; protected final ValueValidator<? super A15, ? extends R15> v15; protected final ValueValidator<? super A16, ? extends R16> v16; public Arguments16Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10, ValueValidator<? super A11, ? extends R11> v11, ValueValidator<? super A12, ? extends R12> v12, ValueValidator<? super A13, ? extends R13> v13, ValueValidator<? super A14, ? extends R14> v14, ValueValidator<? super A15, ? extends R15> v15, ValueValidator<? super A16, ? extends R16> v16) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; this.v13 = v13; this.v14 = v14; this.v15 = v15; this.v16 = v16; } public <X> Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> apply( Function16<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? super R13, ? super R14, ? super R15, ? super R16, ? extends X> f) { return new Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X>() { @Override public Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Supplier<X>> lazy() { return ((a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext), v8.validate(a8, locale, constraintContext), v9.validate(a9, locale, constraintContext), v10.validate(a10, locale, constraintContext), v11.validate(a11, locale, constraintContext), v12.validate(a12, locale, constraintContext), v13.validate(a13, locale, constraintContext), v14.validate(a14, locale, constraintContext), v15.validate(a15, locale, constraintContext), v16.validate(a16, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext), v8.validate(a8, locale, constraintContext), v9.validate(a9, locale, constraintContext), v10.validate(a10, locale, constraintContext), v11.validate(a11, locale, constraintContext), v12.validate(a12, locale, constraintContext), v13.validate(a13, locale, constraintContext), v14.validate(a14, locale, constraintContext), v15.validate(a15, locale, constraintContext), v16.validate(a16, locale, constraintContext)); } }; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments16Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> { /** * Convert an Arguments1Validator that validates Arguments16 to an * Arguments16Validator * @param validator validator for Arguments16 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <A4> type of argument at position 4 * @param <A5> type of argument at position 5 * @param <A6> type of argument at position 6 * @param <A7> type of argument at position 7 * @param <A8> type of argument at position 8 * @param <A9> type of argument at position 9 * @param <A10> type of argument at position 10 * @param <A11> type of argument at position 11 * @param <A12> type of argument at position 12 * @param <A13> type of argument at position 13 * @param <A14> type of argument at position 14 * @param <A15> type of argument at position 15 * @param <A16> type of argument at position 16 * @param <X> target result type * @return arguments16 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> unwrap( Arguments1Validator<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>, X> validator) { return new Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, Locale locale, ConstraintContext constraintContext) { return validator.validate( Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16), locale, constraintContext); } @Override public Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Supplier<X>> lazy() { return Arguments16Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments16 as a single object. * @return a validator that takes an Arguments16 * @since 0.16.0 */ default Arguments1Validator<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>, X> wrap() { return new Arguments1Validator<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>, X>() { @Override public Validated<X> validate( Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> args, Locale locale, ConstraintContext constraintContext) { final Arguments16<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9, ? extends A10, ? extends A11, ? extends A12, ? extends A13, ? extends A14, ? extends A15, ? extends A16> nonNullArgs = Objects .requireNonNull(args); return Arguments16Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), nonNullArgs.arg4(), nonNullArgs.arg5(), nonNullArgs.arg6(), nonNullArgs.arg7(), nonNullArgs.arg8(), nonNullArgs.arg9(), nonNullArgs.arg10(), nonNullArgs.arg11(), nonNullArgs.arg12(), nonNullArgs.arg13(), nonNullArgs.arg14(), nonNullArgs.arg15(), nonNullArgs.arg16(), locale, constraintContext); } @Override public Arguments1Validator<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>, Supplier<X>> lazy() { return Arguments16Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X2> andThen( Function<? super X, ? extends X2> mapper) { return new Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11, A12 a12, A13 a13, A14 a14, A15 a15, A16 a16, Locale locale, ConstraintContext constraintContext) { return Arguments16Validator.this .validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, locale, constraintContext) .map(mapper); } @Override public Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Supplier<X2>> lazy() { return Arguments16Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X2> andThen( ValueValidator<? super X, X2> validator) { return new Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11, A12 a12, A13 a13, A14 a14, A15 a15, A16 a16, Locale locale, ConstraintContext constraintContext) { return Arguments16Validator.this .validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Supplier<X2>> lazy() { return Arguments16Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments16<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9, ? extends A10, ? extends A11, ? extends A12, ? extends A13, ? extends A14, ? extends A15, ? extends A16>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments16<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9, ? extends A10, ? extends A11, ? extends A12, ? extends A13, ? extends A14, ? extends A15, ? extends A16> args = mapper .apply(a); return Arguments16Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), args.arg4(), args.arg5(), args.arg6(), args.arg7(), args.arg8(), args.arg9(), args.arg10(), args.arg11(), args.arg12(), args.arg13(), args.arg14(), args.arg15(), args.arg16(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments16Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, Locale locale) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, constraintContext) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, locale) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this .validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, locale, constraintContext) .orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments1Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Collection; import java.util.List; import java.util.Locale; import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validatable; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments1Validator<A1, X> extends ValueValidator<A1, X> { /** * Convert {@link Validatable} instance into {@link Arguments1Validator} * @param validator core validator * @param <X> target class * @return arguments1 validator * @since 0.8.0 */ static <X> Arguments1Validator<X, X> from(Validatable<X> validator) { return Arguments1Validator.from(validator.applicative()); } /** * Convert {@link ValueValidator} instance into {@link Arguments1Validator} * @param valueValidator value validator * @param <A1> class of argument1 * @param <X> target class * @return arguments1 validator * @since 0.8.0 */ static <A1, X> Arguments1Validator<A1, X> from(ValueValidator<A1, X> valueValidator) { return valueValidator::validate; } /** * Convert an Arguments1Validator that validates Arguments1&lt;A1&gt; to an * Arguments1Validator&lt;A1, X&gt; * @param validator validator for Arguments1&lt;A1&gt; * @param <A1> class of argument1 * @param <X> target class * @return arguments1 validator that takes an A1 directly * @since 0.16.0 */ static <A1, X> Arguments1Validator<A1, X> unwrap(Arguments1Validator<Arguments1<A1>, X> validator) { return new Arguments1Validator<A1, X>() { @Override public Validated<X> validate(A1 a1, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1), locale, constraintContext); } @Override public Arguments1Validator<A1, Supplier<X>> lazy() { return Arguments1Validator.unwrap(validator.lazy()); } }; } @Override Validated<X> validate(@Nullable A1 a1, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments1 as a single object. * @return a validator that takes an Arguments1 * @since 0.16.0 */ default Arguments1Validator<Arguments1<A1>, X> wrap() { return new Arguments1Validator<Arguments1<A1>, X>() { @Override public Validated<X> validate(Arguments1<A1> args, Locale locale, ConstraintContext constraintContext) { final Arguments1<? extends A1> nonNullArgs = Objects.requireNonNull(args); return Arguments1Validator.this.validate(nonNullArgs.arg1(), locale, constraintContext); } @Override public Arguments1Validator<Arguments1<A1>, Supplier<X>> lazy() { return Arguments1Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ @Override default <X2> Arguments1Validator<A1, X2> andThen(Function<? super X, ? extends X2> mapper) { return new Arguments1Validator<A1, X2>() { @Override public Validated<X2> validate(A1 a1, Locale locale, ConstraintContext constraintContext) { return Arguments1Validator.this.validate(a1, locale, constraintContext).map(mapper); } @Override public Arguments1Validator<A1, Supplier<X2>> lazy() { return Arguments1Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ @Override default <X2> Arguments1Validator<A1, X2> andThen(ValueValidator<? super X, X2> validator) { return new Arguments1Validator<A1, X2>() { @Override public Validated<X2> validate(A1 a1, Locale locale, ConstraintContext constraintContext) { return Arguments1Validator.this.validate(a1, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments1Validator<A1, Supplier<X2>> lazy() { return Arguments1Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ @Override default <A> Arguments1Validator<A, X> compose(Function<? super A, ? extends A1> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Arguments1Validator.this.validate(mapper.apply(a), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments1Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments1Validator<A1, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1) { return this.validate(a1, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, ConstraintContext constraintContext) { return this.validate(a1, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, Locale locale) { return this.validate(a1, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1) throws ConstraintViolationsException { return this.validate(a1).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, constraintContext).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, Locale locale) throws ConstraintViolationsException { return this.validate(a1, locale).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, locale, constraintContext).orElseThrow(ConstraintViolationsException::new); } /** * @since 0.7.0 */ default <A2, Y> Arguments2Splitting<A1, A2, X, Y> split(ValueValidator<A2, Y> validator) { return new Arguments2Splitting<>(this, validator); } /** * @since 0.7.0 */ default <Y> Arguments2Combining<A1, X, Y> combine(ValueValidator<A1, Y> validator) { return new Arguments2Combining<>(this, validator); } /** * @since 0.7.0 */ @Override default Arguments1Validator<A1, X> indexed(int index) { return (a1, locale, constraintContext) -> Arguments1Validator.this.validate(a1, locale, constraintContext) .indexed(index); } /** * @since 0.8.0 */ default <C extends Collection<X>> Arguments1Validator<Iterable<A1>, C> liftCollection(Supplier<C> factory) { return Arguments1Validator.from(ValueValidator.super.liftCollection(factory)); } /** * @since 0.8.0 */ default Arguments1Validator<Iterable<A1>, List<X>> liftList() { return Arguments1Validator.from(ValueValidator.super.liftList()); } /** * @since 0.8.0 */ default Arguments1Validator<Iterable<A1>, Set<X>> liftSet() { return Arguments1Validator.from(ValueValidator.super.liftSet()); } /** * @since 0.8.0 */ default Arguments1Validator<Optional<A1>, Optional<X>> liftOptional() { return Arguments1Validator.from(ValueValidator.super.liftOptional()); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments2.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function2; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 2 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @since 0.3.0 */ public final class Arguments2<A1, A2> { private final A1 arg1; private final A2 arg2; /** * Creates a new Arguments2 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2 */ Arguments2(@Nullable A1 arg1, @Nullable A2 arg2) { this.arg1 = arg1; this.arg2 = arg2; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map(Function2<? super A1, ? super A2, ? extends X> mapper) { return mapper.apply(arg1, arg2); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg2 to arg2 * @since 0.16.0 */ public Arguments1<A2> last1() { return new Arguments1<>(arg2); } /** * Appends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to append * @param arg the argument to append * @return a new Arguments3 instance with the additional argument * @since 0.16.0 */ public <B> Arguments3<A1, A2, B> append(@Nullable B arg) { return new Arguments3<>(this.arg1, this.arg2, arg); } /** * Prepends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to prepend * @param arg the argument to prepend * @return a new Arguments3 instance with the additional argument * @since 0.16.0 */ public <B> Arguments3<B, A1, A2> prepend(@Nullable B arg) { return new Arguments3<>(arg, this.arg1, this.arg2); } /** * Returns a new Arguments2 instance with the arguments in reverse order. * @return an Arguments2 instance with arguments in reverse order * @since 0.16.0 */ public Arguments2<A2, A1> reverse() { return new Arguments2<>(arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments2<A1, A2> that = (Arguments2<A1, A2>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments2{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments2Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function2; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments2Combining<A, R1, R2> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; public Arguments2Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2) { this.v1 = v1; this.v2 = v2; } public <X> Arguments1Validator<A, X> apply(Function2<? super R1, ? super R2, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments2Combining.this.v1.validate(a, locale, constraintContext), Arguments2Combining.this.v2.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply((r1, r2) -> () -> f.apply(r1, r2), Arguments2Combining.this.v1.validate(a, locale, constraintContext), Arguments2Combining.this.v2.validate(a, locale, constraintContext)); } }; } public <R3> Arguments3Combining<A, R1, R2, R3> combine(ValueValidator<? super A, ? extends R3> v3) { return new Arguments3Combining<>(v1, v2, v3); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments2Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function2; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments2Splitting<A1, A2, R1, R2> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; public Arguments2Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2) { this.v1 = v1; this.v2 = v2; } public <X> Arguments2Validator<A1, A2, X> apply(Function2<? super R1, ? super R2, ? extends X> f) { return new Arguments2Validator<A1, A2, X>() { @Override public Arguments2Validator<A1, A2, Supplier<X>> lazy() { return ((a1, a2, locale, constraintContext) -> Validations.apply((r1, r2) -> () -> f.apply(r1, r2), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext)); } }; } public <A3, R3> Arguments3Splitting<A1, A2, A3, R1, R2, R3> split(ValueValidator<? super A3, ? extends R3> v3) { return new Arguments3Splitting<>(v1, v2, v3); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments2Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments2Validator<A1, A2, X> { /** * Convert an Arguments1Validator that validates Arguments2 to an Arguments2Validator * @param validator validator for Arguments2 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <X> target result type * @return arguments2 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, X> Arguments2Validator<A1, A2, X> unwrap(Arguments1Validator<Arguments2<A1, A2>, X> validator) { return new Arguments2Validator<A1, A2, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1, a2), locale, constraintContext); } @Override public Arguments2Validator<A1, A2, Supplier<X>> lazy() { return Arguments2Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments2 as a single object. * @return a validator that takes an Arguments2 * @since 0.16.0 */ default Arguments1Validator<Arguments2<A1, A2>, X> wrap() { return new Arguments1Validator<Arguments2<A1, A2>, X>() { @Override public Validated<X> validate(Arguments2<A1, A2> args, Locale locale, ConstraintContext constraintContext) { final Arguments2<? extends A1, ? extends A2> nonNullArgs = Objects.requireNonNull(args); return Arguments2Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), locale, constraintContext); } @Override public Arguments1Validator<Arguments2<A1, A2>, Supplier<X>> lazy() { return Arguments2Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments2Validator<A1, A2, X2> andThen(Function<? super X, ? extends X2> mapper) { return new Arguments2Validator<A1, A2, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, Locale locale, ConstraintContext constraintContext) { return Arguments2Validator.this.validate(a1, a2, locale, constraintContext).map(mapper); } @Override public Arguments2Validator<A1, A2, Supplier<X2>> lazy() { return Arguments2Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments2Validator<A1, A2, X2> andThen(ValueValidator<? super X, X2> validator) { return new Arguments2Validator<A1, A2, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, Locale locale, ConstraintContext constraintContext) { return Arguments2Validator.this.validate(a1, a2, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments2Validator<A1, A2, Supplier<X2>> lazy() { return Arguments2Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments2<? extends A1, ? extends A2>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments2<? extends A1, ? extends A2> args = mapper.apply(a); return Arguments2Validator.this.validate(args.arg1(), args.arg2(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments2Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments2Validator<A1, A2, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2) { return this.validate(a1, a2, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, ConstraintContext constraintContext) { return this.validate(a1, a2, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, Locale locale) { return this.validate(a1, a2, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2) throws ConstraintViolationsException { return this.validate(a1, a2).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, constraintContext).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, locale).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, locale, constraintContext).orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments3.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function3; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 3 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @param <A3> the type of argument at position 3 * @since 0.3.0 */ public final class Arguments3<A1, A2, A3> { private final A1 arg1; private final A2 arg2; private final A3 arg3; /** * Creates a new Arguments3 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2, arg3 the * argument at position 3 */ Arguments3(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3) { this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Returns the argument at position 3. * @return the argument at position 3 */ @Nullable public A3 arg3() { return this.arg3; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map(Function3<? super A1, ? super A2, ? super A3, ? extends X> mapper) { return mapper.apply(arg1, arg2, arg3); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments2 instance containing only the first 2 arguments. * @return an Arguments2 instance with arguments from arg1 to arg2 * @since 0.16.0 */ public Arguments2<A1, A2> first2() { return new Arguments2<>(arg1, arg2); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg3 to arg3 * @since 0.16.0 */ public Arguments1<A3> last1() { return new Arguments1<>(arg3); } /** * Returns a new Arguments2 instance containing only the last 2 arguments. * @return an Arguments2 instance with arguments from arg2 to arg3 * @since 0.16.0 */ public Arguments2<A2, A3> last2() { return new Arguments2<>(arg2, arg3); } /** * Appends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to append * @param arg the argument to append * @return a new Arguments4 instance with the additional argument * @since 0.16.0 */ public <B> Arguments4<A1, A2, A3, B> append(@Nullable B arg) { return new Arguments4<>(this.arg1, this.arg2, this.arg3, arg); } /** * Prepends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to prepend * @param arg the argument to prepend * @return a new Arguments4 instance with the additional argument * @since 0.16.0 */ public <B> Arguments4<B, A1, A2, A3> prepend(@Nullable B arg) { return new Arguments4<>(arg, this.arg1, this.arg2, this.arg3); } /** * Returns a new Arguments3 instance with the arguments in reverse order. * @return an Arguments3 instance with arguments in reverse order * @since 0.16.0 */ public Arguments3<A3, A2, A1> reverse() { return new Arguments3<>(arg3, arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments3<A1, A2, A3> that = (Arguments3<A1, A2, A3>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2) && Objects.equals(this.arg3, that.arg3); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2, this.arg3); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments3{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + ", " + "arg3=" + this.arg3 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments3Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function3; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments3Combining<A, R1, R2, R3> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; public Arguments3Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3) { this.v1 = v1; this.v2 = v2; this.v3 = v3; } public <X> Arguments1Validator<A, X> apply(Function3<? super R1, ? super R2, ? super R3, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments3Combining.this.v1.validate(a, locale, constraintContext), Arguments3Combining.this.v2.validate(a, locale, constraintContext), Arguments3Combining.this.v3.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply((r1, r2, r3) -> () -> f.apply(r1, r2, r3), Arguments3Combining.this.v1.validate(a, locale, constraintContext), Arguments3Combining.this.v2.validate(a, locale, constraintContext), Arguments3Combining.this.v3.validate(a, locale, constraintContext)); } }; } public <R4> Arguments4Combining<A, R1, R2, R3, R4> combine(ValueValidator<? super A, ? extends R4> v4) { return new Arguments4Combining<>(v1, v2, v3, v4); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments3Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function3; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments3Splitting<A1, A2, A3, R1, R2, R3> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; public Arguments3Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3) { this.v1 = v1; this.v2 = v2; this.v3 = v3; } public <X> Arguments3Validator<A1, A2, A3, X> apply(Function3<? super R1, ? super R2, ? super R3, ? extends X> f) { return new Arguments3Validator<A1, A2, A3, X>() { @Override public Arguments3Validator<A1, A2, A3, Supplier<X>> lazy() { return ((a1, a2, a3, locale, constraintContext) -> Validations.apply( (r1, r2, r3) -> () -> f.apply(r1, r2, r3), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext)); } }; } public <A4, R4> Arguments4Splitting<A1, A2, A3, A4, R1, R2, R3, R4> split( ValueValidator<? super A4, ? extends R4> v4) { return new Arguments4Splitting<>(v1, v2, v3, v4); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments3Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments3Validator<A1, A2, A3, X> { /** * Convert an Arguments1Validator that validates Arguments3 to an Arguments3Validator * @param validator validator for Arguments3 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <X> target result type * @return arguments3 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, X> Arguments3Validator<A1, A2, A3, X> unwrap( Arguments1Validator<Arguments3<A1, A2, A3>, X> validator) { return new Arguments3Validator<A1, A2, A3, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1, a2, a3), locale, constraintContext); } @Override public Arguments3Validator<A1, A2, A3, Supplier<X>> lazy() { return Arguments3Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments3 as a single object. * @return a validator that takes an Arguments3 * @since 0.16.0 */ default Arguments1Validator<Arguments3<A1, A2, A3>, X> wrap() { return new Arguments1Validator<Arguments3<A1, A2, A3>, X>() { @Override public Validated<X> validate(Arguments3<A1, A2, A3> args, Locale locale, ConstraintContext constraintContext) { final Arguments3<? extends A1, ? extends A2, ? extends A3> nonNullArgs = Objects.requireNonNull(args); return Arguments3Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), locale, constraintContext); } @Override public Arguments1Validator<Arguments3<A1, A2, A3>, Supplier<X>> lazy() { return Arguments3Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments3Validator<A1, A2, A3, X2> andThen(Function<? super X, ? extends X2> mapper) { return new Arguments3Validator<A1, A2, A3, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, Locale locale, ConstraintContext constraintContext) { return Arguments3Validator.this.validate(a1, a2, a3, locale, constraintContext).map(mapper); } @Override public Arguments3Validator<A1, A2, A3, Supplier<X2>> lazy() { return Arguments3Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments3Validator<A1, A2, A3, X2> andThen(ValueValidator<? super X, X2> validator) { return new Arguments3Validator<A1, A2, A3, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, Locale locale, ConstraintContext constraintContext) { return Arguments3Validator.this.validate(a1, a2, a3, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments3Validator<A1, A2, A3, Supplier<X2>> lazy() { return Arguments3Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments3<? extends A1, ? extends A2, ? extends A3>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments3<? extends A1, ? extends A2, ? extends A3> args = mapper.apply(a); return Arguments3Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments3Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments3Validator<A1, A2, A3, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3) { return this.validate(a1, a2, a3, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, Locale locale) { return this.validate(a1, a2, a3, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3) throws ConstraintViolationsException { return this.validate(a1, a2, a3).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, constraintContext).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, locale).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, locale, constraintContext).orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments4.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function4; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 4 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @param <A3> the type of argument at position 3 * @param <A4> the type of argument at position 4 * @since 0.3.0 */ public final class Arguments4<A1, A2, A3, A4> { private final A1 arg1; private final A2 arg2; private final A3 arg3; private final A4 arg4; /** * Creates a new Arguments4 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2, arg3 the * argument at position 3, arg4 the argument at position 4 */ Arguments4(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3, @Nullable A4 arg4) { this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; this.arg4 = arg4; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Returns the argument at position 3. * @return the argument at position 3 */ @Nullable public A3 arg3() { return this.arg3; } /** * Returns the argument at position 4. * @return the argument at position 4 */ @Nullable public A4 arg4() { return this.arg4; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map(Function4<? super A1, ? super A2, ? super A3, ? super A4, ? extends X> mapper) { return mapper.apply(arg1, arg2, arg3, arg4); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments2 instance containing only the first 2 arguments. * @return an Arguments2 instance with arguments from arg1 to arg2 * @since 0.16.0 */ public Arguments2<A1, A2> first2() { return new Arguments2<>(arg1, arg2); } /** * Returns a new Arguments3 instance containing only the first 3 arguments. * @return an Arguments3 instance with arguments from arg1 to arg3 * @since 0.16.0 */ public Arguments3<A1, A2, A3> first3() { return new Arguments3<>(arg1, arg2, arg3); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg4 to arg4 * @since 0.16.0 */ public Arguments1<A4> last1() { return new Arguments1<>(arg4); } /** * Returns a new Arguments2 instance containing only the last 2 arguments. * @return an Arguments2 instance with arguments from arg3 to arg4 * @since 0.16.0 */ public Arguments2<A3, A4> last2() { return new Arguments2<>(arg3, arg4); } /** * Returns a new Arguments3 instance containing only the last 3 arguments. * @return an Arguments3 instance with arguments from arg2 to arg4 * @since 0.16.0 */ public Arguments3<A2, A3, A4> last3() { return new Arguments3<>(arg2, arg3, arg4); } /** * Appends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to append * @param arg the argument to append * @return a new Arguments5 instance with the additional argument * @since 0.16.0 */ public <B> Arguments5<A1, A2, A3, A4, B> append(@Nullable B arg) { return new Arguments5<>(this.arg1, this.arg2, this.arg3, this.arg4, arg); } /** * Prepends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to prepend * @param arg the argument to prepend * @return a new Arguments5 instance with the additional argument * @since 0.16.0 */ public <B> Arguments5<B, A1, A2, A3, A4> prepend(@Nullable B arg) { return new Arguments5<>(arg, this.arg1, this.arg2, this.arg3, this.arg4); } /** * Returns a new Arguments4 instance with the arguments in reverse order. * @return an Arguments4 instance with arguments in reverse order * @since 0.16.0 */ public Arguments4<A4, A3, A2, A1> reverse() { return new Arguments4<>(arg4, arg3, arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments4<A1, A2, A3, A4> that = (Arguments4<A1, A2, A3, A4>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2) && Objects.equals(this.arg3, that.arg3) && Objects.equals(this.arg4, that.arg4); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2, this.arg3, this.arg4); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments4{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + ", " + "arg3=" + this.arg3 + ", " + "arg4=" + this.arg4 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments4Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function4; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments4Combining<A, R1, R2, R3, R4> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; protected final ValueValidator<? super A, ? extends R4> v4; public Arguments4Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; } public <X> Arguments1Validator<A, X> apply( Function4<? super R1, ? super R2, ? super R3, ? super R4, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments4Combining.this.v1.validate(a, locale, constraintContext), Arguments4Combining.this.v2.validate(a, locale, constraintContext), Arguments4Combining.this.v3.validate(a, locale, constraintContext), Arguments4Combining.this.v4.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4) -> () -> f.apply(r1, r2, r3, r4), Arguments4Combining.this.v1.validate(a, locale, constraintContext), Arguments4Combining.this.v2.validate(a, locale, constraintContext), Arguments4Combining.this.v3.validate(a, locale, constraintContext), Arguments4Combining.this.v4.validate(a, locale, constraintContext)); } }; } public <R5> Arguments5Combining<A, R1, R2, R3, R4, R5> combine(ValueValidator<? super A, ? extends R5> v5) { return new Arguments5Combining<>(v1, v2, v3, v4, v5); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments4Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function4; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments4Splitting<A1, A2, A3, A4, R1, R2, R3, R4> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; protected final ValueValidator<? super A4, ? extends R4> v4; public Arguments4Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; } public <X> Arguments4Validator<A1, A2, A3, A4, X> apply( Function4<? super R1, ? super R2, ? super R3, ? super R4, ? extends X> f) { return new Arguments4Validator<A1, A2, A3, A4, X>() { @Override public Arguments4Validator<A1, A2, A3, A4, Supplier<X>> lazy() { return ((a1, a2, a3, a4, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4) -> () -> f.apply(r1, r2, r3, r4), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext)); } }; } public <A5, R5> Arguments5Splitting<A1, A2, A3, A4, A5, R1, R2, R3, R4, R5> split( ValueValidator<? super A5, ? extends R5> v5) { return new Arguments5Splitting<>(v1, v2, v3, v4, v5); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments4Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments4Validator<A1, A2, A3, A4, X> { /** * Convert an Arguments1Validator that validates Arguments4 to an Arguments4Validator * @param validator validator for Arguments4 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <A4> type of argument at position 4 * @param <X> target result type * @return arguments4 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, A4, X> Arguments4Validator<A1, A2, A3, A4, X> unwrap( Arguments1Validator<Arguments4<A1, A2, A3, A4>, X> validator) { return new Arguments4Validator<A1, A2, A3, A4, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1, a2, a3, a4), locale, constraintContext); } @Override public Arguments4Validator<A1, A2, A3, A4, Supplier<X>> lazy() { return Arguments4Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments4 as a single object. * @return a validator that takes an Arguments4 * @since 0.16.0 */ default Arguments1Validator<Arguments4<A1, A2, A3, A4>, X> wrap() { return new Arguments1Validator<Arguments4<A1, A2, A3, A4>, X>() { @Override public Validated<X> validate(Arguments4<A1, A2, A3, A4> args, Locale locale, ConstraintContext constraintContext) { final Arguments4<? extends A1, ? extends A2, ? extends A3, ? extends A4> nonNullArgs = Objects .requireNonNull(args); return Arguments4Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), nonNullArgs.arg4(), locale, constraintContext); } @Override public Arguments1Validator<Arguments4<A1, A2, A3, A4>, Supplier<X>> lazy() { return Arguments4Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments4Validator<A1, A2, A3, A4, X2> andThen(Function<? super X, ? extends X2> mapper) { return new Arguments4Validator<A1, A2, A3, A4, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, Locale locale, ConstraintContext constraintContext) { return Arguments4Validator.this.validate(a1, a2, a3, a4, locale, constraintContext).map(mapper); } @Override public Arguments4Validator<A1, A2, A3, A4, Supplier<X2>> lazy() { return Arguments4Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments4Validator<A1, A2, A3, A4, X2> andThen(ValueValidator<? super X, X2> validator) { return new Arguments4Validator<A1, A2, A3, A4, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, Locale locale, ConstraintContext constraintContext) { return Arguments4Validator.this.validate(a1, a2, a3, a4, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments4Validator<A1, A2, A3, A4, Supplier<X2>> lazy() { return Arguments4Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments4<? extends A1, ? extends A2, ? extends A3, ? extends A4>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments4<? extends A1, ? extends A2, ? extends A3, ? extends A4> args = mapper.apply(a); return Arguments4Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), args.arg4(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments4Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments4Validator<A1, A2, A3, A4, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4) { return this.validate(a1, a2, a3, a4, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, a4, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, Locale locale) { return this.validate(a1, a2, a3, a4, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, constraintContext).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, locale).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, locale, constraintContext).orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments5.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function5; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 5 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @param <A3> the type of argument at position 3 * @param <A4> the type of argument at position 4 * @param <A5> the type of argument at position 5 * @since 0.3.0 */ public final class Arguments5<A1, A2, A3, A4, A5> { private final A1 arg1; private final A2 arg2; private final A3 arg3; private final A4 arg4; private final A5 arg5; /** * Creates a new Arguments5 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2, arg3 the * argument at position 3, arg4 the argument at position 4, arg5 the argument at * position 5 */ Arguments5(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3, @Nullable A4 arg4, @Nullable A5 arg5) { this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; this.arg4 = arg4; this.arg5 = arg5; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Returns the argument at position 3. * @return the argument at position 3 */ @Nullable public A3 arg3() { return this.arg3; } /** * Returns the argument at position 4. * @return the argument at position 4 */ @Nullable public A4 arg4() { return this.arg4; } /** * Returns the argument at position 5. * @return the argument at position 5 */ @Nullable public A5 arg5() { return this.arg5; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map(Function5<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? extends X> mapper) { return mapper.apply(arg1, arg2, arg3, arg4, arg5); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments2 instance containing only the first 2 arguments. * @return an Arguments2 instance with arguments from arg1 to arg2 * @since 0.16.0 */ public Arguments2<A1, A2> first2() { return new Arguments2<>(arg1, arg2); } /** * Returns a new Arguments3 instance containing only the first 3 arguments. * @return an Arguments3 instance with arguments from arg1 to arg3 * @since 0.16.0 */ public Arguments3<A1, A2, A3> first3() { return new Arguments3<>(arg1, arg2, arg3); } /** * Returns a new Arguments4 instance containing only the first 4 arguments. * @return an Arguments4 instance with arguments from arg1 to arg4 * @since 0.16.0 */ public Arguments4<A1, A2, A3, A4> first4() { return new Arguments4<>(arg1, arg2, arg3, arg4); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg5 to arg5 * @since 0.16.0 */ public Arguments1<A5> last1() { return new Arguments1<>(arg5); } /** * Returns a new Arguments2 instance containing only the last 2 arguments. * @return an Arguments2 instance with arguments from arg4 to arg5 * @since 0.16.0 */ public Arguments2<A4, A5> last2() { return new Arguments2<>(arg4, arg5); } /** * Returns a new Arguments3 instance containing only the last 3 arguments. * @return an Arguments3 instance with arguments from arg3 to arg5 * @since 0.16.0 */ public Arguments3<A3, A4, A5> last3() { return new Arguments3<>(arg3, arg4, arg5); } /** * Returns a new Arguments4 instance containing only the last 4 arguments. * @return an Arguments4 instance with arguments from arg2 to arg5 * @since 0.16.0 */ public Arguments4<A2, A3, A4, A5> last4() { return new Arguments4<>(arg2, arg3, arg4, arg5); } /** * Appends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to append * @param arg the argument to append * @return a new Arguments6 instance with the additional argument * @since 0.16.0 */ public <B> Arguments6<A1, A2, A3, A4, A5, B> append(@Nullable B arg) { return new Arguments6<>(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, arg); } /** * Prepends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to prepend * @param arg the argument to prepend * @return a new Arguments6 instance with the additional argument * @since 0.16.0 */ public <B> Arguments6<B, A1, A2, A3, A4, A5> prepend(@Nullable B arg) { return new Arguments6<>(arg, this.arg1, this.arg2, this.arg3, this.arg4, this.arg5); } /** * Returns a new Arguments5 instance with the arguments in reverse order. * @return an Arguments5 instance with arguments in reverse order * @since 0.16.0 */ public Arguments5<A5, A4, A3, A2, A1> reverse() { return new Arguments5<>(arg5, arg4, arg3, arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments5<A1, A2, A3, A4, A5> that = (Arguments5<A1, A2, A3, A4, A5>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2) && Objects.equals(this.arg3, that.arg3) && Objects.equals(this.arg4, that.arg4) && Objects.equals(this.arg5, that.arg5); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments5{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + ", " + "arg3=" + this.arg3 + ", " + "arg4=" + this.arg4 + ", " + "arg5=" + this.arg5 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments5Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function5; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments5Combining<A, R1, R2, R3, R4, R5> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; protected final ValueValidator<? super A, ? extends R4> v4; protected final ValueValidator<? super A, ? extends R5> v5; public Arguments5Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; } public <X> Arguments1Validator<A, X> apply( Function5<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments5Combining.this.v1.validate(a, locale, constraintContext), Arguments5Combining.this.v2.validate(a, locale, constraintContext), Arguments5Combining.this.v3.validate(a, locale, constraintContext), Arguments5Combining.this.v4.validate(a, locale, constraintContext), Arguments5Combining.this.v5.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5) -> () -> f.apply(r1, r2, r3, r4, r5), Arguments5Combining.this.v1.validate(a, locale, constraintContext), Arguments5Combining.this.v2.validate(a, locale, constraintContext), Arguments5Combining.this.v3.validate(a, locale, constraintContext), Arguments5Combining.this.v4.validate(a, locale, constraintContext), Arguments5Combining.this.v5.validate(a, locale, constraintContext)); } }; } public <R6> Arguments6Combining<A, R1, R2, R3, R4, R5, R6> combine(ValueValidator<? super A, ? extends R6> v6) { return new Arguments6Combining<>(v1, v2, v3, v4, v5, v6); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments5Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function5; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments5Splitting<A1, A2, A3, A4, A5, R1, R2, R3, R4, R5> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; protected final ValueValidator<? super A4, ? extends R4> v4; protected final ValueValidator<? super A5, ? extends R5> v5; public Arguments5Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; } public <X> Arguments5Validator<A1, A2, A3, A4, A5, X> apply( Function5<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? extends X> f) { return new Arguments5Validator<A1, A2, A3, A4, A5, X>() { @Override public Arguments5Validator<A1, A2, A3, A4, A5, Supplier<X>> lazy() { return ((a1, a2, a3, a4, a5, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5) -> () -> f.apply(r1, r2, r3, r4, r5), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext)); } }; } public <A6, R6> Arguments6Splitting<A1, A2, A3, A4, A5, A6, R1, R2, R3, R4, R5, R6> split( ValueValidator<? super A6, ? extends R6> v6) { return new Arguments6Splitting<>(v1, v2, v3, v4, v5, v6); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments5Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments5Validator<A1, A2, A3, A4, A5, X> { /** * Convert an Arguments1Validator that validates Arguments5 to an Arguments5Validator * @param validator validator for Arguments5 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <A4> type of argument at position 4 * @param <A5> type of argument at position 5 * @param <X> target result type * @return arguments5 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, A4, A5, X> Arguments5Validator<A1, A2, A3, A4, A5, X> unwrap( Arguments1Validator<Arguments5<A1, A2, A3, A4, A5>, X> validator) { return new Arguments5Validator<A1, A2, A3, A4, A5, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1, a2, a3, a4, a5), locale, constraintContext); } @Override public Arguments5Validator<A1, A2, A3, A4, A5, Supplier<X>> lazy() { return Arguments5Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments5 as a single object. * @return a validator that takes an Arguments5 * @since 0.16.0 */ default Arguments1Validator<Arguments5<A1, A2, A3, A4, A5>, X> wrap() { return new Arguments1Validator<Arguments5<A1, A2, A3, A4, A5>, X>() { @Override public Validated<X> validate(Arguments5<A1, A2, A3, A4, A5> args, Locale locale, ConstraintContext constraintContext) { final Arguments5<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5> nonNullArgs = Objects .requireNonNull(args); return Arguments5Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), nonNullArgs.arg4(), nonNullArgs.arg5(), locale, constraintContext); } @Override public Arguments1Validator<Arguments5<A1, A2, A3, A4, A5>, Supplier<X>> lazy() { return Arguments5Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments5Validator<A1, A2, A3, A4, A5, X2> andThen(Function<? super X, ? extends X2> mapper) { return new Arguments5Validator<A1, A2, A3, A4, A5, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, Locale locale, ConstraintContext constraintContext) { return Arguments5Validator.this.validate(a1, a2, a3, a4, a5, locale, constraintContext).map(mapper); } @Override public Arguments5Validator<A1, A2, A3, A4, A5, Supplier<X2>> lazy() { return Arguments5Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments5Validator<A1, A2, A3, A4, A5, X2> andThen(ValueValidator<? super X, X2> validator) { return new Arguments5Validator<A1, A2, A3, A4, A5, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, Locale locale, ConstraintContext constraintContext) { return Arguments5Validator.this.validate(a1, a2, a3, a4, a5, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments5Validator<A1, A2, A3, A4, A5, Supplier<X2>> lazy() { return Arguments5Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments5<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments5<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5> args = mapper .apply(a); return Arguments5Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), args.arg4(), args.arg5(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments5Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments5Validator<A1, A2, A3, A4, A5, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5) { return this.validate(a1, a2, a3, a4, a5, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, a4, a5, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, Locale locale) { return this.validate(a1, a2, a3, a4, a5, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, constraintContext).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, locale).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, locale, constraintContext) .orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments6.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function6; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 6 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @param <A3> the type of argument at position 3 * @param <A4> the type of argument at position 4 * @param <A5> the type of argument at position 5 * @param <A6> the type of argument at position 6 * @since 0.3.0 */ public final class Arguments6<A1, A2, A3, A4, A5, A6> { private final A1 arg1; private final A2 arg2; private final A3 arg3; private final A4 arg4; private final A5 arg5; private final A6 arg6; /** * Creates a new Arguments6 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2, arg3 the * argument at position 3, arg4 the argument at position 4, arg5 the argument at * position 5, arg6 the argument at position 6 */ Arguments6(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3, @Nullable A4 arg4, @Nullable A5 arg5, @Nullable A6 arg6) { this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; this.arg4 = arg4; this.arg5 = arg5; this.arg6 = arg6; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Returns the argument at position 3. * @return the argument at position 3 */ @Nullable public A3 arg3() { return this.arg3; } /** * Returns the argument at position 4. * @return the argument at position 4 */ @Nullable public A4 arg4() { return this.arg4; } /** * Returns the argument at position 5. * @return the argument at position 5 */ @Nullable public A5 arg5() { return this.arg5; } /** * Returns the argument at position 6. * @return the argument at position 6 */ @Nullable public A6 arg6() { return this.arg6; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map( Function6<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? extends X> mapper) { return mapper.apply(arg1, arg2, arg3, arg4, arg5, arg6); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments2 instance containing only the first 2 arguments. * @return an Arguments2 instance with arguments from arg1 to arg2 * @since 0.16.0 */ public Arguments2<A1, A2> first2() { return new Arguments2<>(arg1, arg2); } /** * Returns a new Arguments3 instance containing only the first 3 arguments. * @return an Arguments3 instance with arguments from arg1 to arg3 * @since 0.16.0 */ public Arguments3<A1, A2, A3> first3() { return new Arguments3<>(arg1, arg2, arg3); } /** * Returns a new Arguments4 instance containing only the first 4 arguments. * @return an Arguments4 instance with arguments from arg1 to arg4 * @since 0.16.0 */ public Arguments4<A1, A2, A3, A4> first4() { return new Arguments4<>(arg1, arg2, arg3, arg4); } /** * Returns a new Arguments5 instance containing only the first 5 arguments. * @return an Arguments5 instance with arguments from arg1 to arg5 * @since 0.16.0 */ public Arguments5<A1, A2, A3, A4, A5> first5() { return new Arguments5<>(arg1, arg2, arg3, arg4, arg5); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg6 to arg6 * @since 0.16.0 */ public Arguments1<A6> last1() { return new Arguments1<>(arg6); } /** * Returns a new Arguments2 instance containing only the last 2 arguments. * @return an Arguments2 instance with arguments from arg5 to arg6 * @since 0.16.0 */ public Arguments2<A5, A6> last2() { return new Arguments2<>(arg5, arg6); } /** * Returns a new Arguments3 instance containing only the last 3 arguments. * @return an Arguments3 instance with arguments from arg4 to arg6 * @since 0.16.0 */ public Arguments3<A4, A5, A6> last3() { return new Arguments3<>(arg4, arg5, arg6); } /** * Returns a new Arguments4 instance containing only the last 4 arguments. * @return an Arguments4 instance with arguments from arg3 to arg6 * @since 0.16.0 */ public Arguments4<A3, A4, A5, A6> last4() { return new Arguments4<>(arg3, arg4, arg5, arg6); } /** * Returns a new Arguments5 instance containing only the last 5 arguments. * @return an Arguments5 instance with arguments from arg2 to arg6 * @since 0.16.0 */ public Arguments5<A2, A3, A4, A5, A6> last5() { return new Arguments5<>(arg2, arg3, arg4, arg5, arg6); } /** * Appends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to append * @param arg the argument to append * @return a new Arguments7 instance with the additional argument * @since 0.16.0 */ public <B> Arguments7<A1, A2, A3, A4, A5, A6, B> append(@Nullable B arg) { return new Arguments7<>(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, arg); } /** * Prepends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to prepend * @param arg the argument to prepend * @return a new Arguments7 instance with the additional argument * @since 0.16.0 */ public <B> Arguments7<B, A1, A2, A3, A4, A5, A6> prepend(@Nullable B arg) { return new Arguments7<>(arg, this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6); } /** * Returns a new Arguments6 instance with the arguments in reverse order. * @return an Arguments6 instance with arguments in reverse order * @since 0.16.0 */ public Arguments6<A6, A5, A4, A3, A2, A1> reverse() { return new Arguments6<>(arg6, arg5, arg4, arg3, arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments6<A1, A2, A3, A4, A5, A6> that = (Arguments6<A1, A2, A3, A4, A5, A6>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2) && Objects.equals(this.arg3, that.arg3) && Objects.equals(this.arg4, that.arg4) && Objects.equals(this.arg5, that.arg5) && Objects.equals(this.arg6, that.arg6); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments6{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + ", " + "arg3=" + this.arg3 + ", " + "arg4=" + this.arg4 + ", " + "arg5=" + this.arg5 + ", " + "arg6=" + this.arg6 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments6Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function6; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments6Combining<A, R1, R2, R3, R4, R5, R6> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; protected final ValueValidator<? super A, ? extends R4> v4; protected final ValueValidator<? super A, ? extends R5> v5; protected final ValueValidator<? super A, ? extends R6> v6; public Arguments6Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; } public <X> Arguments1Validator<A, X> apply( Function6<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments6Combining.this.v1.validate(a, locale, constraintContext), Arguments6Combining.this.v2.validate(a, locale, constraintContext), Arguments6Combining.this.v3.validate(a, locale, constraintContext), Arguments6Combining.this.v4.validate(a, locale, constraintContext), Arguments6Combining.this.v5.validate(a, locale, constraintContext), Arguments6Combining.this.v6.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6) -> () -> f.apply(r1, r2, r3, r4, r5, r6), Arguments6Combining.this.v1.validate(a, locale, constraintContext), Arguments6Combining.this.v2.validate(a, locale, constraintContext), Arguments6Combining.this.v3.validate(a, locale, constraintContext), Arguments6Combining.this.v4.validate(a, locale, constraintContext), Arguments6Combining.this.v5.validate(a, locale, constraintContext), Arguments6Combining.this.v6.validate(a, locale, constraintContext)); } }; } public <R7> Arguments7Combining<A, R1, R2, R3, R4, R5, R6, R7> combine(ValueValidator<? super A, ? extends R7> v7) { return new Arguments7Combining<>(v1, v2, v3, v4, v5, v6, v7); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments6Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function6; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments6Splitting<A1, A2, A3, A4, A5, A6, R1, R2, R3, R4, R5, R6> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; protected final ValueValidator<? super A4, ? extends R4> v4; protected final ValueValidator<? super A5, ? extends R5> v5; protected final ValueValidator<? super A6, ? extends R6> v6; public Arguments6Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; } public <X> Arguments6Validator<A1, A2, A3, A4, A5, A6, X> apply( Function6<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? extends X> f) { return new Arguments6Validator<A1, A2, A3, A4, A5, A6, X>() { @Override public Arguments6Validator<A1, A2, A3, A4, A5, A6, Supplier<X>> lazy() { return ((a1, a2, a3, a4, a5, a6, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6) -> () -> f.apply(r1, r2, r3, r4, r5, r6), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext)); } }; } public <A7, R7> Arguments7Splitting<A1, A2, A3, A4, A5, A6, A7, R1, R2, R3, R4, R5, R6, R7> split( ValueValidator<? super A7, ? extends R7> v7) { return new Arguments7Splitting<>(v1, v2, v3, v4, v5, v6, v7); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments6Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments6Validator<A1, A2, A3, A4, A5, A6, X> { /** * Convert an Arguments1Validator that validates Arguments6 to an Arguments6Validator * @param validator validator for Arguments6 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <A4> type of argument at position 4 * @param <A5> type of argument at position 5 * @param <A6> type of argument at position 6 * @param <X> target result type * @return arguments6 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, A4, A5, A6, X> Arguments6Validator<A1, A2, A3, A4, A5, A6, X> unwrap( Arguments1Validator<Arguments6<A1, A2, A3, A4, A5, A6>, X> validator) { return new Arguments6Validator<A1, A2, A3, A4, A5, A6, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1, a2, a3, a4, a5, a6), locale, constraintContext); } @Override public Arguments6Validator<A1, A2, A3, A4, A5, A6, Supplier<X>> lazy() { return Arguments6Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments6 as a single object. * @return a validator that takes an Arguments6 * @since 0.16.0 */ default Arguments1Validator<Arguments6<A1, A2, A3, A4, A5, A6>, X> wrap() { return new Arguments1Validator<Arguments6<A1, A2, A3, A4, A5, A6>, X>() { @Override public Validated<X> validate(Arguments6<A1, A2, A3, A4, A5, A6> args, Locale locale, ConstraintContext constraintContext) { final Arguments6<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6> nonNullArgs = Objects .requireNonNull(args); return Arguments6Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), nonNullArgs.arg4(), nonNullArgs.arg5(), nonNullArgs.arg6(), locale, constraintContext); } @Override public Arguments1Validator<Arguments6<A1, A2, A3, A4, A5, A6>, Supplier<X>> lazy() { return Arguments6Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments6Validator<A1, A2, A3, A4, A5, A6, X2> andThen(Function<? super X, ? extends X2> mapper) { return new Arguments6Validator<A1, A2, A3, A4, A5, A6, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, Locale locale, ConstraintContext constraintContext) { return Arguments6Validator.this.validate(a1, a2, a3, a4, a5, a6, locale, constraintContext).map(mapper); } @Override public Arguments6Validator<A1, A2, A3, A4, A5, A6, Supplier<X2>> lazy() { return Arguments6Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments6Validator<A1, A2, A3, A4, A5, A6, X2> andThen(ValueValidator<? super X, X2> validator) { return new Arguments6Validator<A1, A2, A3, A4, A5, A6, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, Locale locale, ConstraintContext constraintContext) { return Arguments6Validator.this.validate(a1, a2, a3, a4, a5, a6, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments6Validator<A1, A2, A3, A4, A5, A6, Supplier<X2>> lazy() { return Arguments6Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments6<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments6<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6> args = mapper .apply(a); return Arguments6Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), args.arg4(), args.arg5(), args.arg6(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments6Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments6Validator<A1, A2, A3, A4, A5, A6, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6) { return this.validate(a1, a2, a3, a4, a5, a6, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, a4, a5, a6, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, Locale locale) { return this.validate(a1, a2, a3, a4, a5, a6, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, constraintContext).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, locale).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, locale, constraintContext) .orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments7.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function7; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 7 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @param <A3> the type of argument at position 3 * @param <A4> the type of argument at position 4 * @param <A5> the type of argument at position 5 * @param <A6> the type of argument at position 6 * @param <A7> the type of argument at position 7 * @since 0.3.0 */ public final class Arguments7<A1, A2, A3, A4, A5, A6, A7> { private final A1 arg1; private final A2 arg2; private final A3 arg3; private final A4 arg4; private final A5 arg5; private final A6 arg6; private final A7 arg7; /** * Creates a new Arguments7 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2, arg3 the * argument at position 3, arg4 the argument at position 4, arg5 the argument at * position 5, arg6 the argument at position 6, arg7 the argument at position 7 */ Arguments7(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3, @Nullable A4 arg4, @Nullable A5 arg5, @Nullable A6 arg6, @Nullable A7 arg7) { this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; this.arg4 = arg4; this.arg5 = arg5; this.arg6 = arg6; this.arg7 = arg7; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Returns the argument at position 3. * @return the argument at position 3 */ @Nullable public A3 arg3() { return this.arg3; } /** * Returns the argument at position 4. * @return the argument at position 4 */ @Nullable public A4 arg4() { return this.arg4; } /** * Returns the argument at position 5. * @return the argument at position 5 */ @Nullable public A5 arg5() { return this.arg5; } /** * Returns the argument at position 6. * @return the argument at position 6 */ @Nullable public A6 arg6() { return this.arg6; } /** * Returns the argument at position 7. * @return the argument at position 7 */ @Nullable public A7 arg7() { return this.arg7; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map( Function7<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? extends X> mapper) { return mapper.apply(arg1, arg2, arg3, arg4, arg5, arg6, arg7); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments2 instance containing only the first 2 arguments. * @return an Arguments2 instance with arguments from arg1 to arg2 * @since 0.16.0 */ public Arguments2<A1, A2> first2() { return new Arguments2<>(arg1, arg2); } /** * Returns a new Arguments3 instance containing only the first 3 arguments. * @return an Arguments3 instance with arguments from arg1 to arg3 * @since 0.16.0 */ public Arguments3<A1, A2, A3> first3() { return new Arguments3<>(arg1, arg2, arg3); } /** * Returns a new Arguments4 instance containing only the first 4 arguments. * @return an Arguments4 instance with arguments from arg1 to arg4 * @since 0.16.0 */ public Arguments4<A1, A2, A3, A4> first4() { return new Arguments4<>(arg1, arg2, arg3, arg4); } /** * Returns a new Arguments5 instance containing only the first 5 arguments. * @return an Arguments5 instance with arguments from arg1 to arg5 * @since 0.16.0 */ public Arguments5<A1, A2, A3, A4, A5> first5() { return new Arguments5<>(arg1, arg2, arg3, arg4, arg5); } /** * Returns a new Arguments6 instance containing only the first 6 arguments. * @return an Arguments6 instance with arguments from arg1 to arg6 * @since 0.16.0 */ public Arguments6<A1, A2, A3, A4, A5, A6> first6() { return new Arguments6<>(arg1, arg2, arg3, arg4, arg5, arg6); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg7 to arg7 * @since 0.16.0 */ public Arguments1<A7> last1() { return new Arguments1<>(arg7); } /** * Returns a new Arguments2 instance containing only the last 2 arguments. * @return an Arguments2 instance with arguments from arg6 to arg7 * @since 0.16.0 */ public Arguments2<A6, A7> last2() { return new Arguments2<>(arg6, arg7); } /** * Returns a new Arguments3 instance containing only the last 3 arguments. * @return an Arguments3 instance with arguments from arg5 to arg7 * @since 0.16.0 */ public Arguments3<A5, A6, A7> last3() { return new Arguments3<>(arg5, arg6, arg7); } /** * Returns a new Arguments4 instance containing only the last 4 arguments. * @return an Arguments4 instance with arguments from arg4 to arg7 * @since 0.16.0 */ public Arguments4<A4, A5, A6, A7> last4() { return new Arguments4<>(arg4, arg5, arg6, arg7); } /** * Returns a new Arguments5 instance containing only the last 5 arguments. * @return an Arguments5 instance with arguments from arg3 to arg7 * @since 0.16.0 */ public Arguments5<A3, A4, A5, A6, A7> last5() { return new Arguments5<>(arg3, arg4, arg5, arg6, arg7); } /** * Returns a new Arguments6 instance containing only the last 6 arguments. * @return an Arguments6 instance with arguments from arg2 to arg7 * @since 0.16.0 */ public Arguments6<A2, A3, A4, A5, A6, A7> last6() { return new Arguments6<>(arg2, arg3, arg4, arg5, arg6, arg7); } /** * Appends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to append * @param arg the argument to append * @return a new Arguments8 instance with the additional argument * @since 0.16.0 */ public <B> Arguments8<A1, A2, A3, A4, A5, A6, A7, B> append(@Nullable B arg) { return new Arguments8<>(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7, arg); } /** * Prepends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to prepend * @param arg the argument to prepend * @return a new Arguments8 instance with the additional argument * @since 0.16.0 */ public <B> Arguments8<B, A1, A2, A3, A4, A5, A6, A7> prepend(@Nullable B arg) { return new Arguments8<>(arg, this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7); } /** * Returns a new Arguments7 instance with the arguments in reverse order. * @return an Arguments7 instance with arguments in reverse order * @since 0.16.0 */ public Arguments7<A7, A6, A5, A4, A3, A2, A1> reverse() { return new Arguments7<>(arg7, arg6, arg5, arg4, arg3, arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments7<A1, A2, A3, A4, A5, A6, A7> that = (Arguments7<A1, A2, A3, A4, A5, A6, A7>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2) && Objects.equals(this.arg3, that.arg3) && Objects.equals(this.arg4, that.arg4) && Objects.equals(this.arg5, that.arg5) && Objects.equals(this.arg6, that.arg6) && Objects.equals(this.arg7, that.arg7); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments7{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + ", " + "arg3=" + this.arg3 + ", " + "arg4=" + this.arg4 + ", " + "arg5=" + this.arg5 + ", " + "arg6=" + this.arg6 + ", " + "arg7=" + this.arg7 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments7Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function7; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments7Combining<A, R1, R2, R3, R4, R5, R6, R7> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; protected final ValueValidator<? super A, ? extends R4> v4; protected final ValueValidator<? super A, ? extends R5> v5; protected final ValueValidator<? super A, ? extends R6> v6; protected final ValueValidator<? super A, ? extends R7> v7; public Arguments7Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; } public <X> Arguments1Validator<A, X> apply( Function7<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments7Combining.this.v1.validate(a, locale, constraintContext), Arguments7Combining.this.v2.validate(a, locale, constraintContext), Arguments7Combining.this.v3.validate(a, locale, constraintContext), Arguments7Combining.this.v4.validate(a, locale, constraintContext), Arguments7Combining.this.v5.validate(a, locale, constraintContext), Arguments7Combining.this.v6.validate(a, locale, constraintContext), Arguments7Combining.this.v7.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7), Arguments7Combining.this.v1.validate(a, locale, constraintContext), Arguments7Combining.this.v2.validate(a, locale, constraintContext), Arguments7Combining.this.v3.validate(a, locale, constraintContext), Arguments7Combining.this.v4.validate(a, locale, constraintContext), Arguments7Combining.this.v5.validate(a, locale, constraintContext), Arguments7Combining.this.v6.validate(a, locale, constraintContext), Arguments7Combining.this.v7.validate(a, locale, constraintContext)); } }; } public <R8> Arguments8Combining<A, R1, R2, R3, R4, R5, R6, R7, R8> combine( ValueValidator<? super A, ? extends R8> v8) { return new Arguments8Combining<>(v1, v2, v3, v4, v5, v6, v7, v8); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments7Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function7; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments7Splitting<A1, A2, A3, A4, A5, A6, A7, R1, R2, R3, R4, R5, R6, R7> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; protected final ValueValidator<? super A4, ? extends R4> v4; protected final ValueValidator<? super A5, ? extends R5> v5; protected final ValueValidator<? super A6, ? extends R6> v6; protected final ValueValidator<? super A7, ? extends R7> v7; public Arguments7Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; } public <X> Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X> apply( Function7<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? extends X> f) { return new Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X>() { @Override public Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, Supplier<X>> lazy() { return ((a1, a2, a3, a4, a5, a6, a7, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext)); } }; } public <A8, R8> Arguments8Splitting<A1, A2, A3, A4, A5, A6, A7, A8, R1, R2, R3, R4, R5, R6, R7, R8> split( ValueValidator<? super A8, ? extends R8> v8) { return new Arguments8Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments7Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X> { /** * Convert an Arguments1Validator that validates Arguments7 to an Arguments7Validator * @param validator validator for Arguments7 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <A4> type of argument at position 4 * @param <A5> type of argument at position 5 * @param <A6> type of argument at position 6 * @param <A7> type of argument at position 7 * @param <X> target result type * @return arguments7 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, A4, A5, A6, A7, X> Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X> unwrap( Arguments1Validator<Arguments7<A1, A2, A3, A4, A5, A6, A7>, X> validator) { return new Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7), locale, constraintContext); } @Override public Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, Supplier<X>> lazy() { return Arguments7Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments7 as a single object. * @return a validator that takes an Arguments7 * @since 0.16.0 */ default Arguments1Validator<Arguments7<A1, A2, A3, A4, A5, A6, A7>, X> wrap() { return new Arguments1Validator<Arguments7<A1, A2, A3, A4, A5, A6, A7>, X>() { @Override public Validated<X> validate(Arguments7<A1, A2, A3, A4, A5, A6, A7> args, Locale locale, ConstraintContext constraintContext) { final Arguments7<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7> nonNullArgs = Objects .requireNonNull(args); return Arguments7Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), nonNullArgs.arg4(), nonNullArgs.arg5(), nonNullArgs.arg6(), nonNullArgs.arg7(), locale, constraintContext); } @Override public Arguments1Validator<Arguments7<A1, A2, A3, A4, A5, A6, A7>, Supplier<X>> lazy() { return Arguments7Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X2> andThen(Function<? super X, ? extends X2> mapper) { return new Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, Locale locale, ConstraintContext constraintContext) { return Arguments7Validator.this.validate(a1, a2, a3, a4, a5, a6, a7, locale, constraintContext) .map(mapper); } @Override public Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, Supplier<X2>> lazy() { return Arguments7Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X2> andThen(ValueValidator<? super X, X2> validator) { return new Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, Locale locale, ConstraintContext constraintContext) { return Arguments7Validator.this.validate(a1, a2, a3, a4, a5, a6, a7, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, Supplier<X2>> lazy() { return Arguments7Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments7<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments7<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7> args = mapper .apply(a); return Arguments7Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), args.arg4(), args.arg5(), args.arg6(), args.arg7(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments7Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7) { return this.validate(a1, a2, a3, a4, a5, a6, a7, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, a4, a5, a6, a7, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, Locale locale) { return this.validate(a1, a2, a3, a4, a5, a6, a7, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, constraintContext) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, locale).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, locale, constraintContext) .orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments8.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function8; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 8 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @param <A3> the type of argument at position 3 * @param <A4> the type of argument at position 4 * @param <A5> the type of argument at position 5 * @param <A6> the type of argument at position 6 * @param <A7> the type of argument at position 7 * @param <A8> the type of argument at position 8 * @since 0.3.0 */ public final class Arguments8<A1, A2, A3, A4, A5, A6, A7, A8> { private final A1 arg1; private final A2 arg2; private final A3 arg3; private final A4 arg4; private final A5 arg5; private final A6 arg6; private final A7 arg7; private final A8 arg8; /** * Creates a new Arguments8 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2, arg3 the * argument at position 3, arg4 the argument at position 4, arg5 the argument at * position 5, arg6 the argument at position 6, arg7 the argument at position 7, arg8 * the argument at position 8 */ Arguments8(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3, @Nullable A4 arg4, @Nullable A5 arg5, @Nullable A6 arg6, @Nullable A7 arg7, @Nullable A8 arg8) { this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; this.arg4 = arg4; this.arg5 = arg5; this.arg6 = arg6; this.arg7 = arg7; this.arg8 = arg8; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Returns the argument at position 3. * @return the argument at position 3 */ @Nullable public A3 arg3() { return this.arg3; } /** * Returns the argument at position 4. * @return the argument at position 4 */ @Nullable public A4 arg4() { return this.arg4; } /** * Returns the argument at position 5. * @return the argument at position 5 */ @Nullable public A5 arg5() { return this.arg5; } /** * Returns the argument at position 6. * @return the argument at position 6 */ @Nullable public A6 arg6() { return this.arg6; } /** * Returns the argument at position 7. * @return the argument at position 7 */ @Nullable public A7 arg7() { return this.arg7; } /** * Returns the argument at position 8. * @return the argument at position 8 */ @Nullable public A8 arg8() { return this.arg8; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map( Function8<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? extends X> mapper) { return mapper.apply(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments2 instance containing only the first 2 arguments. * @return an Arguments2 instance with arguments from arg1 to arg2 * @since 0.16.0 */ public Arguments2<A1, A2> first2() { return new Arguments2<>(arg1, arg2); } /** * Returns a new Arguments3 instance containing only the first 3 arguments. * @return an Arguments3 instance with arguments from arg1 to arg3 * @since 0.16.0 */ public Arguments3<A1, A2, A3> first3() { return new Arguments3<>(arg1, arg2, arg3); } /** * Returns a new Arguments4 instance containing only the first 4 arguments. * @return an Arguments4 instance with arguments from arg1 to arg4 * @since 0.16.0 */ public Arguments4<A1, A2, A3, A4> first4() { return new Arguments4<>(arg1, arg2, arg3, arg4); } /** * Returns a new Arguments5 instance containing only the first 5 arguments. * @return an Arguments5 instance with arguments from arg1 to arg5 * @since 0.16.0 */ public Arguments5<A1, A2, A3, A4, A5> first5() { return new Arguments5<>(arg1, arg2, arg3, arg4, arg5); } /** * Returns a new Arguments6 instance containing only the first 6 arguments. * @return an Arguments6 instance with arguments from arg1 to arg6 * @since 0.16.0 */ public Arguments6<A1, A2, A3, A4, A5, A6> first6() { return new Arguments6<>(arg1, arg2, arg3, arg4, arg5, arg6); } /** * Returns a new Arguments7 instance containing only the first 7 arguments. * @return an Arguments7 instance with arguments from arg1 to arg7 * @since 0.16.0 */ public Arguments7<A1, A2, A3, A4, A5, A6, A7> first7() { return new Arguments7<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg8 to arg8 * @since 0.16.0 */ public Arguments1<A8> last1() { return new Arguments1<>(arg8); } /** * Returns a new Arguments2 instance containing only the last 2 arguments. * @return an Arguments2 instance with arguments from arg7 to arg8 * @since 0.16.0 */ public Arguments2<A7, A8> last2() { return new Arguments2<>(arg7, arg8); } /** * Returns a new Arguments3 instance containing only the last 3 arguments. * @return an Arguments3 instance with arguments from arg6 to arg8 * @since 0.16.0 */ public Arguments3<A6, A7, A8> last3() { return new Arguments3<>(arg6, arg7, arg8); } /** * Returns a new Arguments4 instance containing only the last 4 arguments. * @return an Arguments4 instance with arguments from arg5 to arg8 * @since 0.16.0 */ public Arguments4<A5, A6, A7, A8> last4() { return new Arguments4<>(arg5, arg6, arg7, arg8); } /** * Returns a new Arguments5 instance containing only the last 5 arguments. * @return an Arguments5 instance with arguments from arg4 to arg8 * @since 0.16.0 */ public Arguments5<A4, A5, A6, A7, A8> last5() { return new Arguments5<>(arg4, arg5, arg6, arg7, arg8); } /** * Returns a new Arguments6 instance containing only the last 6 arguments. * @return an Arguments6 instance with arguments from arg3 to arg8 * @since 0.16.0 */ public Arguments6<A3, A4, A5, A6, A7, A8> last6() { return new Arguments6<>(arg3, arg4, arg5, arg6, arg7, arg8); } /** * Returns a new Arguments7 instance containing only the last 7 arguments. * @return an Arguments7 instance with arguments from arg2 to arg8 * @since 0.16.0 */ public Arguments7<A2, A3, A4, A5, A6, A7, A8> last7() { return new Arguments7<>(arg2, arg3, arg4, arg5, arg6, arg7, arg8); } /** * Appends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to append * @param arg the argument to append * @return a new Arguments9 instance with the additional argument * @since 0.16.0 */ public <B> Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, B> append(@Nullable B arg) { return new Arguments9<>(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7, this.arg8, arg); } /** * Prepends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to prepend * @param arg the argument to prepend * @return a new Arguments9 instance with the additional argument * @since 0.16.0 */ public <B> Arguments9<B, A1, A2, A3, A4, A5, A6, A7, A8> prepend(@Nullable B arg) { return new Arguments9<>(arg, this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7, this.arg8); } /** * Returns a new Arguments8 instance with the arguments in reverse order. * @return an Arguments8 instance with arguments in reverse order * @since 0.16.0 */ public Arguments8<A8, A7, A6, A5, A4, A3, A2, A1> reverse() { return new Arguments8<>(arg8, arg7, arg6, arg5, arg4, arg3, arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments8<A1, A2, A3, A4, A5, A6, A7, A8> that = (Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2) && Objects.equals(this.arg3, that.arg3) && Objects.equals(this.arg4, that.arg4) && Objects.equals(this.arg5, that.arg5) && Objects.equals(this.arg6, that.arg6) && Objects.equals(this.arg7, that.arg7) && Objects.equals(this.arg8, that.arg8); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7, this.arg8); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments8{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + ", " + "arg3=" + this.arg3 + ", " + "arg4=" + this.arg4 + ", " + "arg5=" + this.arg5 + ", " + "arg6=" + this.arg6 + ", " + "arg7=" + this.arg7 + ", " + "arg8=" + this.arg8 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments8Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function8; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments8Combining<A, R1, R2, R3, R4, R5, R6, R7, R8> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; protected final ValueValidator<? super A, ? extends R4> v4; protected final ValueValidator<? super A, ? extends R5> v5; protected final ValueValidator<? super A, ? extends R6> v6; protected final ValueValidator<? super A, ? extends R7> v7; protected final ValueValidator<? super A, ? extends R8> v8; public Arguments8Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; } public <X> Arguments1Validator<A, X> apply( Function8<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments8Combining.this.v1.validate(a, locale, constraintContext), Arguments8Combining.this.v2.validate(a, locale, constraintContext), Arguments8Combining.this.v3.validate(a, locale, constraintContext), Arguments8Combining.this.v4.validate(a, locale, constraintContext), Arguments8Combining.this.v5.validate(a, locale, constraintContext), Arguments8Combining.this.v6.validate(a, locale, constraintContext), Arguments8Combining.this.v7.validate(a, locale, constraintContext), Arguments8Combining.this.v8.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7, r8) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7, r8), Arguments8Combining.this.v1.validate(a, locale, constraintContext), Arguments8Combining.this.v2.validate(a, locale, constraintContext), Arguments8Combining.this.v3.validate(a, locale, constraintContext), Arguments8Combining.this.v4.validate(a, locale, constraintContext), Arguments8Combining.this.v5.validate(a, locale, constraintContext), Arguments8Combining.this.v6.validate(a, locale, constraintContext), Arguments8Combining.this.v7.validate(a, locale, constraintContext), Arguments8Combining.this.v8.validate(a, locale, constraintContext)); } }; } public <R9> Arguments9Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9> combine( ValueValidator<? super A, ? extends R9> v9) { return new Arguments9Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments8Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function8; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments8Splitting<A1, A2, A3, A4, A5, A6, A7, A8, R1, R2, R3, R4, R5, R6, R7, R8> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; protected final ValueValidator<? super A4, ? extends R4> v4; protected final ValueValidator<? super A5, ? extends R5> v5; protected final ValueValidator<? super A6, ? extends R6> v6; protected final ValueValidator<? super A7, ? extends R7> v7; protected final ValueValidator<? super A8, ? extends R8> v8; public Arguments8Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; } public <X> Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X> apply( Function8<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? extends X> f) { return new Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X>() { @Override public Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, Supplier<X>> lazy() { return ((a1, a2, a3, a4, a5, a6, a7, a8, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7, r8) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7, r8), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext), v8.validate(a8, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext), v8.validate(a8, locale, constraintContext)); } }; } public <A9, R9> Arguments9Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, R1, R2, R3, R4, R5, R6, R7, R8, R9> split( ValueValidator<? super A9, ? extends R9> v9) { return new Arguments9Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments8Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X> { /** * Convert an Arguments1Validator that validates Arguments8 to an Arguments8Validator * @param validator validator for Arguments8 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <A4> type of argument at position 4 * @param <A5> type of argument at position 5 * @param <A6> type of argument at position 6 * @param <A7> type of argument at position 7 * @param <A8> type of argument at position 8 * @param <X> target result type * @return arguments8 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, A4, A5, A6, A7, A8, X> Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X> unwrap( Arguments1Validator<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>, X> validator) { return new Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8), locale, constraintContext); } @Override public Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, Supplier<X>> lazy() { return Arguments8Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments8 as a single object. * @return a validator that takes an Arguments8 * @since 0.16.0 */ default Arguments1Validator<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>, X> wrap() { return new Arguments1Validator<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>, X>() { @Override public Validated<X> validate(Arguments8<A1, A2, A3, A4, A5, A6, A7, A8> args, Locale locale, ConstraintContext constraintContext) { final Arguments8<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8> nonNullArgs = Objects .requireNonNull(args); return Arguments8Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), nonNullArgs.arg4(), nonNullArgs.arg5(), nonNullArgs.arg6(), nonNullArgs.arg7(), nonNullArgs.arg8(), locale, constraintContext); } @Override public Arguments1Validator<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>, Supplier<X>> lazy() { return Arguments8Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X2> andThen( Function<? super X, ? extends X2> mapper) { return new Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, Locale locale, ConstraintContext constraintContext) { return Arguments8Validator.this.validate(a1, a2, a3, a4, a5, a6, a7, a8, locale, constraintContext) .map(mapper); } @Override public Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, Supplier<X2>> lazy() { return Arguments8Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X2> andThen( ValueValidator<? super X, X2> validator) { return new Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, Locale locale, ConstraintContext constraintContext) { return Arguments8Validator.this.validate(a1, a2, a3, a4, a5, a6, a7, a8, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, Supplier<X2>> lazy() { return Arguments8Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments8<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments8<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8> args = mapper .apply(a); return Arguments8Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), args.arg4(), args.arg5(), args.arg6(), args.arg7(), args.arg8(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments8Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, Locale locale) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, constraintContext) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, locale).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, locale, constraintContext) .orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments9.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Objects; import am.ik.yavi.fn.Function9; import am.ik.yavi.jsr305.Nullable; /** * A container class that holds 9 arguments, providing type-safe access to each argument * and mapping functionality to transform these arguments. * * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @param <A1> the type of argument at position 1 * @param <A2> the type of argument at position 2 * @param <A3> the type of argument at position 3 * @param <A4> the type of argument at position 4 * @param <A5> the type of argument at position 5 * @param <A6> the type of argument at position 6 * @param <A7> the type of argument at position 7 * @param <A8> the type of argument at position 8 * @param <A9> the type of argument at position 9 * @since 0.3.0 */ public final class Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9> { private final A1 arg1; private final A2 arg2; private final A3 arg3; private final A4 arg4; private final A5 arg5; private final A6 arg6; private final A7 arg7; private final A8 arg8; private final A9 arg9; /** * Creates a new Arguments9 instance with the provided arguments. * @param arg1 the argument at position 1, arg2 the argument at position 2, arg3 the * argument at position 3, arg4 the argument at position 4, arg5 the argument at * position 5, arg6 the argument at position 6, arg7 the argument at position 7, arg8 * the argument at position 8, arg9 the argument at position 9 */ Arguments9(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3, @Nullable A4 arg4, @Nullable A5 arg5, @Nullable A6 arg6, @Nullable A7 arg7, @Nullable A8 arg8, @Nullable A9 arg9) { this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; this.arg4 = arg4; this.arg5 = arg5; this.arg6 = arg6; this.arg7 = arg7; this.arg8 = arg8; this.arg9 = arg9; } /** * Returns the argument at position 1. * @return the argument at position 1 */ @Nullable public A1 arg1() { return this.arg1; } /** * Returns the argument at position 2. * @return the argument at position 2 */ @Nullable public A2 arg2() { return this.arg2; } /** * Returns the argument at position 3. * @return the argument at position 3 */ @Nullable public A3 arg3() { return this.arg3; } /** * Returns the argument at position 4. * @return the argument at position 4 */ @Nullable public A4 arg4() { return this.arg4; } /** * Returns the argument at position 5. * @return the argument at position 5 */ @Nullable public A5 arg5() { return this.arg5; } /** * Returns the argument at position 6. * @return the argument at position 6 */ @Nullable public A6 arg6() { return this.arg6; } /** * Returns the argument at position 7. * @return the argument at position 7 */ @Nullable public A7 arg7() { return this.arg7; } /** * Returns the argument at position 8. * @return the argument at position 8 */ @Nullable public A8 arg8() { return this.arg8; } /** * Returns the argument at position 9. * @return the argument at position 9 */ @Nullable public A9 arg9() { return this.arg9; } /** * Applies the provided mapping function to all arguments contained in this instance. * @param <X> the type of the result * @param mapper the function to apply to the arguments * @return the result of applying the mapper function to the arguments */ public <X> X map( Function9<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? extends X> mapper) { return mapper.apply(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); } /** * Returns a new Arguments1 instance containing only the first 1 arguments. * @return an Arguments1 instance with arguments from arg1 to arg1 * @since 0.16.0 */ public Arguments1<A1> first1() { return new Arguments1<>(arg1); } /** * Returns a new Arguments2 instance containing only the first 2 arguments. * @return an Arguments2 instance with arguments from arg1 to arg2 * @since 0.16.0 */ public Arguments2<A1, A2> first2() { return new Arguments2<>(arg1, arg2); } /** * Returns a new Arguments3 instance containing only the first 3 arguments. * @return an Arguments3 instance with arguments from arg1 to arg3 * @since 0.16.0 */ public Arguments3<A1, A2, A3> first3() { return new Arguments3<>(arg1, arg2, arg3); } /** * Returns a new Arguments4 instance containing only the first 4 arguments. * @return an Arguments4 instance with arguments from arg1 to arg4 * @since 0.16.0 */ public Arguments4<A1, A2, A3, A4> first4() { return new Arguments4<>(arg1, arg2, arg3, arg4); } /** * Returns a new Arguments5 instance containing only the first 5 arguments. * @return an Arguments5 instance with arguments from arg1 to arg5 * @since 0.16.0 */ public Arguments5<A1, A2, A3, A4, A5> first5() { return new Arguments5<>(arg1, arg2, arg3, arg4, arg5); } /** * Returns a new Arguments6 instance containing only the first 6 arguments. * @return an Arguments6 instance with arguments from arg1 to arg6 * @since 0.16.0 */ public Arguments6<A1, A2, A3, A4, A5, A6> first6() { return new Arguments6<>(arg1, arg2, arg3, arg4, arg5, arg6); } /** * Returns a new Arguments7 instance containing only the first 7 arguments. * @return an Arguments7 instance with arguments from arg1 to arg7 * @since 0.16.0 */ public Arguments7<A1, A2, A3, A4, A5, A6, A7> first7() { return new Arguments7<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7); } /** * Returns a new Arguments8 instance containing only the first 8 arguments. * @return an Arguments8 instance with arguments from arg1 to arg8 * @since 0.16.0 */ public Arguments8<A1, A2, A3, A4, A5, A6, A7, A8> first8() { return new Arguments8<>(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); } /** * Returns a new Arguments1 instance containing only the last 1 arguments. * @return an Arguments1 instance with arguments from arg9 to arg9 * @since 0.16.0 */ public Arguments1<A9> last1() { return new Arguments1<>(arg9); } /** * Returns a new Arguments2 instance containing only the last 2 arguments. * @return an Arguments2 instance with arguments from arg8 to arg9 * @since 0.16.0 */ public Arguments2<A8, A9> last2() { return new Arguments2<>(arg8, arg9); } /** * Returns a new Arguments3 instance containing only the last 3 arguments. * @return an Arguments3 instance with arguments from arg7 to arg9 * @since 0.16.0 */ public Arguments3<A7, A8, A9> last3() { return new Arguments3<>(arg7, arg8, arg9); } /** * Returns a new Arguments4 instance containing only the last 4 arguments. * @return an Arguments4 instance with arguments from arg6 to arg9 * @since 0.16.0 */ public Arguments4<A6, A7, A8, A9> last4() { return new Arguments4<>(arg6, arg7, arg8, arg9); } /** * Returns a new Arguments5 instance containing only the last 5 arguments. * @return an Arguments5 instance with arguments from arg5 to arg9 * @since 0.16.0 */ public Arguments5<A5, A6, A7, A8, A9> last5() { return new Arguments5<>(arg5, arg6, arg7, arg8, arg9); } /** * Returns a new Arguments6 instance containing only the last 6 arguments. * @return an Arguments6 instance with arguments from arg4 to arg9 * @since 0.16.0 */ public Arguments6<A4, A5, A6, A7, A8, A9> last6() { return new Arguments6<>(arg4, arg5, arg6, arg7, arg8, arg9); } /** * Returns a new Arguments7 instance containing only the last 7 arguments. * @return an Arguments7 instance with arguments from arg3 to arg9 * @since 0.16.0 */ public Arguments7<A3, A4, A5, A6, A7, A8, A9> last7() { return new Arguments7<>(arg3, arg4, arg5, arg6, arg7, arg8, arg9); } /** * Returns a new Arguments8 instance containing only the last 8 arguments. * @return an Arguments8 instance with arguments from arg2 to arg9 * @since 0.16.0 */ public Arguments8<A2, A3, A4, A5, A6, A7, A8, A9> last8() { return new Arguments8<>(arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); } /** * Appends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to append * @param arg the argument to append * @return a new Arguments10 instance with the additional argument * @since 0.16.0 */ public <B> Arguments10<A1, A2, A3, A4, A5, A6, A7, A8, A9, B> append(@Nullable B arg) { return new Arguments10<>(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7, this.arg8, this.arg9, arg); } /** * Prepends an additional argument to create a new, larger Arguments instance. * @param <B> the type of the argument to prepend * @param arg the argument to prepend * @return a new Arguments10 instance with the additional argument * @since 0.16.0 */ public <B> Arguments10<B, A1, A2, A3, A4, A5, A6, A7, A8, A9> prepend(@Nullable B arg) { return new Arguments10<>(arg, this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7, this.arg8, this.arg9); } /** * Returns a new Arguments9 instance with the arguments in reverse order. * @return an Arguments9 instance with arguments in reverse order * @since 0.16.0 */ public Arguments9<A9, A8, A7, A6, A5, A4, A3, A2, A1> reverse() { return new Arguments9<>(arg9, arg8, arg7, arg6, arg5, arg4, arg3, arg2, arg1); } /** * Indicates whether some other object is "equal to" this one. * @param obj the reference object with which to compare * @return true if this object is the same as the obj argument; false otherwise */ @Override @SuppressWarnings("unchecked") public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9> that = (Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>) obj; return Objects.equals(this.arg1, that.arg1) && Objects.equals(this.arg2, that.arg2) && Objects.equals(this.arg3, that.arg3) && Objects.equals(this.arg4, that.arg4) && Objects.equals(this.arg5, that.arg5) && Objects.equals(this.arg6, that.arg6) && Objects.equals(this.arg7, that.arg7) && Objects.equals(this.arg8, that.arg8) && Objects.equals(this.arg9, that.arg9); } /** * Returns a hash code value for the object. * @return a hash code value for this object */ @Override public int hashCode() { return Objects.hash(this.arg1, this.arg2, this.arg3, this.arg4, this.arg5, this.arg6, this.arg7, this.arg8, this.arg9); } /** * Returns a string representation of the object. * @return a string representation of the object */ @Override public String toString() { return "Arguments9{" + "arg1=" + this.arg1 + ", " + "arg2=" + this.arg2 + ", " + "arg3=" + this.arg3 + ", " + "arg4=" + this.arg4 + ", " + "arg5=" + this.arg5 + ", " + "arg6=" + this.arg6 + ", " + "arg7=" + this.arg7 + ", " + "arg8=" + this.arg8 + ", " + "arg9=" + this.arg9 + "}"; } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments9Combining.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function9; import am.ik.yavi.fn.Validations; import java.util.Locale; import java.util.function.Supplier; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments9Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9> { protected final ValueValidator<? super A, ? extends R1> v1; protected final ValueValidator<? super A, ? extends R2> v2; protected final ValueValidator<? super A, ? extends R3> v3; protected final ValueValidator<? super A, ? extends R4> v4; protected final ValueValidator<? super A, ? extends R5> v5; protected final ValueValidator<? super A, ? extends R6> v6; protected final ValueValidator<? super A, ? extends R7> v7; protected final ValueValidator<? super A, ? extends R8> v8; protected final ValueValidator<? super A, ? extends R9> v9; public Arguments9Combining(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; } public <X> Arguments1Validator<A, X> apply( Function9<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? extends X> f) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, Arguments9Combining.this.v1.validate(a, locale, constraintContext), Arguments9Combining.this.v2.validate(a, locale, constraintContext), Arguments9Combining.this.v3.validate(a, locale, constraintContext), Arguments9Combining.this.v4.validate(a, locale, constraintContext), Arguments9Combining.this.v5.validate(a, locale, constraintContext), Arguments9Combining.this.v6.validate(a, locale, constraintContext), Arguments9Combining.this.v7.validate(a, locale, constraintContext), Arguments9Combining.this.v8.validate(a, locale, constraintContext), Arguments9Combining.this.v9.validate(a, locale, constraintContext)); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return (a, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7, r8, r9) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7, r8, r9), Arguments9Combining.this.v1.validate(a, locale, constraintContext), Arguments9Combining.this.v2.validate(a, locale, constraintContext), Arguments9Combining.this.v3.validate(a, locale, constraintContext), Arguments9Combining.this.v4.validate(a, locale, constraintContext), Arguments9Combining.this.v5.validate(a, locale, constraintContext), Arguments9Combining.this.v6.validate(a, locale, constraintContext), Arguments9Combining.this.v7.validate(a, locale, constraintContext), Arguments9Combining.this.v8.validate(a, locale, constraintContext), Arguments9Combining.this.v9.validate(a, locale, constraintContext)); } }; } public <R10> Arguments10Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10> combine( ValueValidator<? super A, ? extends R10> v10) { return new Arguments10Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments9Splitting.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function9; import am.ik.yavi.fn.Validations; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class Arguments9Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, R1, R2, R3, R4, R5, R6, R7, R8, R9> { protected final ValueValidator<? super A1, ? extends R1> v1; protected final ValueValidator<? super A2, ? extends R2> v2; protected final ValueValidator<? super A3, ? extends R3> v3; protected final ValueValidator<? super A4, ? extends R4> v4; protected final ValueValidator<? super A5, ? extends R5> v5; protected final ValueValidator<? super A6, ? extends R6> v6; protected final ValueValidator<? super A7, ? extends R7> v7; protected final ValueValidator<? super A8, ? extends R8> v8; protected final ValueValidator<? super A9, ? extends R9> v9; public Arguments9Splitting(ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; } public <X> Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> apply( Function9<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? extends X> f) { return new Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X>() { @Override public Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, Supplier<X>> lazy() { return ((a1, a2, a3, a4, a5, a6, a7, a8, a9, locale, constraintContext) -> Validations.apply( (r1, r2, r3, r4, r5, r6, r7, r8, r9) -> () -> f.apply(r1, r2, r3, r4, r5, r6, r7, r8, r9), v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext), v8.validate(a8, locale, constraintContext), v9.validate(a9, locale, constraintContext))); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, Locale locale, ConstraintContext constraintContext) { return Validations.apply(f::apply, v1.validate(a1, locale, constraintContext), v2.validate(a2, locale, constraintContext), v3.validate(a3, locale, constraintContext), v4.validate(a4, locale, constraintContext), v5.validate(a5, locale, constraintContext), v6.validate(a6, locale, constraintContext), v7.validate(a7, locale, constraintContext), v8.validate(a8, locale, constraintContext), v9.validate(a9, locale, constraintContext)); } }; } public <A10, R10> Arguments10Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10> split( ValueValidator<? super A10, ? extends R10> v10) { return new Arguments10Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/Arguments9Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.ConstraintGroup; import am.ik.yavi.core.ConstraintViolationsException; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ @FunctionalInterface public interface Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> { /** * Convert an Arguments1Validator that validates Arguments9 to an Arguments9Validator * @param validator validator for Arguments9 * @param <A1> type of first argument * @param <A2> type of argument at position 2 * @param <A3> type of argument at position 3 * @param <A4> type of argument at position 4 * @param <A5> type of argument at position 5 * @param <A6> type of argument at position 6 * @param <A7> type of argument at position 7 * @param <A8> type of argument at position 8 * @param <A9> type of argument at position 9 * @param <X> target result type * @return arguments9 validator that takes arguments directly * @since 0.16.0 */ static <A1, A2, A3, A4, A5, A6, A7, A8, A9, X> Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> unwrap( Arguments1Validator<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>, X> validator) { return new Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X>() { @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, Locale locale, ConstraintContext constraintContext) { return validator.validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9), locale, constraintContext); } @Override public Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, Supplier<X>> lazy() { return Arguments9Validator.unwrap(validator.lazy()); } }; } Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, Locale locale, ConstraintContext constraintContext); /** * Convert this validator to one that validates Arguments9 as a single object. * @return a validator that takes an Arguments9 * @since 0.16.0 */ default Arguments1Validator<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>, X> wrap() { return new Arguments1Validator<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>, X>() { @Override public Validated<X> validate(Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9> args, Locale locale, ConstraintContext constraintContext) { final Arguments9<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9> nonNullArgs = Objects .requireNonNull(args); return Arguments9Validator.this.validate(nonNullArgs.arg1(), nonNullArgs.arg2(), nonNullArgs.arg3(), nonNullArgs.arg4(), nonNullArgs.arg5(), nonNullArgs.arg6(), nonNullArgs.arg7(), nonNullArgs.arg8(), nonNullArgs.arg9(), locale, constraintContext); } @Override public Arguments1Validator<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>, Supplier<X>> lazy() { return Arguments9Validator.this.lazy().wrap(); } }; } /** * @since 0.7.0 */ default <X2> Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X2> andThen( Function<? super X, ? extends X2> mapper) { return new Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, Locale locale, ConstraintContext constraintContext) { return Arguments9Validator.this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, locale, constraintContext) .map(mapper); } @Override public Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, Supplier<X2>> lazy() { return Arguments9Validator.this.lazy() .andThen((Function<Supplier<X>, Supplier<X2>>) xSupplier -> () -> mapper.apply(xSupplier.get())); } }; } /** * @since 0.11.0 */ default <X2> Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X2> andThen( ValueValidator<? super X, X2> validator) { return new Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X2>() { @Override public Validated<X2> validate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, Locale locale, ConstraintContext constraintContext) { return Arguments9Validator.this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, locale, constraintContext) .flatMap(v -> validator.validate(v, locale, constraintContext)); } @Override public Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, Supplier<X2>> lazy() { return Arguments9Validator.this.lazy() .andThen((xSupplier, locale, constraintContext) -> validator .validate(Objects.requireNonNull(xSupplier).get(), locale, constraintContext) .map(x2 -> () -> x2)); } }; } /** * @since 0.7.0 */ default <A> Arguments1Validator<A, X> compose( Function<? super A, ? extends Arguments9<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9>> mapper) { return new Arguments1Validator<A, X>() { @Override public Validated<X> validate(A a, Locale locale, ConstraintContext constraintContext) { final Arguments9<? extends A1, ? extends A2, ? extends A3, ? extends A4, ? extends A5, ? extends A6, ? extends A7, ? extends A8, ? extends A9> args = mapper .apply(a); return Arguments9Validator.this.validate(args.arg1(), args.arg2(), args.arg3(), args.arg4(), args.arg5(), args.arg6(), args.arg7(), args.arg8(), args.arg9(), locale, constraintContext); } @Override public Arguments1Validator<A, Supplier<X>> lazy() { return Arguments9Validator.this.lazy().compose(mapper); } }; } /** * @since 0.10.0 */ default Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, Supplier<X>> lazy() { throw new UnsupportedOperationException("lazy is not implemented!"); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, Locale.getDefault(), ConstraintGroup.DEFAULT); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, ConstraintContext constraintContext) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, Locale.getDefault(), constraintContext); } default Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, Locale locale) { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, locale, ConstraintGroup.DEFAULT); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9).orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, constraintContext) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, Locale locale) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, locale) .orElseThrow(ConstraintViolationsException::new); } default X validated(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, Locale locale, ConstraintContext constraintContext) throws ConstraintViolationsException { return this.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, locale, constraintContext) .orElseThrow(ConstraintViolationsException::new); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/ArgumentsValidators.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.function.Function; import java.util.function.Supplier; import am.ik.yavi.core.Validated; import am.ik.yavi.core.ValueValidator; import static java.util.function.Function.identity; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class ArgumentsValidators { public static <A1, A2, R1, R2> Arguments2Splitting<A1, A2, R1, R2> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2) { return new Arguments2Splitting<>(v1, v2); } public static <A1, A2, A3, R1, R2, R3> Arguments3Splitting<A1, A2, A3, R1, R2, R3> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3) { return new Arguments3Splitting<>(v1, v2, v3); } public static <A1, A2, A3, A4, R1, R2, R3, R4> Arguments4Splitting<A1, A2, A3, A4, R1, R2, R3, R4> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4) { return new Arguments4Splitting<>(v1, v2, v3, v4); } public static <A1, A2, A3, A4, A5, R1, R2, R3, R4, R5> Arguments5Splitting<A1, A2, A3, A4, A5, R1, R2, R3, R4, R5> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5) { return new Arguments5Splitting<>(v1, v2, v3, v4, v5); } public static <A1, A2, A3, A4, A5, A6, R1, R2, R3, R4, R5, R6> Arguments6Splitting<A1, A2, A3, A4, A5, A6, R1, R2, R3, R4, R5, R6> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6) { return new Arguments6Splitting<>(v1, v2, v3, v4, v5, v6); } public static <A1, A2, A3, A4, A5, A6, A7, R1, R2, R3, R4, R5, R6, R7> Arguments7Splitting<A1, A2, A3, A4, A5, A6, A7, R1, R2, R3, R4, R5, R6, R7> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7) { return new Arguments7Splitting<>(v1, v2, v3, v4, v5, v6, v7); } public static <A1, A2, A3, A4, A5, A6, A7, A8, R1, R2, R3, R4, R5, R6, R7, R8> Arguments8Splitting<A1, A2, A3, A4, A5, A6, A7, A8, R1, R2, R3, R4, R5, R6, R7, R8> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8) { return new Arguments8Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, R1, R2, R3, R4, R5, R6, R7, R8, R9> Arguments9Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, R1, R2, R3, R4, R5, R6, R7, R8, R9> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9) { return new Arguments9Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10> Arguments10Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10) { return new Arguments10Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11> Arguments11Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10, ValueValidator<? super A11, ? extends R11> v11) { return new Arguments11Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12> Arguments12Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10, ValueValidator<? super A11, ? extends R11> v11, ValueValidator<? super A12, ? extends R12> v12) { return new Arguments12Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13> Arguments13Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10, ValueValidator<? super A11, ? extends R11> v11, ValueValidator<? super A12, ? extends R12> v12, ValueValidator<? super A13, ? extends R13> v13) { return new Arguments13Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14> Arguments14Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10, ValueValidator<? super A11, ? extends R11> v11, ValueValidator<? super A12, ? extends R12> v12, ValueValidator<? super A13, ? extends R13> v13, ValueValidator<? super A14, ? extends R14> v14) { return new Arguments14Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> Arguments15Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10, ValueValidator<? super A11, ? extends R11> v11, ValueValidator<? super A12, ? extends R12> v12, ValueValidator<? super A13, ? extends R13> v13, ValueValidator<? super A14, ? extends R14> v14, ValueValidator<? super A15, ? extends R15> v15) { return new Arguments15Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> Arguments16Splitting<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> split( ValueValidator<? super A1, ? extends R1> v1, ValueValidator<? super A2, ? extends R2> v2, ValueValidator<? super A3, ? extends R3> v3, ValueValidator<? super A4, ? extends R4> v4, ValueValidator<? super A5, ? extends R5> v5, ValueValidator<? super A6, ? extends R6> v6, ValueValidator<? super A7, ? extends R7> v7, ValueValidator<? super A8, ? extends R8> v8, ValueValidator<? super A9, ? extends R9> v9, ValueValidator<? super A10, ? extends R10> v10, ValueValidator<? super A11, ? extends R11> v11, ValueValidator<? super A12, ? extends R12> v12, ValueValidator<? super A13, ? extends R13> v13, ValueValidator<? super A14, ? extends R14> v14, ValueValidator<? super A15, ? extends R15> v15, ValueValidator<? super A16, ? extends R16> v16) { return new Arguments16Splitting<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16); } public static <A, R1, R2> Arguments2Combining<A, R1, R2> combine(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2) { return new Arguments2Combining<>(v1, v2); } public static <A, R1, R2, R3> Arguments3Combining<A, R1, R2, R3> combine(ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3) { return new Arguments3Combining<>(v1, v2, v3); } public static <A, R1, R2, R3, R4> Arguments4Combining<A, R1, R2, R3, R4> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4) { return new Arguments4Combining<>(v1, v2, v3, v4); } public static <A, R1, R2, R3, R4, R5> Arguments5Combining<A, R1, R2, R3, R4, R5> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5) { return new Arguments5Combining<>(v1, v2, v3, v4, v5); } public static <A, R1, R2, R3, R4, R5, R6> Arguments6Combining<A, R1, R2, R3, R4, R5, R6> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6) { return new Arguments6Combining<>(v1, v2, v3, v4, v5, v6); } public static <A, R1, R2, R3, R4, R5, R6, R7> Arguments7Combining<A, R1, R2, R3, R4, R5, R6, R7> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7) { return new Arguments7Combining<>(v1, v2, v3, v4, v5, v6, v7); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8> Arguments8Combining<A, R1, R2, R3, R4, R5, R6, R7, R8> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8) { return new Arguments8Combining<>(v1, v2, v3, v4, v5, v6, v7, v8); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8, R9> Arguments9Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9) { return new Arguments9Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10> Arguments10Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10) { return new Arguments10Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11> Arguments11Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10, ValueValidator<? super A, ? extends R11> v11) { return new Arguments11Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12> Arguments12Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10, ValueValidator<? super A, ? extends R11> v11, ValueValidator<? super A, ? extends R12> v12) { return new Arguments12Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13> Arguments13Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10, ValueValidator<? super A, ? extends R11> v11, ValueValidator<? super A, ? extends R12> v12, ValueValidator<? super A, ? extends R13> v13) { return new Arguments13Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14> Arguments14Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10, ValueValidator<? super A, ? extends R11> v11, ValueValidator<? super A, ? extends R12> v12, ValueValidator<? super A, ? extends R13> v13, ValueValidator<? super A, ? extends R14> v14) { return new Arguments14Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> Arguments15Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10, ValueValidator<? super A, ? extends R11> v11, ValueValidator<? super A, ? extends R12> v12, ValueValidator<? super A, ? extends R13> v13, ValueValidator<? super A, ? extends R14> v14, ValueValidator<? super A, ? extends R15> v15) { return new Arguments15Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15); } public static <A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> Arguments16Combining<A, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> combine( ValueValidator<? super A, ? extends R1> v1, ValueValidator<? super A, ? extends R2> v2, ValueValidator<? super A, ? extends R3> v3, ValueValidator<? super A, ? extends R4> v4, ValueValidator<? super A, ? extends R5> v5, ValueValidator<? super A, ? extends R6> v6, ValueValidator<? super A, ? extends R7> v7, ValueValidator<? super A, ? extends R8> v8, ValueValidator<? super A, ? extends R9> v9, ValueValidator<? super A, ? extends R10> v10, ValueValidator<? super A, ? extends R11> v11, ValueValidator<? super A, ? extends R12> v12, ValueValidator<? super A, ? extends R13> v13, ValueValidator<? super A, ? extends R14> v14, ValueValidator<? super A, ? extends R15> v15, ValueValidator<? super A, ? extends R16> v16) { return new Arguments16Combining<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16); } public static <A1, R, T> Arguments1Validator<A1, List<R>> traverse1(Iterable<T> values, Function<? super T, ? extends Arguments1Validator<? super A1, ? extends R>> f) { return (a1, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, locale, constraintContext))); } public static <A1, A2, R, T> Arguments2Validator<A1, A2, List<R>> traverse2(Iterable<T> values, Function<? super T, ? extends Arguments2Validator<? super A1, ? super A2, ? extends R>> f) { return (a1, a2, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, locale, constraintContext))); } public static <A1, A2, A3, R, T> Arguments3Validator<A1, A2, A3, List<R>> traverse3(Iterable<T> values, Function<? super T, ? extends Arguments3Validator<? super A1, ? super A2, ? super A3, ? extends R>> f) { return (a1, a2, a3, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, locale, constraintContext))); } public static <A1, A2, A3, A4, R, T> Arguments4Validator<A1, A2, A3, A4, List<R>> traverse4(Iterable<T> values, Function<? super T, ? extends Arguments4Validator<? super A1, ? super A2, ? super A3, ? super A4, ? extends R>> f) { return (a1, a2, a3, a4, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, R, T> Arguments5Validator<A1, A2, A3, A4, A5, List<R>> traverse5( Iterable<T> values, Function<? super T, ? extends Arguments5Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? extends R>> f) { return (a1, a2, a3, a4, a5, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, R, T> Arguments6Validator<A1, A2, A3, A4, A5, A6, List<R>> traverse6( Iterable<T> values, Function<? super T, ? extends Arguments6Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, R, T> Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, List<R>> traverse7( Iterable<T> values, Function<? super T, ? extends Arguments7Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, R, T> Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, List<R>> traverse8( Iterable<T> values, Function<? super T, ? extends Arguments8Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, R, T> Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, List<R>> traverse9( Iterable<T> values, Function<? super T, ? extends Arguments9Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, a9, locale, constraintContext) -> Validated.traverse(values, f .andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R, T> Arguments10Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, List<R>> traverse10( Iterable<T> values, Function<? super T, ? extends Arguments10Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, R, T> Arguments11Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, List<R>> traverse11( Iterable<T> values, Function<? super T, ? extends Arguments11Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, R, T> Arguments12Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, List<R>> traverse12( Iterable<T> values, Function<? super T, ? extends Arguments12Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, locale, constraintContext) -> Validated .traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, R, T> Arguments13Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, List<R>> traverse13( Iterable<T> values, Function<? super T, ? extends Arguments13Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, locale, constraintContext) -> Validated .traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, R, T> Arguments14Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, List<R>> traverse14( Iterable<T> values, Function<? super T, ? extends Arguments14Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, locale, constraintContext) -> Validated .traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, R, T> Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, List<R>> traverse15( Iterable<T> values, Function<? super T, ? extends Arguments15Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, locale, constraintContext))); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, R, T> Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, List<R>> traverse16( Iterable<T> values, Function<? super T, ? extends Arguments16Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? super A16, ? extends R>> f) { return (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, locale, constraintContext) -> Validated.traverse(values, f.andThen(validator -> validator.validate(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, locale, constraintContext))); } public static <A1, R> Arguments1Validator<A1, List<R>> sequence1( Iterable<? extends Arguments1Validator<? super A1, ? extends R>> values) { return traverse1(values, identity()); } public static <A1, A2, R> Arguments2Validator<A1, A2, List<R>> sequence2( Iterable<? extends Arguments2Validator<? super A1, ? super A2, ? extends R>> values) { return traverse2(values, identity()); } public static <A1, A2, A3, R> Arguments3Validator<A1, A2, A3, List<R>> sequence3( Iterable<? extends Arguments3Validator<? super A1, ? super A2, ? super A3, ? extends R>> values) { return traverse3(values, identity()); } public static <A1, A2, A3, A4, R> Arguments4Validator<A1, A2, A3, A4, List<R>> sequence4( Iterable<? extends Arguments4Validator<? super A1, ? super A2, ? super A3, ? super A4, ? extends R>> values) { return traverse4(values, identity()); } public static <A1, A2, A3, A4, A5, R> Arguments5Validator<A1, A2, A3, A4, A5, List<R>> sequence5( Iterable<? extends Arguments5Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? extends R>> values) { return traverse5(values, identity()); } public static <A1, A2, A3, A4, A5, A6, R> Arguments6Validator<A1, A2, A3, A4, A5, A6, List<R>> sequence6( Iterable<? extends Arguments6Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? extends R>> values) { return traverse6(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, R> Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, List<R>> sequence7( Iterable<? extends Arguments7Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? extends R>> values) { return traverse7(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, R> Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, List<R>> sequence8( Iterable<? extends Arguments8Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? extends R>> values) { return traverse8(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, R> Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, List<R>> sequence9( Iterable<? extends Arguments9Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? extends R>> values) { return traverse9(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R> Arguments10Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, List<R>> sequence10( Iterable<? extends Arguments10Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? extends R>> values) { return traverse10(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, R> Arguments11Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, List<R>> sequence11( Iterable<? extends Arguments11Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? extends R>> values) { return traverse11(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, R> Arguments12Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, List<R>> sequence12( Iterable<? extends Arguments12Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? extends R>> values) { return traverse12(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, R> Arguments13Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, List<R>> sequence13( Iterable<? extends Arguments13Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? extends R>> values) { return traverse13(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, R> Arguments14Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, List<R>> sequence14( Iterable<? extends Arguments14Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? extends R>> values) { return traverse14(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, R> Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, List<R>> sequence15( Iterable<? extends Arguments15Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? extends R>> values) { return traverse15(values, identity()); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, R> Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, List<R>> sequence16( Iterable<? extends Arguments16Validator<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? super A16, ? extends R>> values) { return traverse16(values, identity()); } /** * @since 0.8.0 */ public static <A1, R, C extends Collection<R>> Arguments1Validator<Iterable<A1>, C> liftCollection( ValueValidator<? super A1, ? extends R> validator, Supplier<C> factory) { return Arguments1Validator.from(ValueValidator.liftCollection(validator, factory)); } public static <A1, R> Arguments1Validator<Iterable<A1>, List<R>> liftList( ValueValidator<? super A1, ? extends R> validator) { return Arguments1Validator.from(ValueValidator.liftList(validator)); } /** * @since 0.8.0 */ public static <A1, R> Arguments1Validator<Iterable<A1>, Set<R>> liftSet( ValueValidator<? super A1, ? extends R> validator) { return Arguments1Validator.from(ValueValidator.liftSet(validator)); } /** * @since 0.8.0 */ public static <A1, R> Arguments1Validator<Optional<A1>, Optional<R>> liftOptional( ValueValidator<? super A1, ? extends R> validator) { return Arguments1Validator.from(ValueValidator.liftOptional(validator)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/BigDecimalValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.math.BigDecimal; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class BigDecimalValidator<T> extends DefaultArguments1Validator<BigDecimal, T> { @Override public <T2> BigDecimalValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new BigDecimalValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public BigDecimalValidator(Validator<Arguments1<BigDecimal>> validator, Function1<? super BigDecimal, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/BigIntegerValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.math.BigInteger; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class BigIntegerValidator<T> extends DefaultArguments1Validator<BigInteger, T> { @Override public <T2> BigIntegerValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new BigIntegerValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public BigIntegerValidator(Validator<Arguments1<BigInteger>> validator, Function1<? super BigInteger, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/BooleanValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class BooleanValidator<T> extends DefaultArguments1Validator<Boolean, T> { @Override public <T2> BooleanValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new BooleanValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public BooleanValidator(Validator<Arguments1<Boolean>> validator, Function1<? super Boolean, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments10Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function10; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments10Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, X> implements Arguments10Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, X> { protected final Validator<Arguments10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>> validator; protected final Function10<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? extends X> mapper; public DefaultArguments10Validator(Validator<Arguments10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>> validator, Function10<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments10Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Supplier<X>> lazy() { return new DefaultArguments10Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments11Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function11; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments11Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, X> implements Arguments11Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, X> { protected final Validator<Arguments11<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>> validator; protected final Function11<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? extends X> mapper; public DefaultArguments11Validator(Validator<Arguments11<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>> validator, Function11<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments11Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Supplier<X>> lazy() { return new DefaultArguments11Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments12Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function12; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments12Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, X> implements Arguments12Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, X> { protected final Validator<Arguments12<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>> validator; protected final Function12<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? extends X> mapper; public DefaultArguments12Validator( Validator<Arguments12<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>> validator, Function12<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments12Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Supplier<X>> lazy() { return new DefaultArguments12Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments13Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function13; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments13Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, X> implements Arguments13Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, X> { protected final Validator<Arguments13<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>> validator; protected final Function13<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? extends X> mapper; public DefaultArguments13Validator( Validator<Arguments13<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>> validator, Function13<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments13Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Supplier<X>> lazy() { return new DefaultArguments13Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments14Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function14; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments14Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, X> implements Arguments14Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, X> { protected final Validator<Arguments14<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>> validator; protected final Function14<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? extends X> mapper; public DefaultArguments14Validator( Validator<Arguments14<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>> validator, Function14<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments14Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Supplier<X>> lazy() { return new DefaultArguments14Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments15Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function15; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> implements Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> { protected final Validator<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>> validator; protected final Function15<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? extends X> mapper; public DefaultArguments15Validator( Validator<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>> validator, Function15<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Supplier<X>> lazy() { return new DefaultArguments15Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments16Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function16; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> implements Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> { protected final Validator<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>> validator; protected final Function16<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? super A16, ? extends X> mapper; public DefaultArguments16Validator( Validator<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>> validator, Function16<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? super A16, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Supplier<X>> lazy() { return new DefaultArguments16Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, @Nullable A10 a10, @Nullable A11 a11, @Nullable A12 a12, @Nullable A13 a13, @Nullable A14 a14, @Nullable A15 a15, @Nullable A16 a16, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments1Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments1Validator<A1, X> implements Arguments1Validator<A1, X> { protected final Validator<Arguments1<A1>> validator; protected final Function1<? super A1, ? extends X> mapper; public DefaultArguments1Validator(Validator<Arguments1<A1>> validator, Function1<? super A1, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments1Validator<A1, Supplier<X>> lazy() { return new DefaultArguments1Validator<>(this.validator, (a1) -> () -> this.mapper.apply(a1)); } @Override public Validated<X> validate(@Nullable A1 a1, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments2Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function2; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments2Validator<A1, A2, X> implements Arguments2Validator<A1, A2, X> { protected final Validator<Arguments2<A1, A2>> validator; protected final Function2<? super A1, ? super A2, ? extends X> mapper; public DefaultArguments2Validator(Validator<Arguments2<A1, A2>> validator, Function2<? super A1, ? super A2, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments2Validator<A1, A2, Supplier<X>> lazy() { return new DefaultArguments2Validator<>(this.validator, (a1, a2) -> () -> this.mapper.apply(a1, a2)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments3Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function3; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments3Validator<A1, A2, A3, X> implements Arguments3Validator<A1, A2, A3, X> { protected final Validator<Arguments3<A1, A2, A3>> validator; protected final Function3<? super A1, ? super A2, ? super A3, ? extends X> mapper; public DefaultArguments3Validator(Validator<Arguments3<A1, A2, A3>> validator, Function3<? super A1, ? super A2, ? super A3, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments3Validator<A1, A2, A3, Supplier<X>> lazy() { return new DefaultArguments3Validator<>(this.validator, (a1, a2, a3) -> () -> this.mapper.apply(a1, a2, a3)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments4Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function4; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments4Validator<A1, A2, A3, A4, X> implements Arguments4Validator<A1, A2, A3, A4, X> { protected final Validator<Arguments4<A1, A2, A3, A4>> validator; protected final Function4<? super A1, ? super A2, ? super A3, ? super A4, ? extends X> mapper; public DefaultArguments4Validator(Validator<Arguments4<A1, A2, A3, A4>> validator, Function4<? super A1, ? super A2, ? super A3, ? super A4, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments4Validator<A1, A2, A3, A4, Supplier<X>> lazy() { return new DefaultArguments4Validator<>(this.validator, (a1, a2, a3, a4) -> () -> this.mapper.apply(a1, a2, a3, a4)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments5Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function5; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments5Validator<A1, A2, A3, A4, A5, X> implements Arguments5Validator<A1, A2, A3, A4, A5, X> { protected final Validator<Arguments5<A1, A2, A3, A4, A5>> validator; protected final Function5<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? extends X> mapper; public DefaultArguments5Validator(Validator<Arguments5<A1, A2, A3, A4, A5>> validator, Function5<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments5Validator<A1, A2, A3, A4, A5, Supplier<X>> lazy() { return new DefaultArguments5Validator<>(this.validator, (a1, a2, a3, a4, a5) -> () -> this.mapper.apply(a1, a2, a3, a4, a5)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments6Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function6; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments6Validator<A1, A2, A3, A4, A5, A6, X> implements Arguments6Validator<A1, A2, A3, A4, A5, A6, X> { protected final Validator<Arguments6<A1, A2, A3, A4, A5, A6>> validator; protected final Function6<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? extends X> mapper; public DefaultArguments6Validator(Validator<Arguments6<A1, A2, A3, A4, A5, A6>> validator, Function6<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments6Validator<A1, A2, A3, A4, A5, A6, Supplier<X>> lazy() { return new DefaultArguments6Validator<>(this.validator, (a1, a2, a3, a4, a5, a6) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments7Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function7; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments7Validator<A1, A2, A3, A4, A5, A6, A7, X> implements Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X> { protected final Validator<Arguments7<A1, A2, A3, A4, A5, A6, A7>> validator; protected final Function7<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? extends X> mapper; public DefaultArguments7Validator(Validator<Arguments7<A1, A2, A3, A4, A5, A6, A7>> validator, Function7<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments7Validator<A1, A2, A3, A4, A5, A6, A7, Supplier<X>> lazy() { return new DefaultArguments7Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments8Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function8; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X> implements Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X> { protected final Validator<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>> validator; protected final Function8<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? extends X> mapper; public DefaultArguments8Validator(Validator<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>> validator, Function8<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, Supplier<X>> lazy() { return new DefaultArguments8Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DefaultArguments9Validator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.Locale; import java.util.function.Supplier; import am.ik.yavi.core.ConstraintContext; import am.ik.yavi.core.Validated; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function9; import am.ik.yavi.jsr305.Nullable; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.7.0 */ public class DefaultArguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> implements Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> { protected final Validator<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>> validator; protected final Function9<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? extends X> mapper; public DefaultArguments9Validator(Validator<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>> validator, Function9<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? extends X> mapper) { this.validator = validator; this.mapper = mapper; } /** * @since 0.10.0 */ @Override public DefaultArguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, Supplier<X>> lazy() { return new DefaultArguments9Validator<>(this.validator, (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> () -> this.mapper.apply(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } @Override public Validated<X> validate(@Nullable A1 a1, @Nullable A2 a2, @Nullable A3 a3, @Nullable A4 a4, @Nullable A5 a5, @Nullable A6 a6, @Nullable A7 a7, @Nullable A8 a8, @Nullable A9 a9, Locale locale, ConstraintContext constraintContext) { return this.validator.applicative() .validate(Arguments.of(a1, a2, a3, a4, a5, a6, a7, a8, a9), locale, constraintContext) .map(values -> values.map(this.mapper)); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/DoubleValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class DoubleValidator<T> extends DefaultArguments1Validator<Double, T> { @Override public <T2> DoubleValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new DoubleValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public DoubleValidator(Validator<Arguments1<Double>> validator, Function1<? super Double, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/EnumValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.14.0 */ public class EnumValidator<E extends Enum<E>, T> extends DefaultArguments1Validator<E, T> { @Override public <T2> EnumValidator<E, T2> andThen(Function<? super T, ? extends T2> mapper) { return new EnumValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public EnumValidator(Validator<Arguments1<E>> validator, Function1<? super E, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/FloatValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class FloatValidator<T> extends DefaultArguments1Validator<Float, T> { @Override public <T2> FloatValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new FloatValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public FloatValidator(Validator<Arguments1<Float>> validator, Function1<? super Float, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/InstantValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.time.Instant; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.10.0 */ public class InstantValidator<T> extends DefaultArguments1Validator<Instant, T> { @Override public <T2> InstantValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new InstantValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public InstantValidator(Validator<Arguments1<Instant>> validator, Function1<? super Instant, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/IntegerValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class IntegerValidator<T> extends DefaultArguments1Validator<Integer, T> { @Override public <T2> IntegerValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new IntegerValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public IntegerValidator(Validator<Arguments1<Integer>> validator, Function1<? super Integer, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/LocalDateTimeValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; import java.time.LocalDateTime; import java.util.function.Function; /** * @since 0.10.0 */ public class LocalDateTimeValidator<T> extends DefaultArguments1Validator<LocalDateTime, T> { @Override public <T2> LocalDateTimeValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new LocalDateTimeValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public LocalDateTimeValidator(Validator<Arguments1<LocalDateTime>> validator, Function1<? super LocalDateTime, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/LocalDateValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; import java.time.LocalDate; import java.util.function.Function; /** * @since 0.10.0 */ public class LocalDateValidator<T> extends DefaultArguments1Validator<LocalDate, T> { @Override public <T2> LocalDateValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new LocalDateValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public LocalDateValidator(Validator<Arguments1<LocalDate>> validator, Function1<? super LocalDate, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/LocalTimeValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; import java.time.LocalTime; import java.util.function.Function; /** * @since 0.10.0 */ public class LocalTimeValidator<T> extends DefaultArguments1Validator<LocalTime, T> { @Override public <T2> LocalTimeValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new LocalTimeValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public LocalTimeValidator(Validator<Arguments1<LocalTime>> validator, Function1<? super LocalTime, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/LongValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class LongValidator<T> extends DefaultArguments1Validator<Long, T> { @Override public <T2> LongValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new LongValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public LongValidator(Validator<Arguments1<Long>> validator, Function1<? super Long, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/ObjectValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.8.0 */ public class ObjectValidator<X, T> extends DefaultArguments1Validator<X, T> { @Override public <T2> ObjectValidator<X, T2> andThen(Function<? super T, ? extends T2> mapper) { return new ObjectValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public ObjectValidator(Validator<Arguments1<X>> validator, Function1<? super X, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/OffsetDateTimeValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.time.OffsetDateTime; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.10.0 */ public class OffsetDateTimeValidator<T> extends DefaultArguments1Validator<OffsetDateTime, T> { @Override public <T2> OffsetDateTimeValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new OffsetDateTimeValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public OffsetDateTimeValidator(Validator<Arguments1<OffsetDateTime>> validator, Function1<? super OffsetDateTime, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/ShortValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class ShortValidator<T> extends DefaultArguments1Validator<Short, T> { @Override public <T2> ShortValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new ShortValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public ShortValidator(Validator<Arguments1<Short>> validator, Function1<? super Short, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/StringValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.7.0 */ public class StringValidator<T> extends DefaultArguments1Validator<String, T> { @Override public <T2> StringValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new StringValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public StringValidator(Validator<Arguments1<String>> validator, Function1<? super String, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/YearMonthValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.time.YearMonth; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.11.0 */ public class YearMonthValidator<T> extends DefaultArguments1Validator<YearMonth, T> { @Override public <T2> YearMonthValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new YearMonthValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public YearMonthValidator(Validator<Arguments1<YearMonth>> validator, Function1<? super YearMonth, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/YearValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import java.time.Year; import java.util.function.Function; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; /** * @since 0.11.0 */ public class YearValidator<T> extends DefaultArguments1Validator<Year, T> { @Override public <T2> YearValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new YearValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public YearValidator(Validator<Arguments1<Year>> validator, Function1<? super Year, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/ZonedDateTimeValidator.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.arguments; import am.ik.yavi.core.Validator; import am.ik.yavi.fn.Function1; import java.time.ZonedDateTime; import java.util.function.Function; /** * @since 0.10.0 */ public class ZonedDateTimeValidator<T> extends DefaultArguments1Validator<ZonedDateTime, T> { @Override public <T2> ZonedDateTimeValidator<T2> andThen(Function<? super T, ? extends T2> mapper) { return new ZonedDateTimeValidator<>(super.validator, s -> mapper.apply(super.mapper.apply(s))); } public ZonedDateTimeValidator(Validator<Arguments1<ZonedDateTime>> validator, Function1<? super ZonedDateTime, ? extends T> mapper) { super(validator, mapper); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/arguments/package-info.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ @NonNullApi package am.ik.yavi.arguments; import am.ik.yavi.jsr305.NonNullApi;
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments10ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments10Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function10; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; final ValueValidator<A9, R9> v9; final ValueValidator<A10, R10> v10; public Arguments10ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8, ValueValidator<A9, R9> v9, ValueValidator<A10, R10> v10) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _double( ValueValidator<Double, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _enum( ValueValidator<E, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public <E extends Enum<E>> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _float( ValueValidator<Float, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _long( ValueValidator<Long, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, T1, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _short( ValueValidator<Short, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _string( ValueValidator<String, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _year( ValueValidator<Year, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments11ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, validator); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments10Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, X> apply( Function10<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? extends X> f) { return ArgumentsValidators .split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments11ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments11Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function11; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; final ValueValidator<A9, R9> v9; final ValueValidator<A10, R10> v10; final ValueValidator<A11, R11> v11; public Arguments11ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8, ValueValidator<A9, R9> v9, ValueValidator<A10, R10> v10, ValueValidator<A11, R11> v11) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _double( ValueValidator<Double, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _enum( ValueValidator<E, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public <E extends Enum<E>> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _float( ValueValidator<Float, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _long( ValueValidator<Long, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, T1, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _short( ValueValidator<Short, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _string( ValueValidator<String, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _year( ValueValidator<Year, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments12ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, validator); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments11Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, X> apply( Function11<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? extends X> f) { return ArgumentsValidators .split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments12ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments12Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function12; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; final ValueValidator<A9, R9> v9; final ValueValidator<A10, R10> v10; final ValueValidator<A11, R11> v11; final ValueValidator<A12, R12> v12; public Arguments12ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8, ValueValidator<A9, R9> v9, ValueValidator<A10, R10> v10, ValueValidator<A11, R11> v11, ValueValidator<A12, R12> v12) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _double( ValueValidator<Double, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _enum( ValueValidator<E, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public <E extends Enum<E>> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _float( ValueValidator<Float, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _long( ValueValidator<Long, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, T1, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _short( ValueValidator<Short, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _string( ValueValidator<String, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _year( ValueValidator<Year, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments13ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, validator); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments12Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, X> apply( Function12<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? extends X> f) { return ArgumentsValidators .split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments13ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments13Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function13; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; final ValueValidator<A9, R9> v9; final ValueValidator<A10, R10> v10; final ValueValidator<A11, R11> v11; final ValueValidator<A12, R12> v12; final ValueValidator<A13, R13> v13; public Arguments13ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8, ValueValidator<A9, R9> v9, ValueValidator<A10, R10> v10, ValueValidator<A11, R11> v11, ValueValidator<A12, R12> v12, ValueValidator<A13, R13> v13) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; this.v13 = v13; } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _double( ValueValidator<Double, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _enum( ValueValidator<E, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public <E extends Enum<E>> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _float( ValueValidator<Float, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _long( ValueValidator<Long, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, T1, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _short( ValueValidator<Short, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _string( ValueValidator<String, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _year( ValueValidator<Year, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments14ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, validator); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments13Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, X> apply( Function13<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? super R13, ? extends X> f) { return ArgumentsValidators .split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments14ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments14Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function14; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; final ValueValidator<A9, R9> v9; final ValueValidator<A10, R10> v10; final ValueValidator<A11, R11> v11; final ValueValidator<A12, R12> v12; final ValueValidator<A13, R13> v13; final ValueValidator<A14, R14> v14; public Arguments14ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8, ValueValidator<A9, R9> v9, ValueValidator<A10, R10> v10, ValueValidator<A11, R11> v11, ValueValidator<A12, R12> v12, ValueValidator<A13, R13> v13, ValueValidator<A14, R14> v14) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; this.v13 = v13; this.v14 = v14; } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _double( ValueValidator<Double, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _enum( ValueValidator<E, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public <E extends Enum<E>> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _float( ValueValidator<Float, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _long( ValueValidator<Long, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, T1, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _short( ValueValidator<Short, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _string( ValueValidator<String, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _year( ValueValidator<Year, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments15ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, validator); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments14Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, X> apply( Function14<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? super R13, ? super R14, ? extends X> f) { return ArgumentsValidators .split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments15ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments15Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function15; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; final ValueValidator<A9, R9> v9; final ValueValidator<A10, R10> v10; final ValueValidator<A11, R11> v11; final ValueValidator<A12, R12> v12; final ValueValidator<A13, R13> v13; final ValueValidator<A14, R14> v14; final ValueValidator<A15, R15> v15; public Arguments15ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8, ValueValidator<A9, R9> v9, ValueValidator<A10, R10> v10, ValueValidator<A11, R11> v11, ValueValidator<A12, R12> v12, ValueValidator<A13, R13> v13, ValueValidator<A14, R14> v14, ValueValidator<A15, R15> v15) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; this.v13 = v13; this.v14 = v14; this.v15 = v15; } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _double( ValueValidator<Double, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _enum( ValueValidator<E, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public <E extends Enum<E>> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _float( ValueValidator<Float, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _long( ValueValidator<Long, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, T1, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _short( ValueValidator<Short, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _string( ValueValidator<String, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _year( ValueValidator<Year, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments16ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, validator); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> apply( Function15<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? super R13, ? super R14, ? super R15, ? extends X> f) { return ArgumentsValidators .split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments16ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments16Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function16; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; final ValueValidator<A9, R9> v9; final ValueValidator<A10, R10> v10; final ValueValidator<A11, R11> v11; final ValueValidator<A12, R12> v12; final ValueValidator<A13, R13> v13; final ValueValidator<A14, R14> v14; final ValueValidator<A15, R15> v15; final ValueValidator<A16, R16> v16; public Arguments16ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8, ValueValidator<A9, R9> v9, ValueValidator<A10, R10> v10, ValueValidator<A11, R11> v11, ValueValidator<A12, R12> v12, ValueValidator<A13, R13> v13, ValueValidator<A14, R14> v14, ValueValidator<A15, R15> v15, ValueValidator<A16, R16> v16) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; this.v10 = v10; this.v11 = v11; this.v12 = v12; this.v13 = v13; this.v14 = v14; this.v15 = v15; this.v16 = v16; } public <X> Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> apply( Function16<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? super R10, ? super R11, ? super R12, ? super R13, ? super R14, ? super R15, ? super R16, ? extends X> f) { return ArgumentsValidators .split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, this.v10, this.v11, this.v12, this.v13, this.v14, this.v15, this.v16) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments1ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.Arguments1Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function1; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments1ValidatorBuilder<A1, R1> { final ValueValidator<A1, R1> v1; public Arguments1ValidatorBuilder(ValueValidator<A1, R1> v1) { this.v1 = v1; } public <T> Arguments2ValidatorBuilder<A1, BigDecimal, R1, T> _bigDecimal(ValueValidator<BigDecimal, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, BigDecimal, R1, BigDecimal> _bigDecimal(String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, BigDecimal, R1, BigDecimal> _bigDecimal(String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, BigInteger, R1, T> _bigInteger(ValueValidator<BigInteger, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, BigInteger, R1, BigInteger> _bigInteger(String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, BigInteger, R1, BigInteger> _bigInteger(String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, Boolean, R1, T> _boolean(ValueValidator<Boolean, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, Boolean, R1, Boolean> _boolean(String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, Boolean, R1, Boolean> _boolean(String name) { return this._boolean(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, Double, R1, T> _double(ValueValidator<Double, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, Double, R1, Double> _double(String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, Double, R1, Double> _double(String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments2ValidatorBuilder<A1, E, R1, T> _enum(ValueValidator<E, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public <E extends Enum<E>> Arguments2ValidatorBuilder<A1, E, R1, E> _enum(String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments2ValidatorBuilder<A1, E, R1, E> _enum(String name) { return this._enum(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, Float, R1, T> _float(ValueValidator<Float, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, Float, R1, Float> _float(String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, Float, R1, Float> _float(String name) { return this._float(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, Instant, R1, T> _instant(ValueValidator<Instant, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, Instant, R1, Instant> _instant(String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, Instant, R1, Instant> _instant(String name) { return this._instant(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, Integer, R1, T> _integer(ValueValidator<Integer, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, Integer, R1, Integer> _integer(String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, Integer, R1, Integer> _integer(String name) { return this._integer(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, LocalDateTime, R1, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, LocalDateTime, R1, LocalDateTime> _localDateTime(String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, LocalDateTime, R1, LocalDateTime> _localDateTime(String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, LocalTime, R1, T> _localTime(ValueValidator<LocalTime, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, LocalTime, R1, LocalTime> _localTime(String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, LocalTime, R1, LocalTime> _localTime(String name) { return this._localTime(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, LocalDate, R1, T> _localDate(ValueValidator<LocalDate, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, LocalDate, R1, LocalDate> _localDate(String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, LocalDate, R1, LocalDate> _localDate(String name) { return this._localDate(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, Long, R1, T> _long(ValueValidator<Long, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, Long, R1, Long> _long(String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, Long, R1, Long> _long(String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments2ValidatorBuilder<A1, T1, R1, T2> _object(ValueValidator<T1, T2> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public <T> Arguments2ValidatorBuilder<A1, T, R1, T> _object(String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments2ValidatorBuilder<A1, T, R1, T> _object(String name) { return this._object(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, OffsetDateTime, R1, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, OffsetDateTime, R1, OffsetDateTime> _offsetDateTime(String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, OffsetDateTime, R1, OffsetDateTime> _offsetDateTime(String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, Short, R1, T> _short(ValueValidator<Short, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, Short, R1, Short> _short(String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, Short, R1, Short> _short(String name) { return this._short(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, String, R1, T> _string(ValueValidator<String, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, String, R1, String> _string(String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, String, R1, String> _string(String name) { return this._string(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, YearMonth, R1, T> _yearMonth(ValueValidator<YearMonth, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, YearMonth, R1, YearMonth> _yearMonth(String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, YearMonth, R1, YearMonth> _yearMonth(String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, Year, R1, T> _year(ValueValidator<Year, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, Year, R1, Year> _year(String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, Year, R1, Year> _year(String name) { return this._year(name, Function.identity()); } public <T> Arguments2ValidatorBuilder<A1, ZonedDateTime, R1, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments2ValidatorBuilder<>(this.v1, validator); } public Arguments2ValidatorBuilder<A1, ZonedDateTime, R1, ZonedDateTime> _zonedDateTime(String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments2ValidatorBuilder<A1, ZonedDateTime, R1, ZonedDateTime> _zonedDateTime(String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments1Validator<A1, X> apply(Function1<? super R1, ? extends X> f) { return Arguments1Validator.from(this.v1.andThen(f::apply)); } public Arguments1Validator<A1, R1> get() { return Arguments1Validator.from(this.v1); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments2ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments2Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function2; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments2ValidatorBuilder<A1, A2, R1, R2> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; public Arguments2ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2) { this.v1 = v1; this.v2 = v2; } public <T> Arguments3ValidatorBuilder<A1, A2, BigDecimal, R1, R2, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, BigDecimal, R1, R2, BigDecimal> _bigDecimal(String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, BigDecimal, R1, R2, BigDecimal> _bigDecimal(String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, BigInteger, R1, R2, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, BigInteger, R1, R2, BigInteger> _bigInteger(String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, BigInteger, R1, R2, BigInteger> _bigInteger(String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, Boolean, R1, R2, T> _boolean(ValueValidator<Boolean, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, Boolean, R1, R2, Boolean> _boolean(String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, Boolean, R1, R2, Boolean> _boolean(String name) { return this._boolean(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, Double, R1, R2, T> _double(ValueValidator<Double, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, Double, R1, R2, Double> _double(String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, Double, R1, R2, Double> _double(String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments3ValidatorBuilder<A1, A2, E, R1, R2, T> _enum( ValueValidator<E, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public <E extends Enum<E>> Arguments3ValidatorBuilder<A1, A2, E, R1, R2, E> _enum(String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments3ValidatorBuilder<A1, A2, E, R1, R2, E> _enum(String name) { return this._enum(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, Float, R1, R2, T> _float(ValueValidator<Float, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, Float, R1, R2, Float> _float(String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, Float, R1, R2, Float> _float(String name) { return this._float(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, Instant, R1, R2, T> _instant(ValueValidator<Instant, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, Instant, R1, R2, Instant> _instant(String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, Instant, R1, R2, Instant> _instant(String name) { return this._instant(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, Integer, R1, R2, T> _integer(ValueValidator<Integer, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, Integer, R1, R2, Integer> _integer(String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, Integer, R1, R2, Integer> _integer(String name) { return this._integer(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, LocalDateTime, R1, R2, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, LocalDateTime, R1, R2, LocalDateTime> _localDateTime(String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, LocalDateTime, R1, R2, LocalDateTime> _localDateTime(String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, LocalTime, R1, R2, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, LocalTime, R1, R2, LocalTime> _localTime(String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, LocalTime, R1, R2, LocalTime> _localTime(String name) { return this._localTime(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, LocalDate, R1, R2, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, LocalDate, R1, R2, LocalDate> _localDate(String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, LocalDate, R1, R2, LocalDate> _localDate(String name) { return this._localDate(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, Long, R1, R2, T> _long(ValueValidator<Long, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, Long, R1, R2, Long> _long(String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, Long, R1, R2, Long> _long(String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments3ValidatorBuilder<A1, A2, T1, R1, R2, T2> _object(ValueValidator<T1, T2> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public <T> Arguments3ValidatorBuilder<A1, A2, T, R1, R2, T> _object(String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments3ValidatorBuilder<A1, A2, T, R1, R2, T> _object(String name) { return this._object(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, OffsetDateTime, R1, R2, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, OffsetDateTime, R1, R2, OffsetDateTime> _offsetDateTime(String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, OffsetDateTime, R1, R2, OffsetDateTime> _offsetDateTime(String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, Short, R1, R2, T> _short(ValueValidator<Short, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, Short, R1, R2, Short> _short(String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, Short, R1, R2, Short> _short(String name) { return this._short(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, String, R1, R2, T> _string(ValueValidator<String, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, String, R1, R2, String> _string(String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, String, R1, R2, String> _string(String name) { return this._string(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, YearMonth, R1, R2, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, YearMonth, R1, R2, YearMonth> _yearMonth(String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, YearMonth, R1, R2, YearMonth> _yearMonth(String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, Year, R1, R2, T> _year(ValueValidator<Year, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, Year, R1, R2, Year> _year(String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, Year, R1, R2, Year> _year(String name) { return this._year(name, Function.identity()); } public <T> Arguments3ValidatorBuilder<A1, A2, ZonedDateTime, R1, R2, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments3ValidatorBuilder<>(this.v1, this.v2, validator); } public Arguments3ValidatorBuilder<A1, A2, ZonedDateTime, R1, R2, ZonedDateTime> _zonedDateTime(String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments3ValidatorBuilder<A1, A2, ZonedDateTime, R1, R2, ZonedDateTime> _zonedDateTime(String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments2Validator<A1, A2, X> apply(Function2<? super R1, ? super R2, ? extends X> f) { return ArgumentsValidators.split(this.v1, this.v2).apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments3ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments3Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function3; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments3ValidatorBuilder<A1, A2, A3, R1, R2, R3> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; public Arguments3ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3) { this.v1 = v1; this.v2 = v2; this.v3 = v3; } public <T> Arguments4ValidatorBuilder<A1, A2, A3, BigDecimal, R1, R2, R3, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, BigDecimal, R1, R2, R3, BigDecimal> _bigDecimal(String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, BigDecimal, R1, R2, R3, BigDecimal> _bigDecimal(String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, BigInteger, R1, R2, R3, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, BigInteger, R1, R2, R3, BigInteger> _bigInteger(String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, BigInteger, R1, R2, R3, BigInteger> _bigInteger(String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, Boolean, R1, R2, R3, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, Boolean, R1, R2, R3, Boolean> _boolean(String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, Boolean, R1, R2, R3, Boolean> _boolean(String name) { return this._boolean(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, Double, R1, R2, R3, T> _double( ValueValidator<Double, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, Double, R1, R2, R3, Double> _double(String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, Double, R1, R2, R3, Double> _double(String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments4ValidatorBuilder<A1, A2, A3, E, R1, R2, R3, T> _enum( ValueValidator<E, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public <E extends Enum<E>> Arguments4ValidatorBuilder<A1, A2, A3, E, R1, R2, R3, E> _enum(String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments4ValidatorBuilder<A1, A2, A3, E, R1, R2, R3, E> _enum(String name) { return this._enum(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, Float, R1, R2, R3, T> _float(ValueValidator<Float, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, Float, R1, R2, R3, Float> _float(String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, Float, R1, R2, R3, Float> _float(String name) { return this._float(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, Instant, R1, R2, R3, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, Instant, R1, R2, R3, Instant> _instant(String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, Instant, R1, R2, R3, Instant> _instant(String name) { return this._instant(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, Integer, R1, R2, R3, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, Integer, R1, R2, R3, Integer> _integer(String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, Integer, R1, R2, R3, Integer> _integer(String name) { return this._integer(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, LocalDateTime, R1, R2, R3, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, LocalDateTime, R1, R2, R3, LocalDateTime> _localDateTime(String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, LocalDateTime, R1, R2, R3, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, LocalTime, R1, R2, R3, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, LocalTime, R1, R2, R3, LocalTime> _localTime(String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, LocalTime, R1, R2, R3, LocalTime> _localTime(String name) { return this._localTime(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, LocalDate, R1, R2, R3, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, LocalDate, R1, R2, R3, LocalDate> _localDate(String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, LocalDate, R1, R2, R3, LocalDate> _localDate(String name) { return this._localDate(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, Long, R1, R2, R3, T> _long(ValueValidator<Long, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, Long, R1, R2, R3, Long> _long(String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, Long, R1, R2, R3, Long> _long(String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments4ValidatorBuilder<A1, A2, A3, T1, R1, R2, R3, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, T, R1, R2, R3, T> _object(String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, T, R1, R2, R3, T> _object(String name) { return this._object(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, OffsetDateTime, R1, R2, R3, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, OffsetDateTime, R1, R2, R3, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, OffsetDateTime, R1, R2, R3, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, Short, R1, R2, R3, T> _short(ValueValidator<Short, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, Short, R1, R2, R3, Short> _short(String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, Short, R1, R2, R3, Short> _short(String name) { return this._short(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, String, R1, R2, R3, T> _string( ValueValidator<String, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, String, R1, R2, R3, String> _string(String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, String, R1, R2, R3, String> _string(String name) { return this._string(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, YearMonth, R1, R2, R3, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, YearMonth, R1, R2, R3, YearMonth> _yearMonth(String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, YearMonth, R1, R2, R3, YearMonth> _yearMonth(String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, Year, R1, R2, R3, T> _year(ValueValidator<Year, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, Year, R1, R2, R3, Year> _year(String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, Year, R1, R2, R3, Year> _year(String name) { return this._year(name, Function.identity()); } public <T> Arguments4ValidatorBuilder<A1, A2, A3, ZonedDateTime, R1, R2, R3, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments4ValidatorBuilder<>(this.v1, this.v2, this.v3, validator); } public Arguments4ValidatorBuilder<A1, A2, A3, ZonedDateTime, R1, R2, R3, ZonedDateTime> _zonedDateTime(String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments4ValidatorBuilder<A1, A2, A3, ZonedDateTime, R1, R2, R3, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments3Validator<A1, A2, A3, X> apply(Function3<? super R1, ? super R2, ? super R3, ? extends X> f) { return ArgumentsValidators.split(this.v1, this.v2, this.v3).apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments4ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments4Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function4; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments4ValidatorBuilder<A1, A2, A3, A4, R1, R2, R3, R4> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; public Arguments4ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, BigDecimal, R1, R2, R3, R4, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, BigDecimal, R1, R2, R3, R4, BigDecimal> _bigDecimal(String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, BigDecimal, R1, R2, R3, R4, BigDecimal> _bigDecimal(String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, BigInteger, R1, R2, R3, R4, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, BigInteger, R1, R2, R3, R4, BigInteger> _bigInteger(String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, BigInteger, R1, R2, R3, R4, BigInteger> _bigInteger(String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, Boolean, R1, R2, R3, R4, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Boolean, R1, R2, R3, R4, Boolean> _boolean(String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Boolean, R1, R2, R3, R4, Boolean> _boolean(String name) { return this._boolean(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, Double, R1, R2, R3, R4, T> _double( ValueValidator<Double, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Double, R1, R2, R3, R4, Double> _double(String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Double, R1, R2, R3, R4, Double> _double(String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments5ValidatorBuilder<A1, A2, A3, A4, E, R1, R2, R3, R4, T> _enum( ValueValidator<E, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public <E extends Enum<E>> Arguments5ValidatorBuilder<A1, A2, A3, A4, E, R1, R2, R3, R4, E> _enum(String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments5ValidatorBuilder<A1, A2, A3, A4, E, R1, R2, R3, R4, E> _enum(String name) { return this._enum(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, Float, R1, R2, R3, R4, T> _float( ValueValidator<Float, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Float, R1, R2, R3, R4, Float> _float(String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Float, R1, R2, R3, R4, Float> _float(String name) { return this._float(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, Instant, R1, R2, R3, R4, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Instant, R1, R2, R3, R4, Instant> _instant(String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Instant, R1, R2, R3, R4, Instant> _instant(String name) { return this._instant(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, Integer, R1, R2, R3, R4, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Integer, R1, R2, R3, R4, Integer> _integer(String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Integer, R1, R2, R3, R4, Integer> _integer(String name) { return this._integer(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalDateTime, R1, R2, R3, R4, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalDateTime, R1, R2, R3, R4, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalDateTime, R1, R2, R3, R4, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalTime, R1, R2, R3, R4, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalTime, R1, R2, R3, R4, LocalTime> _localTime(String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalTime, R1, R2, R3, R4, LocalTime> _localTime(String name) { return this._localTime(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalDate, R1, R2, R3, R4, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalDate, R1, R2, R3, R4, LocalDate> _localDate(String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, LocalDate, R1, R2, R3, R4, LocalDate> _localDate(String name) { return this._localDate(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, Long, R1, R2, R3, R4, T> _long( ValueValidator<Long, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Long, R1, R2, R3, R4, Long> _long(String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Long, R1, R2, R3, R4, Long> _long(String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments5ValidatorBuilder<A1, A2, A3, A4, T1, R1, R2, R3, R4, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, T, R1, R2, R3, R4, T> _object(String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, T, R1, R2, R3, R4, T> _object(String name) { return this._object(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, OffsetDateTime, R1, R2, R3, R4, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, OffsetDateTime, R1, R2, R3, R4, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, OffsetDateTime, R1, R2, R3, R4, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, Short, R1, R2, R3, R4, T> _short( ValueValidator<Short, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Short, R1, R2, R3, R4, Short> _short(String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Short, R1, R2, R3, R4, Short> _short(String name) { return this._short(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, String, R1, R2, R3, R4, T> _string( ValueValidator<String, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, String, R1, R2, R3, R4, String> _string(String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, String, R1, R2, R3, R4, String> _string(String name) { return this._string(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, YearMonth, R1, R2, R3, R4, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, YearMonth, R1, R2, R3, R4, YearMonth> _yearMonth(String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, YearMonth, R1, R2, R3, R4, YearMonth> _yearMonth(String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, Year, R1, R2, R3, R4, T> _year( ValueValidator<Year, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Year, R1, R2, R3, R4, Year> _year(String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, Year, R1, R2, R3, R4, Year> _year(String name) { return this._year(name, Function.identity()); } public <T> Arguments5ValidatorBuilder<A1, A2, A3, A4, ZonedDateTime, R1, R2, R3, R4, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments5ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, validator); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, ZonedDateTime, R1, R2, R3, R4, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, ZonedDateTime, R1, R2, R3, R4, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments4Validator<A1, A2, A3, A4, X> apply( Function4<? super R1, ? super R2, ? super R3, ? super R4, ? extends X> f) { return ArgumentsValidators.split(this.v1, this.v2, this.v3, this.v4).apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments5ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments5Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function5; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments5ValidatorBuilder<A1, A2, A3, A4, A5, R1, R2, R3, R4, R5> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; public Arguments5ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, BigDecimal, R1, R2, R3, R4, R5, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, BigDecimal, R1, R2, R3, R4, R5, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, BigDecimal, R1, R2, R3, R4, R5, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, BigInteger, R1, R2, R3, R4, R5, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, BigInteger, R1, R2, R3, R4, R5, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, BigInteger, R1, R2, R3, R4, R5, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Boolean, R1, R2, R3, R4, R5, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Boolean, R1, R2, R3, R4, R5, Boolean> _boolean(String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Boolean, R1, R2, R3, R4, R5, Boolean> _boolean(String name) { return this._boolean(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Double, R1, R2, R3, R4, R5, T> _double( ValueValidator<Double, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Double, R1, R2, R3, R4, R5, Double> _double(String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Double, R1, R2, R3, R4, R5, Double> _double(String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, E, R1, R2, R3, R4, R5, T> _enum( ValueValidator<E, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public <E extends Enum<E>> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, E, R1, R2, R3, R4, R5, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, E, R1, R2, R3, R4, R5, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Float, R1, R2, R3, R4, R5, T> _float( ValueValidator<Float, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Float, R1, R2, R3, R4, R5, Float> _float(String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Float, R1, R2, R3, R4, R5, Float> _float(String name) { return this._float(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Instant, R1, R2, R3, R4, R5, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Instant, R1, R2, R3, R4, R5, Instant> _instant(String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Instant, R1, R2, R3, R4, R5, Instant> _instant(String name) { return this._instant(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Integer, R1, R2, R3, R4, R5, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Integer, R1, R2, R3, R4, R5, Integer> _integer(String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Integer, R1, R2, R3, R4, R5, Integer> _integer(String name) { return this._integer(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalDateTime, R1, R2, R3, R4, R5, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalDateTime, R1, R2, R3, R4, R5, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalDateTime, R1, R2, R3, R4, R5, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalTime, R1, R2, R3, R4, R5, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalTime, R1, R2, R3, R4, R5, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalTime, R1, R2, R3, R4, R5, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalDate, R1, R2, R3, R4, R5, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalDate, R1, R2, R3, R4, R5, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, LocalDate, R1, R2, R3, R4, R5, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Long, R1, R2, R3, R4, R5, T> _long( ValueValidator<Long, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Long, R1, R2, R3, R4, R5, Long> _long(String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Long, R1, R2, R3, R4, R5, Long> _long(String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, T1, R1, R2, R3, R4, R5, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, T, R1, R2, R3, R4, R5, T> _object(String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, T, R1, R2, R3, R4, R5, T> _object(String name) { return this._object(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, OffsetDateTime, R1, R2, R3, R4, R5, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, OffsetDateTime, R1, R2, R3, R4, R5, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, OffsetDateTime, R1, R2, R3, R4, R5, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Short, R1, R2, R3, R4, R5, T> _short( ValueValidator<Short, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Short, R1, R2, R3, R4, R5, Short> _short(String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Short, R1, R2, R3, R4, R5, Short> _short(String name) { return this._short(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, String, R1, R2, R3, R4, R5, T> _string( ValueValidator<String, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, String, R1, R2, R3, R4, R5, String> _string(String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, String, R1, R2, R3, R4, R5, String> _string(String name) { return this._string(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, YearMonth, R1, R2, R3, R4, R5, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, YearMonth, R1, R2, R3, R4, R5, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, YearMonth, R1, R2, R3, R4, R5, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Year, R1, R2, R3, R4, R5, T> _year( ValueValidator<Year, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Year, R1, R2, R3, R4, R5, Year> _year(String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, Year, R1, R2, R3, R4, R5, Year> _year(String name) { return this._year(name, Function.identity()); } public <T> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, ZonedDateTime, R1, R2, R3, R4, R5, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments6ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, validator); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, ZonedDateTime, R1, R2, R3, R4, R5, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, ZonedDateTime, R1, R2, R3, R4, R5, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments5Validator<A1, A2, A3, A4, A5, X> apply( Function5<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? extends X> f) { return ArgumentsValidators.split(this.v1, this.v2, this.v3, this.v4, this.v5).apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments6ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments6Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function6; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, A6, R1, R2, R3, R4, R5, R6> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; public Arguments6ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, BigDecimal, R1, R2, R3, R4, R5, R6, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, BigDecimal, R1, R2, R3, R4, R5, R6, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, BigDecimal, R1, R2, R3, R4, R5, R6, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, BigInteger, R1, R2, R3, R4, R5, R6, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, BigInteger, R1, R2, R3, R4, R5, R6, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, BigInteger, R1, R2, R3, R4, R5, R6, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Boolean, R1, R2, R3, R4, R5, R6, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Boolean, R1, R2, R3, R4, R5, R6, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Boolean, R1, R2, R3, R4, R5, R6, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Double, R1, R2, R3, R4, R5, R6, T> _double( ValueValidator<Double, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Double, R1, R2, R3, R4, R5, R6, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Double, R1, R2, R3, R4, R5, R6, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, E, R1, R2, R3, R4, R5, R6, T> _enum( ValueValidator<E, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public <E extends Enum<E>> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, E, R1, R2, R3, R4, R5, R6, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, E, R1, R2, R3, R4, R5, R6, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Float, R1, R2, R3, R4, R5, R6, T> _float( ValueValidator<Float, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Float, R1, R2, R3, R4, R5, R6, Float> _float(String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Float, R1, R2, R3, R4, R5, R6, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Instant, R1, R2, R3, R4, R5, R6, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Instant, R1, R2, R3, R4, R5, R6, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Instant, R1, R2, R3, R4, R5, R6, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Integer, R1, R2, R3, R4, R5, R6, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Integer, R1, R2, R3, R4, R5, R6, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Integer, R1, R2, R3, R4, R5, R6, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalDateTime, R1, R2, R3, R4, R5, R6, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalDateTime, R1, R2, R3, R4, R5, R6, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalDateTime, R1, R2, R3, R4, R5, R6, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalTime, R1, R2, R3, R4, R5, R6, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalTime, R1, R2, R3, R4, R5, R6, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalTime, R1, R2, R3, R4, R5, R6, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalDate, R1, R2, R3, R4, R5, R6, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalDate, R1, R2, R3, R4, R5, R6, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, LocalDate, R1, R2, R3, R4, R5, R6, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Long, R1, R2, R3, R4, R5, R6, T> _long( ValueValidator<Long, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Long, R1, R2, R3, R4, R5, R6, Long> _long(String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Long, R1, R2, R3, R4, R5, R6, Long> _long(String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, T1, R1, R2, R3, R4, R5, R6, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, T, R1, R2, R3, R4, R5, R6, T> _object(String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, T, R1, R2, R3, R4, R5, R6, T> _object(String name) { return this._object(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, OffsetDateTime, R1, R2, R3, R4, R5, R6, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, OffsetDateTime, R1, R2, R3, R4, R5, R6, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, OffsetDateTime, R1, R2, R3, R4, R5, R6, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Short, R1, R2, R3, R4, R5, R6, T> _short( ValueValidator<Short, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Short, R1, R2, R3, R4, R5, R6, Short> _short(String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Short, R1, R2, R3, R4, R5, R6, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, String, R1, R2, R3, R4, R5, R6, T> _string( ValueValidator<String, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, String, R1, R2, R3, R4, R5, R6, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, String, R1, R2, R3, R4, R5, R6, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, YearMonth, R1, R2, R3, R4, R5, R6, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, YearMonth, R1, R2, R3, R4, R5, R6, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, YearMonth, R1, R2, R3, R4, R5, R6, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Year, R1, R2, R3, R4, R5, R6, T> _year( ValueValidator<Year, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Year, R1, R2, R3, R4, R5, R6, Year> _year(String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, Year, R1, R2, R3, R4, R5, R6, Year> _year(String name) { return this._year(name, Function.identity()); } public <T> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, ZonedDateTime, R1, R2, R3, R4, R5, R6, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments7ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, validator); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, ZonedDateTime, R1, R2, R3, R4, R5, R6, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, ZonedDateTime, R1, R2, R3, R4, R5, R6, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments6Validator<A1, A2, A3, A4, A5, A6, X> apply( Function6<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? extends X> f) { return ArgumentsValidators.split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6).apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments7ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments7Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function7; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, R1, R2, R3, R4, R5, R6, R7> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; public Arguments7ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, BigDecimal, R1, R2, R3, R4, R5, R6, R7, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, BigDecimal, R1, R2, R3, R4, R5, R6, R7, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, BigDecimal, R1, R2, R3, R4, R5, R6, R7, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, BigInteger, R1, R2, R3, R4, R5, R6, R7, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, BigInteger, R1, R2, R3, R4, R5, R6, R7, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, BigInteger, R1, R2, R3, R4, R5, R6, R7, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Boolean, R1, R2, R3, R4, R5, R6, R7, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Boolean, R1, R2, R3, R4, R5, R6, R7, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Boolean, R1, R2, R3, R4, R5, R6, R7, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Double, R1, R2, R3, R4, R5, R6, R7, T> _double( ValueValidator<Double, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Double, R1, R2, R3, R4, R5, R6, R7, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Double, R1, R2, R3, R4, R5, R6, R7, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, E, R1, R2, R3, R4, R5, R6, R7, T> _enum( ValueValidator<E, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public <E extends Enum<E>> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, E, R1, R2, R3, R4, R5, R6, R7, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, E, R1, R2, R3, R4, R5, R6, R7, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Float, R1, R2, R3, R4, R5, R6, R7, T> _float( ValueValidator<Float, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Float, R1, R2, R3, R4, R5, R6, R7, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Float, R1, R2, R3, R4, R5, R6, R7, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Instant, R1, R2, R3, R4, R5, R6, R7, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Instant, R1, R2, R3, R4, R5, R6, R7, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Instant, R1, R2, R3, R4, R5, R6, R7, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Integer, R1, R2, R3, R4, R5, R6, R7, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Integer, R1, R2, R3, R4, R5, R6, R7, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Integer, R1, R2, R3, R4, R5, R6, R7, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalTime, R1, R2, R3, R4, R5, R6, R7, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalTime, R1, R2, R3, R4, R5, R6, R7, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalTime, R1, R2, R3, R4, R5, R6, R7, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalDate, R1, R2, R3, R4, R5, R6, R7, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalDate, R1, R2, R3, R4, R5, R6, R7, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, LocalDate, R1, R2, R3, R4, R5, R6, R7, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Long, R1, R2, R3, R4, R5, R6, R7, T> _long( ValueValidator<Long, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Long, R1, R2, R3, R4, R5, R6, R7, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Long, R1, R2, R3, R4, R5, R6, R7, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, T1, R1, R2, R3, R4, R5, R6, R7, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, T, R1, R2, R3, R4, R5, R6, R7, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, T, R1, R2, R3, R4, R5, R6, R7, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Short, R1, R2, R3, R4, R5, R6, R7, T> _short( ValueValidator<Short, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Short, R1, R2, R3, R4, R5, R6, R7, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Short, R1, R2, R3, R4, R5, R6, R7, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, String, R1, R2, R3, R4, R5, R6, R7, T> _string( ValueValidator<String, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, String, R1, R2, R3, R4, R5, R6, R7, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, String, R1, R2, R3, R4, R5, R6, R7, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, YearMonth, R1, R2, R3, R4, R5, R6, R7, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, YearMonth, R1, R2, R3, R4, R5, R6, R7, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, YearMonth, R1, R2, R3, R4, R5, R6, R7, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Year, R1, R2, R3, R4, R5, R6, R7, T> _year( ValueValidator<Year, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Year, R1, R2, R3, R4, R5, R6, R7, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, Year, R1, R2, R3, R4, R5, R6, R7, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments8ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, validator); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X> apply( Function7<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? extends X> f) { return ArgumentsValidators.split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7).apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments8ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments8Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function8; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, R1, R2, R3, R4, R5, R6, R7, R8> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; public Arguments8ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Double, R1, R2, R3, R4, R5, R6, R7, R8, T> _double( ValueValidator<Double, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Double, R1, R2, R3, R4, R5, R6, R7, R8, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Double, R1, R2, R3, R4, R5, R6, R7, R8, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, E, R1, R2, R3, R4, R5, R6, R7, R8, T> _enum( ValueValidator<E, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public <E extends Enum<E>> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, E, R1, R2, R3, R4, R5, R6, R7, R8, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, E, R1, R2, R3, R4, R5, R6, R7, R8, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Float, R1, R2, R3, R4, R5, R6, R7, R8, T> _float( ValueValidator<Float, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Float, R1, R2, R3, R4, R5, R6, R7, R8, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Float, R1, R2, R3, R4, R5, R6, R7, R8, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Instant, R1, R2, R3, R4, R5, R6, R7, R8, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Instant, R1, R2, R3, R4, R5, R6, R7, R8, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Instant, R1, R2, R3, R4, R5, R6, R7, R8, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Integer, R1, R2, R3, R4, R5, R6, R7, R8, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Integer, R1, R2, R3, R4, R5, R6, R7, R8, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Integer, R1, R2, R3, R4, R5, R6, R7, R8, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Long, R1, R2, R3, R4, R5, R6, R7, R8, T> _long( ValueValidator<Long, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Long, R1, R2, R3, R4, R5, R6, R7, R8, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Long, R1, R2, R3, R4, R5, R6, R7, R8, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, T1, R1, R2, R3, R4, R5, R6, R7, R8, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, T, R1, R2, R3, R4, R5, R6, R7, R8, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, T, R1, R2, R3, R4, R5, R6, R7, R8, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Short, R1, R2, R3, R4, R5, R6, R7, R8, T> _short( ValueValidator<Short, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Short, R1, R2, R3, R4, R5, R6, R7, R8, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Short, R1, R2, R3, R4, R5, R6, R7, R8, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, String, R1, R2, R3, R4, R5, R6, R7, R8, T> _string( ValueValidator<String, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, String, R1, R2, R3, R4, R5, R6, R7, R8, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, String, R1, R2, R3, R4, R5, R6, R7, R8, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Year, R1, R2, R3, R4, R5, R6, R7, R8, T> _year( ValueValidator<Year, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Year, R1, R2, R3, R4, R5, R6, R7, R8, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, Year, R1, R2, R3, R4, R5, R6, R7, R8, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments9ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, validator); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X> apply( Function8<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? extends X> f) { return ArgumentsValidators.split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/Arguments9ValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDateTime; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.Year; import java.time.YearMonth; import java.time.ZonedDateTime; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.ArgumentsValidators; import am.ik.yavi.arguments.Arguments9Validator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.constraint.CharSequenceConstraint; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.constraint.FloatConstraint; import am.ik.yavi.constraint.InstantConstraint; import am.ik.yavi.constraint.IntegerConstraint; import am.ik.yavi.constraint.LocalDateTimeConstraint; import am.ik.yavi.constraint.LocalDateConstraint; import am.ik.yavi.constraint.LocalTimeConstraint; import am.ik.yavi.constraint.LongConstraint; import am.ik.yavi.constraint.ObjectConstraint; import am.ik.yavi.constraint.OffsetDateTimeConstraint; import am.ik.yavi.constraint.ShortConstraint; import am.ik.yavi.constraint.YearConstraint; import am.ik.yavi.constraint.YearMonthConstraint; import am.ik.yavi.constraint.ZonedDateTimeConstraint; import am.ik.yavi.core.ValueValidator; import am.ik.yavi.fn.Function9; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.14.0 */ public final class Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, R1, R2, R3, R4, R5, R6, R7, R8, R9> { final ValueValidator<A1, R1> v1; final ValueValidator<A2, R2> v2; final ValueValidator<A3, R3> v3; final ValueValidator<A4, R4> v4; final ValueValidator<A5, R5> v5; final ValueValidator<A6, R6> v6; final ValueValidator<A7, R7> v7; final ValueValidator<A8, R8> v8; final ValueValidator<A9, R9> v9; public Arguments9ValidatorBuilder(ValueValidator<A1, R1> v1, ValueValidator<A2, R2> v2, ValueValidator<A3, R3> v3, ValueValidator<A4, R4> v4, ValueValidator<A5, R5> v5, ValueValidator<A6, R6> v6, ValueValidator<A7, R7> v7, ValueValidator<A8, R8> v8, ValueValidator<A9, R9> v9) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8; this.v9 = v9; } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _bigDecimal( ValueValidator<BigDecimal, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, BigDecimal> _bigDecimal( String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return this._bigDecimal(BigDecimalValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, BigDecimal, R1, R2, R3, R4, R5, R6, R7, R8, R9, BigDecimal> _bigDecimal( String name) { return this._bigDecimal(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _bigInteger( ValueValidator<BigInteger, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, BigInteger> _bigInteger( String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return this._bigInteger(BigIntegerValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, BigInteger, R1, R2, R3, R4, R5, R6, R7, R8, R9, BigInteger> _bigInteger( String name) { return this._bigInteger(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _boolean( ValueValidator<Boolean, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, Boolean> _boolean( String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return this._boolean(BooleanValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Boolean, R1, R2, R3, R4, R5, R6, R7, R8, R9, Boolean> _boolean( String name) { return this._boolean(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _double( ValueValidator<Double, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, Double> _double( String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return this._double(DoubleValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Double, R1, R2, R3, R4, R5, R6, R7, R8, R9, Double> _double( String name) { return this._double(name, Function.identity()); } public <E extends Enum<E>, T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _enum( ValueValidator<E, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public <E extends Enum<E>> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, E> _enum( String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return this._enum(EnumValidatorBuilder.of(name, constraints).build()); } public <E extends Enum<E>> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, E, R1, R2, R3, R4, R5, R6, R7, R8, R9, E> _enum( String name) { return this._enum(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _float( ValueValidator<Float, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, Float> _float( String name, Function<FloatConstraint<Arguments1<Float>>, FloatConstraint<Arguments1<Float>>> constraints) { return this._float(FloatValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Float, R1, R2, R3, R4, R5, R6, R7, R8, R9, Float> _float( String name) { return this._float(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _instant( ValueValidator<Instant, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, Instant> _instant( String name, Function<InstantConstraint<Arguments1<Instant>>, InstantConstraint<Arguments1<Instant>>> constraints) { return this._instant(InstantValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Instant, R1, R2, R3, R4, R5, R6, R7, R8, R9, Instant> _instant( String name) { return this._instant(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _integer( ValueValidator<Integer, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, Integer> _integer( String name, Function<IntegerConstraint<Arguments1<Integer>>, IntegerConstraint<Arguments1<Integer>>> constraints) { return this._integer(IntegerValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Integer, R1, R2, R3, R4, R5, R6, R7, R8, R9, Integer> _integer( String name) { return this._integer(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _localDateTime( ValueValidator<LocalDateTime, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, LocalDateTime> _localDateTime( String name, Function<LocalDateTimeConstraint<Arguments1<LocalDateTime>>, LocalDateTimeConstraint<Arguments1<LocalDateTime>>> constraints) { return this._localDateTime(LocalDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, LocalDateTime> _localDateTime( String name) { return this._localDateTime(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _localTime( ValueValidator<LocalTime, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, LocalTime> _localTime( String name, Function<LocalTimeConstraint<Arguments1<LocalTime>>, LocalTimeConstraint<Arguments1<LocalTime>>> constraints) { return this._localTime(LocalTimeValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, LocalTime> _localTime( String name) { return this._localTime(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _localDate( ValueValidator<LocalDate, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, LocalDate> _localDate( String name, Function<LocalDateConstraint<Arguments1<LocalDate>>, LocalDateConstraint<Arguments1<LocalDate>>> constraints) { return this._localDate(LocalDateValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, LocalDate, R1, R2, R3, R4, R5, R6, R7, R8, R9, LocalDate> _localDate( String name) { return this._localDate(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _long( ValueValidator<Long, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, Long> _long( String name, Function<LongConstraint<Arguments1<Long>>, LongConstraint<Arguments1<Long>>> constraints) { return this._long(LongValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Long, R1, R2, R3, R4, R5, R6, R7, R8, R9, Long> _long( String name) { return this._long(name, Function.identity()); } public <T1, T2> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, T1, R1, R2, R3, R4, R5, R6, R7, R8, R9, T2> _object( ValueValidator<T1, T2> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _object( String name, Function<ObjectConstraint<Arguments1<T>, T>, ObjectConstraint<Arguments1<T>, T>> constraints) { return this._object(ObjectValidatorBuilder.of(name, constraints).build()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, T, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _object( String name) { return this._object(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _offsetDateTime( ValueValidator<OffsetDateTime, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, OffsetDateTime> _offsetDateTime( String name, Function<OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>, OffsetDateTimeConstraint<Arguments1<OffsetDateTime>>> constraints) { return this._offsetDateTime(OffsetDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, OffsetDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, OffsetDateTime> _offsetDateTime( String name) { return this._offsetDateTime(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _short( ValueValidator<Short, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, Short> _short( String name, Function<ShortConstraint<Arguments1<Short>>, ShortConstraint<Arguments1<Short>>> constraints) { return this._short(ShortValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Short, R1, R2, R3, R4, R5, R6, R7, R8, R9, Short> _short( String name) { return this._short(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _string( ValueValidator<String, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, String> _string( String name, Function<CharSequenceConstraint<Arguments1<String>, String>, CharSequenceConstraint<Arguments1<String>, String>> constraints) { return this._string(StringValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, String, R1, R2, R3, R4, R5, R6, R7, R8, R9, String> _string( String name) { return this._string(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _yearMonth( ValueValidator<YearMonth, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, YearMonth> _yearMonth( String name, Function<YearMonthConstraint<Arguments1<YearMonth>>, YearMonthConstraint<Arguments1<YearMonth>>> constraints) { return this._yearMonth(YearMonthValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, YearMonth, R1, R2, R3, R4, R5, R6, R7, R8, R9, YearMonth> _yearMonth( String name) { return this._yearMonth(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _year( ValueValidator<Year, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, Year> _year( String name, Function<YearConstraint<Arguments1<Year>>, YearConstraint<Arguments1<Year>>> constraints) { return this._year(YearValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, Year, R1, R2, R3, R4, R5, R6, R7, R8, R9, Year> _year( String name) { return this._year(name, Function.identity()); } public <T> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, T> _zonedDateTime( ValueValidator<ZonedDateTime, T> validator) { return new Arguments10ValidatorBuilder<>(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9, validator); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, ZonedDateTime> _zonedDateTime( String name, Function<ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>, ZonedDateTimeConstraint<Arguments1<ZonedDateTime>>> constraints) { return this._zonedDateTime(ZonedDateTimeValidatorBuilder.of(name, constraints).build()); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, ZonedDateTime, R1, R2, R3, R4, R5, R6, R7, R8, R9, ZonedDateTime> _zonedDateTime( String name) { return this._zonedDateTime(name, Function.identity()); } public <X> Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> apply( Function9<? super R1, ? super R2, ? super R3, ? super R4, ? super R5, ? super R6, ? super R7, ? super R8, ? super R9, ? extends X> f) { return ArgumentsValidators .split(this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, this.v8, this.v9) .apply(f); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/ArgumentsValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.Arguments1Validator; import am.ik.yavi.arguments.Arguments2; import am.ik.yavi.arguments.Arguments2Validator; import am.ik.yavi.arguments.Arguments3; import am.ik.yavi.arguments.Arguments3Validator; import am.ik.yavi.arguments.Arguments4; import am.ik.yavi.arguments.Arguments4Validator; import am.ik.yavi.arguments.Arguments5; import am.ik.yavi.arguments.Arguments5Validator; import am.ik.yavi.arguments.Arguments6; import am.ik.yavi.arguments.Arguments6Validator; import am.ik.yavi.arguments.Arguments7; import am.ik.yavi.arguments.Arguments7Validator; import am.ik.yavi.arguments.Arguments8; import am.ik.yavi.arguments.Arguments8Validator; import am.ik.yavi.arguments.Arguments9; import am.ik.yavi.arguments.Arguments9Validator; import am.ik.yavi.arguments.Arguments10; import am.ik.yavi.arguments.Arguments10Validator; import am.ik.yavi.arguments.Arguments11; import am.ik.yavi.arguments.Arguments11Validator; import am.ik.yavi.arguments.Arguments12; import am.ik.yavi.arguments.Arguments12Validator; import am.ik.yavi.arguments.Arguments13; import am.ik.yavi.arguments.Arguments13Validator; import am.ik.yavi.arguments.Arguments14; import am.ik.yavi.arguments.Arguments14Validator; import am.ik.yavi.arguments.Arguments15; import am.ik.yavi.arguments.Arguments15Validator; import am.ik.yavi.arguments.Arguments16; import am.ik.yavi.arguments.Arguments16Validator; import am.ik.yavi.arguments.DefaultArguments1Validator; import am.ik.yavi.arguments.DefaultArguments2Validator; import am.ik.yavi.arguments.DefaultArguments3Validator; import am.ik.yavi.arguments.DefaultArguments4Validator; import am.ik.yavi.arguments.DefaultArguments5Validator; import am.ik.yavi.arguments.DefaultArguments6Validator; import am.ik.yavi.arguments.DefaultArguments7Validator; import am.ik.yavi.arguments.DefaultArguments8Validator; import am.ik.yavi.arguments.DefaultArguments9Validator; import am.ik.yavi.arguments.DefaultArguments10Validator; import am.ik.yavi.arguments.DefaultArguments11Validator; import am.ik.yavi.arguments.DefaultArguments12Validator; import am.ik.yavi.arguments.DefaultArguments13Validator; import am.ik.yavi.arguments.DefaultArguments14Validator; import am.ik.yavi.arguments.DefaultArguments15Validator; import am.ik.yavi.arguments.DefaultArguments16Validator; import am.ik.yavi.fn.Function1; import am.ik.yavi.fn.Function2; import am.ik.yavi.fn.Function3; import am.ik.yavi.fn.Function4; import am.ik.yavi.fn.Function5; import am.ik.yavi.fn.Function6; import am.ik.yavi.fn.Function7; import am.ik.yavi.fn.Function8; import am.ik.yavi.fn.Function9; import am.ik.yavi.fn.Function10; import am.ik.yavi.fn.Function11; import am.ik.yavi.fn.Function12; import am.ik.yavi.fn.Function13; import am.ik.yavi.fn.Function14; import am.ik.yavi.fn.Function15; import am.ik.yavi.fn.Function16; import java.util.Objects; import java.util.function.Function; /** * Generated by https://github.com/making/yavi/blob/develop/scripts/generate-args.sh * * @since 0.3.0 */ public final class ArgumentsValidatorBuilder { public static <A1, X> Arguments1ValidatorBuilder<A1, X> of(Function1<? super A1, ? extends X> mapper) { return new Arguments1ValidatorBuilder<>(mapper); } public static <A1, A2, X> Arguments2ValidatorBuilder<A1, A2, X> of( Function2<? super A1, ? super A2, ? extends X> mapper) { return new Arguments2ValidatorBuilder<>(mapper); } public static <A1, A2, A3, X> Arguments3ValidatorBuilder<A1, A2, A3, X> of( Function3<? super A1, ? super A2, ? super A3, ? extends X> mapper) { return new Arguments3ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, X> Arguments4ValidatorBuilder<A1, A2, A3, A4, X> of( Function4<? super A1, ? super A2, ? super A3, ? super A4, ? extends X> mapper) { return new Arguments4ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, X> Arguments5ValidatorBuilder<A1, A2, A3, A4, A5, X> of( Function5<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? extends X> mapper) { return new Arguments5ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, X> Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, A6, X> of( Function6<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? extends X> mapper) { return new Arguments6ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, X> Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, X> of( Function7<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? extends X> mapper) { return new Arguments7ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, X> Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, X> of( Function8<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? extends X> mapper) { return new Arguments8ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, X> Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> of( Function9<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? extends X> mapper) { return new Arguments9ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, X> Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, X> of( Function10<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? extends X> mapper) { return new Arguments10ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, X> Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, X> of( Function11<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? extends X> mapper) { return new Arguments11ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, X> Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, X> of( Function12<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? extends X> mapper) { return new Arguments12ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, X> Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, X> of( Function13<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? extends X> mapper) { return new Arguments13ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, X> Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, X> of( Function14<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? extends X> mapper) { return new Arguments14ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> of( Function15<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? extends X> mapper) { return new Arguments15ValidatorBuilder<>(mapper); } public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> of( Function16<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? super A16, ? extends X> mapper) { return new Arguments16ValidatorBuilder<>(mapper); } /** * @since 0.3.0 */ public static final class Arguments1ValidatorBuilder<A1, X> { private final Function1<? super A1, ? extends X> mapper; private ValidatorBuilder<Arguments1<A1>> builder; public Arguments1ValidatorBuilder(Function1<? super A1, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments1ValidatorBuilder<A1, X> builder( Function<? super ValidatorBuilder<Arguments1<A1>>, ? extends ValidatorBuilder<Arguments1<A1>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments1Validator<A1, X> build() { return new DefaultArguments1Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments2ValidatorBuilder<A1, A2, X> { private final Function2<? super A1, ? super A2, ? extends X> mapper; private ValidatorBuilder<Arguments2<A1, A2>> builder; public Arguments2ValidatorBuilder(Function2<? super A1, ? super A2, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments2ValidatorBuilder<A1, A2, X> builder( Function<? super ValidatorBuilder<Arguments2<A1, A2>>, ? extends ValidatorBuilder<Arguments2<A1, A2>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments2Validator<A1, A2, X> build() { return new DefaultArguments2Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments3ValidatorBuilder<A1, A2, A3, X> { private final Function3<? super A1, ? super A2, ? super A3, ? extends X> mapper; private ValidatorBuilder<Arguments3<A1, A2, A3>> builder; public Arguments3ValidatorBuilder(Function3<? super A1, ? super A2, ? super A3, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments3ValidatorBuilder<A1, A2, A3, X> builder( Function<? super ValidatorBuilder<Arguments3<A1, A2, A3>>, ? extends ValidatorBuilder<Arguments3<A1, A2, A3>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments3Validator<A1, A2, A3, X> build() { return new DefaultArguments3Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments4ValidatorBuilder<A1, A2, A3, A4, X> { private final Function4<? super A1, ? super A2, ? super A3, ? super A4, ? extends X> mapper; private ValidatorBuilder<Arguments4<A1, A2, A3, A4>> builder; public Arguments4ValidatorBuilder( Function4<? super A1, ? super A2, ? super A3, ? super A4, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments4ValidatorBuilder<A1, A2, A3, A4, X> builder( Function<? super ValidatorBuilder<Arguments4<A1, A2, A3, A4>>, ? extends ValidatorBuilder<Arguments4<A1, A2, A3, A4>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments4Validator<A1, A2, A3, A4, X> build() { return new DefaultArguments4Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments5ValidatorBuilder<A1, A2, A3, A4, A5, X> { private final Function5<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? extends X> mapper; private ValidatorBuilder<Arguments5<A1, A2, A3, A4, A5>> builder; public Arguments5ValidatorBuilder( Function5<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments5ValidatorBuilder<A1, A2, A3, A4, A5, X> builder( Function<? super ValidatorBuilder<Arguments5<A1, A2, A3, A4, A5>>, ? extends ValidatorBuilder<Arguments5<A1, A2, A3, A4, A5>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments5Validator<A1, A2, A3, A4, A5, X> build() { return new DefaultArguments5Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, A6, X> { private final Function6<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? extends X> mapper; private ValidatorBuilder<Arguments6<A1, A2, A3, A4, A5, A6>> builder; public Arguments6ValidatorBuilder( Function6<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments6ValidatorBuilder<A1, A2, A3, A4, A5, A6, X> builder( Function<? super ValidatorBuilder<Arguments6<A1, A2, A3, A4, A5, A6>>, ? extends ValidatorBuilder<Arguments6<A1, A2, A3, A4, A5, A6>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments6Validator<A1, A2, A3, A4, A5, A6, X> build() { return new DefaultArguments6Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, X> { private final Function7<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? extends X> mapper; private ValidatorBuilder<Arguments7<A1, A2, A3, A4, A5, A6, A7>> builder; public Arguments7ValidatorBuilder( Function7<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments7ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, X> builder( Function<? super ValidatorBuilder<Arguments7<A1, A2, A3, A4, A5, A6, A7>>, ? extends ValidatorBuilder<Arguments7<A1, A2, A3, A4, A5, A6, A7>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments7Validator<A1, A2, A3, A4, A5, A6, A7, X> build() { return new DefaultArguments7Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, X> { private final Function8<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? extends X> mapper; private ValidatorBuilder<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>> builder; public Arguments8ValidatorBuilder( Function8<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments8ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, X> builder( Function<? super ValidatorBuilder<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>>, ? extends ValidatorBuilder<Arguments8<A1, A2, A3, A4, A5, A6, A7, A8>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments8Validator<A1, A2, A3, A4, A5, A6, A7, A8, X> build() { return new DefaultArguments8Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> { private final Function9<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? extends X> mapper; private ValidatorBuilder<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>> builder; public Arguments9ValidatorBuilder( Function9<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments9ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> builder( Function<? super ValidatorBuilder<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>>, ? extends ValidatorBuilder<Arguments9<A1, A2, A3, A4, A5, A6, A7, A8, A9>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments9Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, X> build() { return new DefaultArguments9Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, X> { private final Function10<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? extends X> mapper; private ValidatorBuilder<Arguments10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>> builder; public Arguments10ValidatorBuilder( Function10<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments10ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, X> builder( Function<? super ValidatorBuilder<Arguments10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>>, ? extends ValidatorBuilder<Arguments10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments10Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, X> build() { return new DefaultArguments10Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, X> { private final Function11<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? extends X> mapper; private ValidatorBuilder<Arguments11<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>> builder; public Arguments11ValidatorBuilder( Function11<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments11ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, X> builder( Function<? super ValidatorBuilder<Arguments11<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>>, ? extends ValidatorBuilder<Arguments11<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments11Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, X> build() { return new DefaultArguments11Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, X> { private final Function12<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? extends X> mapper; private ValidatorBuilder<Arguments12<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>> builder; public Arguments12ValidatorBuilder( Function12<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments12ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, X> builder( Function<? super ValidatorBuilder<Arguments12<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>>, ? extends ValidatorBuilder<Arguments12<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments12Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, X> build() { return new DefaultArguments12Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, X> { private final Function13<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? extends X> mapper; private ValidatorBuilder<Arguments13<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>> builder; public Arguments13ValidatorBuilder( Function13<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments13ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, X> builder( Function<? super ValidatorBuilder<Arguments13<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>>, ? extends ValidatorBuilder<Arguments13<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments13Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, X> build() { return new DefaultArguments13Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, X> { private final Function14<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? extends X> mapper; private ValidatorBuilder<Arguments14<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>> builder; public Arguments14ValidatorBuilder( Function14<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments14ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, X> builder( Function<? super ValidatorBuilder<Arguments14<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>>, ? extends ValidatorBuilder<Arguments14<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments14Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, X> build() { return new DefaultArguments14Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> { private final Function15<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? extends X> mapper; private ValidatorBuilder<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>> builder; public Arguments15ValidatorBuilder( Function15<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments15ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> builder( Function<? super ValidatorBuilder<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>>, ? extends ValidatorBuilder<Arguments15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments15Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, X> build() { return new DefaultArguments15Validator<>(this.builder.build(), this.mapper); } } /** * @since 0.3.0 */ public static final class Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> { private final Function16<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? super A16, ? extends X> mapper; private ValidatorBuilder<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>> builder; public Arguments16ValidatorBuilder( Function16<? super A1, ? super A2, ? super A3, ? super A4, ? super A5, ? super A6, ? super A7, ? super A8, ? super A9, ? super A10, ? super A11, ? super A12, ? super A13, ? super A14, ? super A15, ? super A16, ? extends X> mapper) { this.mapper = Objects.requireNonNull(mapper, "'mapper' must not be null."); } public Arguments16ValidatorBuilder<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> builder( Function<? super ValidatorBuilder<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>>, ? extends ValidatorBuilder<Arguments16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>>> definition) { this.builder = definition.apply(ValidatorBuilder.of()); return this; } public Arguments16Validator<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, X> build() { return new DefaultArguments16Validator<>(this.builder.build(), this.mapper); } } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/BigDecimalValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigDecimal; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.BigDecimalValidator; import am.ik.yavi.constraint.BigDecimalConstraint; import am.ik.yavi.core.Validator; /** * @since 0.7.0 */ public class BigDecimalValidatorBuilder implements ValueValidatorBuilder<BigDecimal, BigDecimal> { private final Function<ValidatorBuilder<Arguments1<BigDecimal>>, ValidatorBuilder<Arguments1<BigDecimal>>> builder; public static BigDecimalValidatorBuilder of(String name, Function<BigDecimalConstraint<Arguments1<BigDecimal>>, BigDecimalConstraint<Arguments1<BigDecimal>>> constraints) { return wrap(b -> b.constraint(Arguments1::arg1, name, constraints)); } /** * @since 0.11.3 */ public static BigDecimalValidatorBuilder wrap( Function<ValidatorBuilder<Arguments1<BigDecimal>>, ValidatorBuilder<Arguments1<BigDecimal>>> builder) { return new BigDecimalValidatorBuilder(builder); } BigDecimalValidatorBuilder( Function<ValidatorBuilder<Arguments1<BigDecimal>>, ValidatorBuilder<Arguments1<BigDecimal>>> builder) { this.builder = builder; } @Override public <T> BigDecimalValidator<T> build(Function<? super BigDecimal, ? extends T> mapper) { final Validator<Arguments1<BigDecimal>> validator = this.builder.apply(ValidatorBuilder.of()).build(); return new BigDecimalValidator<>(validator, mapper::apply); } @Override public BigDecimalValidator<BigDecimal> build() { return build(x -> x); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/BigIntegerValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.math.BigInteger; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.BigIntegerValidator; import am.ik.yavi.constraint.BigIntegerConstraint; import am.ik.yavi.core.Validator; /** * @since 0.7.0 */ public class BigIntegerValidatorBuilder implements ValueValidatorBuilder<BigInteger, BigInteger> { private final Function<ValidatorBuilder<Arguments1<BigInteger>>, ValidatorBuilder<Arguments1<BigInteger>>> builder; public static BigIntegerValidatorBuilder of(String name, Function<BigIntegerConstraint<Arguments1<BigInteger>>, BigIntegerConstraint<Arguments1<BigInteger>>> constraints) { return wrap(b -> b.constraint(Arguments1::arg1, name, constraints)); } /** * @since 0.11.3 */ public static BigIntegerValidatorBuilder wrap( Function<ValidatorBuilder<Arguments1<BigInteger>>, ValidatorBuilder<Arguments1<BigInteger>>> builder) { return new BigIntegerValidatorBuilder(builder); } BigIntegerValidatorBuilder( Function<ValidatorBuilder<Arguments1<BigInteger>>, ValidatorBuilder<Arguments1<BigInteger>>> builder) { this.builder = builder; } @Override public <T> BigIntegerValidator<T> build(Function<? super BigInteger, ? extends T> mapper) { final Validator<Arguments1<BigInteger>> validator = this.builder.apply(ValidatorBuilder.of()).build(); return new BigIntegerValidator<>(validator, mapper::apply); } @Override public BigIntegerValidator<BigInteger> build() { return build(x -> x); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/BooleanValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.BooleanValidator; import am.ik.yavi.constraint.BooleanConstraint; import am.ik.yavi.core.Validator; /** * @since 0.7.0 */ public class BooleanValidatorBuilder implements ValueValidatorBuilder<Boolean, Boolean> { private final Function<ValidatorBuilder<Arguments1<Boolean>>, ValidatorBuilder<Arguments1<Boolean>>> builder; public static BooleanValidatorBuilder of(String name, Function<BooleanConstraint<Arguments1<Boolean>>, BooleanConstraint<Arguments1<Boolean>>> constraints) { return wrap(b -> b.constraint(Arguments1::arg1, name, constraints)); } /** * @since 0.11.3 */ public static BooleanValidatorBuilder wrap( Function<ValidatorBuilder<Arguments1<Boolean>>, ValidatorBuilder<Arguments1<Boolean>>> builder) { return new BooleanValidatorBuilder(builder); } BooleanValidatorBuilder( Function<ValidatorBuilder<Arguments1<Boolean>>, ValidatorBuilder<Arguments1<Boolean>>> builder) { this.builder = builder; } @Override public <T> BooleanValidator<T> build(Function<? super Boolean, ? extends T> mapper) { final Validator<Arguments1<Boolean>> validator = this.builder.apply(ValidatorBuilder.of()).build(); return new BooleanValidator<>(validator, mapper::apply); } @Override public BooleanValidator<Boolean> build() { return build(x -> x); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/ConflictStrategy.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.util.List; import am.ik.yavi.core.ConstraintPredicates; /** * Conflict Strategy that defines the behavior when a constraint name conflicts when * adding a constraint. * * @since 0.13.0 */ @FunctionalInterface public interface ConflictStrategy { /** * Define how to resolve conflicts of a constraint name when adding a constraint. * @param predicatesList existing predicates list * @param predicates new (conflicting) predicate * @param <T> target type */ <T> void resolveConflict(List<ConstraintPredicates<T, ?>> predicatesList, ConstraintPredicates<T, ?> predicates); /** * Do nothing if a conflict occurs. That means simply appending the predicate. */ ConflictStrategy NOOP = new ConflictStrategy() { @Override public <T> void resolveConflict(List<ConstraintPredicates<T, ?>> constraintPredicates, ConstraintPredicates<T, ?> predicates) { // NOOP } }; /** * If there is a conflict, remove the existing predicates and adopt the new predicate. */ ConflictStrategy OVERRIDE = new ConflictStrategy() { @Override public <T> void resolveConflict(List<ConstraintPredicates<T, ?>> constraintPredicates, ConstraintPredicates<T, ?> predicates) { constraintPredicates.clear(); } }; }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/DoubleValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.DoubleValidator; import am.ik.yavi.constraint.DoubleConstraint; import am.ik.yavi.core.Validator; /** * @since 0.7.0 */ public class DoubleValidatorBuilder implements ValueValidatorBuilder<Double, Double> { private final Function<ValidatorBuilder<Arguments1<Double>>, ValidatorBuilder<Arguments1<Double>>> builder; public static DoubleValidatorBuilder of(String name, Function<DoubleConstraint<Arguments1<Double>>, DoubleConstraint<Arguments1<Double>>> constraints) { return wrap(b -> b.constraint(Arguments1::arg1, name, constraints)); } /** * @since 0.11.3 */ public static DoubleValidatorBuilder wrap( Function<ValidatorBuilder<Arguments1<Double>>, ValidatorBuilder<Arguments1<Double>>> builder) { return new DoubleValidatorBuilder(builder); } DoubleValidatorBuilder( Function<ValidatorBuilder<Arguments1<Double>>, ValidatorBuilder<Arguments1<Double>>> builder) { this.builder = builder; } @Override public <T> DoubleValidator<T> build(Function<? super Double, ? extends T> mapper) { final Validator<Arguments1<Double>> validator = this.builder.apply(ValidatorBuilder.of()).build(); return new DoubleValidator<>(validator, mapper::apply); } @Override public DoubleValidator<Double> build() { return build(x -> x); } }
0
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi
java-sources/am/ik/yavi/yavi/0.16.0/am/ik/yavi/builder/EnumValidatorBuilder.java
/* * Copyright (C) 2018-2025 Toshiaki Maki <makingx@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package am.ik.yavi.builder; import java.util.function.Function; import am.ik.yavi.arguments.Arguments1; import am.ik.yavi.arguments.EnumValidator; import am.ik.yavi.constraint.EnumConstraint; import am.ik.yavi.core.Validator; /** * @since 0.14.0 */ public class EnumValidatorBuilder<E extends Enum<E>> implements ValueValidatorBuilder<E, E> { private final Function<ValidatorBuilder<Arguments1<E>>, ValidatorBuilder<Arguments1<E>>> builder; public static <E extends Enum<E>> EnumValidatorBuilder<E> of(String name, Function<EnumConstraint<Arguments1<E>, E>, EnumConstraint<Arguments1<E>, E>> constraints) { return wrap(b -> b.constraint(Arguments1::arg1, name, constraints)); } public static <E extends Enum<E>> EnumValidatorBuilder<E> wrap( Function<ValidatorBuilder<Arguments1<E>>, ValidatorBuilder<Arguments1<E>>> builder) { return new EnumValidatorBuilder<>(builder); } EnumValidatorBuilder(Function<ValidatorBuilder<Arguments1<E>>, ValidatorBuilder<Arguments1<E>>> builder) { this.builder = builder; } @Override public <T> EnumValidator<E, T> build(Function<? super E, ? extends T> mapper) { final Validator<Arguments1<E>> validator = this.builder.apply(ValidatorBuilder.of()).build(); return new EnumValidator<>(validator, mapper::apply); } @Override public EnumValidator<E, E> build() { return build(e -> e); } }