public class PathFilterGroup extends Object
Operates like PathFilter
but causes
the walk to abort as soon as the tree can no longer match any of the paths
within the group. This may bypass the boolean logic of a higher level AND or
OR group, but does improve performance for the common case of examining one
or more modified paths.
This filter is effectively an OR group around paths, with the early abort feature described above.
Constructor and Description |
---|
PathFilterGroup() |
Modifier and Type | Method and Description |
---|---|
static TreeFilter |
create(Collection<PathFilter> paths)
Create a collection of path filters.
|
static TreeFilter |
createFromStrings(Collection<String> paths)
Create a collection of path filters from Java strings.
|
static TreeFilter |
createFromStrings(String... paths)
Create a collection of path filters from Java strings.
|
public static TreeFilter createFromStrings(Collection<String> paths)
Path strings are relative to the root of the repository. If the user's input should be assumed relative to a subdirectory of the repository the caller must prepend the subdirectory's path prior to creating the filter.
Path strings use '/' to delimit directories on all platforms.
Paths may appear in any order within the collection. Sorting may be done internally when the group is constructed if doing so will improve path matching performance.
paths
- the paths to test against. Must have at least one entry.public static TreeFilter createFromStrings(String... paths)
Path strings are relative to the root of the repository. If the user's input should be assumed relative to a subdirectory of the repository the caller must prepend the subdirectory's path prior to creating the filter.
Path strings use '/' to delimit directories on all platforms.
Paths may appear in any order. Sorting may be done internally when the group is constructed if doing so will improve path matching performance.
paths
- the paths to test against. Must have at least one entry.public static TreeFilter create(Collection<PathFilter> paths)
Paths may appear in any order within the collection. Sorting may be done internally when the group is constructed if doing so will improve path matching performance.
paths
- the paths to test against. Must have at least one entry.Copyright © 2020 Eclipse JGit Project. All rights reserved.