From 12a5740dd6649ee1eb6bcaf232be0d708b071b1a Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Sun, 8 Jun 2025 04:38:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=20BasePropertyVa?= =?UTF-8?q?lidator=20=E4=B8=AD=20equal=20=E5=92=8C=20notEqual=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E5=8F=82=E6=95=B0=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../validator/BasePropertyValidator.java | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/plusone-validator/src/main/java/xyz/zhouxy/plusone/validator/BasePropertyValidator.java b/plusone-validator/src/main/java/xyz/zhouxy/plusone/validator/BasePropertyValidator.java index 64b7a8a..62ce80c 100644 --- a/plusone-validator/src/main/java/xyz/zhouxy/plusone/validator/BasePropertyValidator.java +++ b/plusone-validator/src/main/java/xyz/zhouxy/plusone/validator/BasePropertyValidator.java @@ -258,50 +258,50 @@ public abstract class BasePropertyValidator< /** * 添加一条校验属性的规则,校验属性是否等于给定值 * - * @param that 用于比较的对象 + * @param obj 用于比较的对象 * @return 当前校验器实例,用于链式调用 */ - public final TPropertyValidator equal(Object that) { - return withRule(Conditions.equal(that), - "The input must be equal to '%s'.", that); + public final TPropertyValidator equal(Object obj) { + return withRule(Conditions.equal(obj), + "The input must be equal to '%s'.", obj); } /** * 添加一条校验属性的规则,校验属性是否等于给定值 * - * @param that 用于比较的对象 + * @param obj 用于比较的对象 * @param errorMessage 异常信息 * @return 当前校验器实例,用于链式调用 */ public final TPropertyValidator equal( - final Object that, final String errorMessage) { - return withRule(Conditions.equal(that), errorMessage); + final Object obj, final String errorMessage) { + return withRule(Conditions.equal(obj), errorMessage); } /** * 添加一条校验属性的规则,校验属性是否等于给定值 * * @param 自定义异常类型 - * @param that 用于比较的对象 + * @param obj 用于比较的对象 * @param exceptionSupplier 自定义异常 * @return 当前校验器实例,用于链式调用 */ public final TPropertyValidator equal( - final Object that, final Supplier exceptionSupplier) { - return withRule(Conditions.equal(that), exceptionSupplier); + final Object obj, final Supplier exceptionSupplier) { + return withRule(Conditions.equal(obj), exceptionSupplier); } /** * 添加一条校验属性的规则,校验属性是否等于给定值 * * @param 自定义异常类型 - * @param that 用于比较的对象 + * @param obj 用于比较的对象 * @param exceptionFunction 自定义异常 * @return 当前校验器实例,用于链式调用 */ public final TPropertyValidator equal( - final Object that, final Function exceptionFunction) { - return withRule(Conditions.equal(that), exceptionFunction); + final Object obj, final Function exceptionFunction) { + return withRule(Conditions.equal(obj), exceptionFunction); } // ================================ @@ -315,49 +315,49 @@ public abstract class BasePropertyValidator< /** * 添加一条校验属性的规则,校验属性是否等于给定值 * - * @param that 用于比较的对象 + * @param obj 用于比较的对象 * @return 当前校验器实例,用于链式调用 */ - public final TPropertyValidator notEqual(final Object that) { - return withRule(Conditions.notEqual(that), - "The input must not equal '%s'.", that); + public final TPropertyValidator notEqual(final Object obj) { + return withRule(Conditions.notEqual(obj), + "The input must not equal '%s'.", obj); } /** * 添加一条校验属性的规则,校验属性是否等于给定值 * - * @param that 用于比较的对象 + * @param obj 用于比较的对象 * @param errorMessage 异常信息 * @return 当前校验器实例,用于链式调用 */ - public final TPropertyValidator notEqual(final Object that, final String errorMessage) { - return withRule(Conditions.notEqual(that), errorMessage); + public final TPropertyValidator notEqual(final Object obj, final String errorMessage) { + return withRule(Conditions.notEqual(obj), errorMessage); } /** * 添加一条校验属性的规则,校验属性是否等于给定值 * * @param 自定义异常类型 - * @param that 用于比较的对象 + * @param obj 用于比较的对象 * @param exceptionSupplier 自定义异常 * @return 当前校验器实例,用于链式调用 */ public final TPropertyValidator notEqual( - final Object that, final Supplier exceptionSupplier) { - return withRule(Conditions.notEqual(that), exceptionSupplier); + final Object obj, final Supplier exceptionSupplier) { + return withRule(Conditions.notEqual(obj), exceptionSupplier); } /** * 添加一条校验属性的规则,校验属性是否等于给定值 * * @param 自定义异常类型 - * @param that 用于比较的对象 + * @param obj 用于比较的对象 * @param exceptionFunction 自定义异常 * @return 当前校验器实例,用于链式调用 */ public final TPropertyValidator notEqual( - final Object that, final Function exceptionFunction) { - return withRule(Conditions.notEqual(that), exceptionFunction); + final Object obj, final Function exceptionFunction) { + return withRule(Conditions.notEqual(obj), exceptionFunction); } // ================================