Operates like org. 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.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static TreeFilter | Returns: a new filter for the list of paths supplied.the paths to test against. Must have at least one entry. paths)Create a collection of path filters. |
| private static TreeFilter | |
| public static TreeFilter | Returns: a new filter for the list of paths supplied.the paths to test against. Must have at least one entry. paths)Create a collection of path filters from Java strings. |
| public static TreeFilter | Returns: a new filter for the paths supplied.the paths to test against. Must have at least one entry. paths)Create a collection of path filters from Java strings. |
| PathFilterGroup | back to summary |
|---|---|
| public PathFilterGroup() | |
| create | back to summary |
|---|---|
| public static TreeFilter create(Collection<PathFilter> paths) Create a collection of path filters. 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.
| |
| create | back to summary |
|---|---|
| private static TreeFilter create(PathFilter[] p) | |
| createFromStrings | back to summary |
|---|---|
| public static TreeFilter createFromStrings(Collection<String> paths) Create a collection of path filters from Java strings. 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.
| |
| createFromStrings | back to summary |
|---|---|
| public static TreeFilter createFromStrings(String... paths) Create a collection of path filters from Java strings. 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.
| |
| Modifier and Type | Field and Description |
|---|---|
| private ByteArraySet | |
| private byte[] | |
| private ByteArraySet |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TreeFilter | clone()
Implements abstract org. Creates and returns a copy of this object. |
| private static int | |
| public Optional | getPathsBestEffort()
Overrides org. If this filter checks that at least one of the paths in a set has been modified, returns that set of paths to be checked against a changed path filter. |
| public boolean | include(TreeWalk
the walker the filter needs to examine. walker)Implements abstract org. Determine if the current entry is interesting to report. |
| public boolean | shouldBeRecursive()
Implements abstract org. Does this tree filter require a recursive walk to match everything? |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| fullpaths | back to summary |
|---|---|
| private ByteArraySet fullpaths | |
| max | back to summary |
|---|---|
| private byte[] max | |
| prefixes | back to summary |
|---|---|
| private ByteArraySet prefixes | |
| Group | back to summary |
|---|---|
| private Group(PathFilter[] pathFilters) | |
| clone | back to summary |
|---|---|
| public TreeFilter clone() Implements abstract org. Doc from org. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.
| |
| compare | back to summary |
|---|---|
| private static int compare(byte[] a, byte[] b) | |
| getPathsBestEffort | back to summary |
|---|---|
| public Optional Overrides org. Doc from org. If this filter checks that at least one of the paths in a set has been modified, returns that set of paths to be checked against a changed path filter. Otherwise, returns empty. | |
| include | back to summary |
|---|---|
| public boolean include(TreeWalk walker) Implements abstract org. Doc from org. Determine if the current entry is interesting to report.
This method is consulted for subtree entries even if
| |
| shouldBeRecursive | back to summary |
|---|---|
| public boolean shouldBeRecursive() Implements abstract org. Doc from org. Does this tree filter require a recursive walk to match everything? If this tree filter is matching on full entry path names and its pattern is looking for a '/' then the filter would require a recursive TreeWalk to accurately make its decisions. The walker is not required to enable recursive behavior for any particular filter, this is only a hint.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| private final PathFilter | |
| private final byte[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TreeFilter | clone()
Implements abstract org. Creates and returns a copy of this object. |
| public boolean | include(TreeWalk
the walker the filter needs to examine. walker)Implements abstract org. Determine if the current entry is interesting to report. |
| public boolean | shouldBeRecursive()
Implements abstract org. Does this tree filter require a recursive walk to match everything? |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| path | back to summary |
|---|---|
| private final PathFilter path | |
| raw | back to summary |
|---|---|
| private final byte[] raw | |
| Single | back to summary |
|---|---|
| private Single(PathFilter p) | |
| clone | back to summary |
|---|---|
| public TreeFilter clone() Implements abstract org. Doc from org. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.
| |
| include | back to summary |
|---|---|
| public boolean include(TreeWalk walker) Implements abstract org. Doc from org. Determine if the current entry is interesting to report.
This method is consulted for subtree entries even if
| |
| shouldBeRecursive | back to summary |
|---|---|
| public boolean shouldBeRecursive() Implements abstract org. Doc from org. Does this tree filter require a recursive walk to match everything? If this tree filter is matching on full entry path names and its pattern is looking for a '/' then the filter would require a recursive TreeWalk to accurately make its decisions. The walker is not required to enable recursive behavior for any particular filter, this is only a hint.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |