Package edu.umd.cs.findbugs.filter
Class NameMatch
- java.lang.Object
-
- edu.umd.cs.findbugs.filter.NameMatch
-
public class NameMatch extends java.lang.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 omited. 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:
- rafal@caltha.pl
-
-
Constructor Summary
Constructors Constructor Description NameMatch(java.lang.String matchSpec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getSpec()
java.lang.String
getValue()
int
hashCode()
boolean
isUniversal()
boolean
match(java.lang.String value)
java.lang.String
toString()
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isUniversal
public boolean isUniversal()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
getValue
public java.lang.String getValue()
-
match
public boolean match(java.lang.String value)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getSpec
public java.lang.String getSpec()
-
-