public class PropertyMatcher extends Object
Convenient way of checking whether at least one value for a key
in a given Properties
matches a regular expression.
A null
or empty regex value will try to match an
empty key value.
Constructor and Description |
---|
PropertyMatcher(String key,
String regex,
boolean caseSensitive) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
String |
getKey() |
String |
getRegex() |
int |
hashCode() |
boolean |
isCaseSensitive() |
boolean |
matches(Properties properties)
Whether this property matcher matches a key value in the given
Properties . |
String |
toString() |
public String getKey()
public String getRegex()
public boolean isCaseSensitive()
public boolean matches(Properties properties)
Properties
.properties
- the properties to look for a matchtrue
if at least one value for the key matches
the matcher regular expressionCopyright © 2008–2021 Norconex Inc.. All rights reserved.