From bfad20931fac6af893becd8e95c4c4b990835b24 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Wed, 19 Jul 2023 02:21:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95=E5=90=8D?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plusone/commons/util/RegexUtil.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java b/src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java index 1c2f887..b566a6e 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java @@ -136,7 +136,7 @@ public final class RegexUtil { * @param patterns 正则 * @return 判断结果 */ - public static boolean matchOne(@Nullable final CharSequence input, final Pattern[] patterns) { + public static boolean matchesOne(@Nullable final CharSequence input, final Pattern[] patterns) { Preconditions.checkNotNull(patterns, "The patterns can not be null."); if (input == null) { return false; @@ -156,7 +156,7 @@ public final class RegexUtil { * @param patterns 正则 * @return 判断结果 */ - public static boolean matchAll(@Nullable final CharSequence input, final Pattern[] patterns) { + public static boolean matchesAll(@Nullable final CharSequence input, final Pattern[] patterns) { Preconditions.checkNotNull(patterns, "The patterns can not be null."); if (input == null) { return false; @@ -201,10 +201,10 @@ public final class RegexUtil { * @param cachePattern 是否缓存 {@link Pattern} 实例 * @return 判断结果 */ - public static boolean matchOne(@Nullable final CharSequence input, final String[] patterns, + public static boolean matchesOne(@Nullable final CharSequence input, final String[] patterns, final boolean cachePattern) { final Pattern[] patternSet = getPatterns(patterns, cachePattern); - return matchOne(input, patternSet); + return matchesOne(input, patternSet); } /** @@ -214,9 +214,9 @@ public final class RegexUtil { * @param patterns 正则表达式 * @return 判断结果 */ - public static boolean matchOne(@Nullable final CharSequence input, final String[] patterns) { + public static boolean matchesOne(@Nullable final CharSequence input, final String[] patterns) { final Pattern[] patternSet = getPatterns(patterns); - return matchOne(input, patternSet); + return matchesOne(input, patternSet); } /** @@ -227,10 +227,10 @@ public final class RegexUtil { * @param cachePattern 是否缓存 {@link Pattern} 实例 * @return 判断结果 */ - public static boolean matchAll(@Nullable final CharSequence input, final String[] patterns, + public static boolean matchesAll(@Nullable final CharSequence input, final String[] patterns, final boolean cachePattern) { final Pattern[] patternSet = getPatterns(patterns, cachePattern); - return matchAll(input, patternSet); + return matchesAll(input, patternSet); } /** @@ -240,9 +240,9 @@ public final class RegexUtil { * @param patterns 正则表达式 * @return 判断结果 */ - public static boolean matchAll(@Nullable final CharSequence input, final String[] patterns) { + public static boolean matchesAll(@Nullable final CharSequence input, final String[] patterns) { final Pattern[] patternSet = getPatterns(patterns); - return matchAll(input, patternSet); + return matchesAll(input, patternSet); } /**