Enum MatchBehavior

java.lang.Object
java.lang.Enum<MatchBehavior>
org.passay.rule.MatchBehavior
All Implemented Interfaces:
Serializable, Comparable<MatchBehavior>

public enum MatchBehavior extends Enum<MatchBehavior>
Enum that defines how string matching should occur.
  • Enum Constant Details

  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static MatchBehavior[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MatchBehavior valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • upperSnakeName

      public String upperSnakeName()
      Returns the name of this match behavior in upper case snake casing.
      Returns:
      upper case snake name
    • match

      public boolean match(UnicodeString text, int cp)
      Returns whether text matches the supplied string for this match type.
      Parameters:
      text - to search
      cp - code point to find in text
      Returns:
      whether text matches the supplied string for this match type
    • match

      public boolean match(UnicodeString text, CharSequence s)
      Returns whether text matches the supplied string for this match type.
      Parameters:
      text - to search
      s - to find in text
      Returns:
      whether text matches the supplied string for this match type
    • match

      public boolean match(UnicodeString text, UnicodeString s)
      Returns whether text matches the supplied string for this match type.
      Parameters:
      text - to search
      s - to find in text
      Returns:
      whether text matches the supplied string for this match type
    • toString

      public String toString()
      Overrides:
      toString in class Enum<MatchBehavior>