Class NameMatch

java.lang.Object
edu.umd.cs.findbugs.filter.NameMatch

public class NameMatch extends Object
Matches a String value against a predefined specification. Matching can be done in three modes depending on ctor matchSpec argument. If matchSpec is null, match will succeed for any value (including empty String and null) If matchSpec starts with ~ character it will be treated as java.util.regex.Pattern, with the ~ character omitted. The pattern will be matched against whole value (ie Matcher.match(), not Matcher.find()) If matchSpec is a non-null String with any other initial charcter, exact matching using String.equals(String) will be performed.
Author:
[email protected]
  • Constructor Details

    • NameMatch

      public NameMatch(String matchSpec)
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isUniversal

      public boolean isUniversal()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getValue

      public String getValue()
    • match

      public boolean match(String value)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSpec

      public String getSpec()