修改方法名。

feature/net-util
ZhouXY108 2023-07-19 02:21:41 +08:00
parent 84f53716b7
commit bfad20931f
1 changed files with 10 additions and 10 deletions

View File

@ -136,7 +136,7 @@ public final class RegexUtil {
* @param patterns * @param patterns
* @return * @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."); Preconditions.checkNotNull(patterns, "The patterns can not be null.");
if (input == null) { if (input == null) {
return false; return false;
@ -156,7 +156,7 @@ public final class RegexUtil {
* @param patterns * @param patterns
* @return * @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."); Preconditions.checkNotNull(patterns, "The patterns can not be null.");
if (input == null) { if (input == null) {
return false; return false;
@ -201,10 +201,10 @@ public final class RegexUtil {
* @param cachePattern {@link Pattern} * @param cachePattern {@link Pattern}
* @return * @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 boolean cachePattern) {
final Pattern[] patternSet = getPatterns(patterns, 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 * @param patterns
* @return * @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); 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} * @param cachePattern {@link Pattern}
* @return * @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 boolean cachePattern) {
final Pattern[] patternSet = getPatterns(patterns, 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 * @param patterns
* @return * @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); final Pattern[] patternSet = getPatterns(patterns);
return matchAll(input, patternSet); return matchesAll(input, patternSet);
} }
/** /**