パッケージ org.springframework.util

クラス PatternMatchUtils

java.lang.ObjectSE
org.springframework.util.PatternMatchUtils

public abstract class PatternMatchUtils extends ObjectSE
特に Spring の典型的な "xxx*"、"*xxx"、"*xxx*" パターンスタイルの単純なパターンマッチングのユーティリティメソッド。
導入:
2.0
作成者:
Juergen Hoeller
  • コンストラクターのサマリー

    コンストラクター
    コンストラクター
    説明
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    static boolean
    simpleMatch(StringSE[] patterns, StringSE str)
    "xxx*"、"*xxx"、"*xxx*"、"xxx* yyy" の一致(任意の数のパターンパーツを使用)、および次の単純なパターンスタイルをサポートする、指定されたパターンに対して文字列を照合します。直接の等価。
    static boolean
    指定されたパターンに対して文字列を照合し、次の単純なパターンスタイルをサポートします: "xxx*"、"*xxx"、"*xxx*"、"xxx* yyy" のマッチ(パターンパーツの任意の数)、および直接等価。

    クラス java.lang.ObjectSE から継承されたメソッド

    clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
  • コンストラクターの詳細

    • PatternMatchUtils

      public PatternMatchUtils()
  • メソッドの詳細

    • simpleMatch

      public static boolean simpleMatch(@Nullable StringSE pattern, @Nullable StringSE str)
      指定されたパターンに対して文字列を照合し、次の単純なパターンスタイルをサポートします: "xxx*"、"*xxx"、"*xxx*"、"xxx* yyy" のマッチ(パターンパーツの任意の数)、および直接等価。
      パラメーター:
      pattern - 照合するパターン
      str - 一致する文字列
      戻り値:
      文字列が指定されたパターンに一致するかどうか
    • simpleMatch

      public static boolean simpleMatch(@Nullable StringSE[] patterns, StringSE str)
      "xxx*"、"*xxx"、"*xxx*"、"xxx* yyy" の一致(任意の数のパターンパーツを使用)、および次の単純なパターンスタイルをサポートする、指定されたパターンに対して文字列を照合します。直接の等価。
      パラメーター:
      patterns - 照合するパターン
      str - 一致する文字列
      戻り値:
      文字列が指定されたパターンのいずれかに一致するかどうか