Interface PathFilter
-
- All Known Implementing Classes:
DefaultPathFilter
public interface PathFilter extends Filter, Dumpable
The item filter is used to include or exclude a set of paths. It is usually part of aPathFilterSet
.
-
-
Field Summary
Fields Modifier and Type Field Description static PathFilter
ALL
The "Catch all" item filter.static PathFilter
NONE
The "Miss all" item filter.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isAbsolute()
Checks if the pattern is absolute, i.e.boolean
matches(java.lang.String path)
Checks if the given path matches this filters criteria.PathFilter
translate(PathMapping mapping)
Translates this path filter with the given mapping.
-
-
-
Field Detail
-
ALL
static final PathFilter ALL
The "Catch all" item filter.
-
NONE
static final PathFilter NONE
The "Miss all" item filter.
-
-
Method Detail
-
matches
boolean matches(@Nonnull java.lang.String path)
Checks if the given path matches this filters criteria.- Parameters:
path
- the path to check- Returns:
true
if this filter matches the criteria;false
otherwise.
-
isAbsolute
boolean isAbsolute()
Checks if the pattern is absolute, i.e. does not start with a wildcard.- Returns:
true
if pattern is absolute
-
translate
@Nonnull PathFilter translate(@Nullable PathMapping mapping)
Translates this path filter with the given mapping. Note that only absolute filters can be translated.- Parameters:
mapping
- the mapping to apply- Returns:
- the new filter
- Since:
- 2.4.10
-
-