public class DefaultNameMatcher extends Object implements INameMatcher
| Constructor and Description |
|---|
DefaultNameMatcher() |
DefaultNameMatcher(boolean caseSensitive) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isCaseSensitive()
Check if the matcher is case-sensitive
|
boolean |
matches(String name1,
String name2)
Check if two names match according to the matching rules.
|
boolean |
matchesPattern(String name,
String pattern)
Check if a name is a valid match for a pattern.
|
String |
normalize(String name)
Normalize a name according to matching rules.
|
String |
toString() |
public DefaultNameMatcher()
public DefaultNameMatcher(boolean caseSensitive)
public boolean matches(String name1, String name2)
INameMatchermatches in interface INameMatchername1 - First namename2 - Second namepublic boolean matchesPattern(String name, String pattern)
INameMatchermatchesPattern in interface INameMatchername - The name to testpattern - The pattern to match againstpublic String normalize(String name)
INameMatchernormalize in interface INameMatchername - Name to normalizepublic boolean isCaseSensitive()
INameMatcherisCaseSensitive in interface INameMatcher