public class ExcludeIncludeFilterImpl extends java.lang.Object implements ExcludeIncludeFilter
A filter that tells if a given key should be included, given include and exclude lists.
Items in the list may have wildcards ('*') as the last character.
If the include list is empty, then all keys are included.
| Constructor and Description |
|---|
ExcludeIncludeFilterImpl(java.lang.String identifier,
java.util.Collection<java.lang.String> excludes,
java.util.Collection<java.lang.String> includes) |
ExcludeIncludeFilterImpl(java.lang.String identifier,
java.util.Collection<java.lang.String> excludes,
java.util.Collection<java.lang.String> includes,
boolean includeByDefault) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldInclude(java.lang.String key) |
public ExcludeIncludeFilterImpl(java.lang.String identifier,
java.util.Collection<java.lang.String> excludes,
java.util.Collection<java.lang.String> includes)
identifier - used in logs so filters can be distinguishedexcludes - the collection of keys to be excludedincludes - the collection of keys to be included, if empty, all keys are considered includedpublic ExcludeIncludeFilterImpl(java.lang.String identifier,
java.util.Collection<java.lang.String> excludes,
java.util.Collection<java.lang.String> includes,
boolean includeByDefault)
identifier - used in logs so filters can be distinguishedexcludes - the collection of keys to be excludedincludes - the collection of keys to be includedincludeByDefault - if true, keys not in the include list will be included, otherwise they will be excludedpublic boolean shouldInclude(java.lang.String key)
shouldInclude in interface ExcludeIncludeFilter