* <code>false</code> otherwise.
* @throws IllegalArgumentException If <code>filter</code> contains an
* invalid filter string that cannot be parsed.
*/
public boolean matches(String filter) {
Filter f;
try {
f = FrameworkUtil.createFilter(filter);
} catch (InvalidSyntaxException e) {
IllegalArgumentException iae = new IllegalArgumentException(e.getMessage());
iae.initCause(e);
throw iae;
}
Dictionary dictionary = new Properties();
for (Map.Entry<String, Object> entry : properties.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
dictionary.put(key, value);
}
/*
* we can use matchCase here since properties already supports case
* insensitive key lookup.
*/
return f.matchCase(dictionary);
}