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 PathFilterALLThe "Catch all" item filter.static PathFilterNONEThe "Miss all" item filter.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisAbsolute()Checks if the pattern is absolute, i.e.booleanmatches(java.lang.String path)Checks if the given path matches this filters criteria.PathFiltertranslate(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:
trueif this filter matches the criteria;falseotherwise.
-
isAbsolute
boolean isAbsolute()
Checks if the pattern is absolute, i.e. does not start with a wildcard.- Returns:
trueif 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
-
-