Methods Summary |
---|
public boolean | accept(java.lang.String s)Checks if the given string passes the various include/exclude rules.
The matching is done as follows:
- The string must match either a full include or a prefix include.
- The string must not match any full exclude nor any prefix exclude.
// Check if it can be included.
boolean accept = mIncludeFull.contains(s);
if (!accept) {
// Check for a prefix inclusion
for (String prefix : mIncludePrefix) {
if (s.startsWith(prefix)) {
accept = true;
break;
}
}
}
if (accept) {
// check for a full exclusion
accept = !mExcludeFull.contains(s);
}
if (accept) {
// or check for prefix exclusion
for (String prefix : mExcludePrefix) {
if (s.startsWith(prefix)) {
accept = false;
break;
}
}
}
return accept;
|
public java.util.TreeSet | getExcludeFull()Returns the set of all full patterns to be excluded.
return mExcludeFull;
|
public java.util.TreeSet | getExcludePrefix()Returns the set of all prefix patterns to be excluded.
return mExcludePrefix;
|
public java.util.TreeSet | getIncludeFull()Returns the set of all full patterns to be included.
return mIncludeFull;
|
public java.util.TreeSet | getIncludePrefix()Returns the set of all prefix patterns to be included.
return mIncludePrefix;
|