Classic shortcut behavior is used, so evaluation of the
org. method
stops as soon as a true result is obtained. Applications can improve
filtering performance by placing faster filters that are more likely to
accept a result earlier in the list.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static TreeFilter | Returns: a filter that must match at least one input filter.first filter to test. a, TreeFilter second filter to test. b)Create a filter with two filters, one of which must match. |
| public static TreeFilter | Returns: a filter that must match at least one input filter.list of filters to match against. Must contain at least 2
filters. list)Create a filter around many filters, one of which must match. |
| public static TreeFilter | Returns: a filter that must match at least one input filter.list of filters to match against. Must contain at least 2
filters. list)Create a filter around many filters, one of which must match. |
| OrTreeFilter | back to summary |
|---|---|
| public OrTreeFilter() | |
| create | back to summary |
|---|---|
| public static TreeFilter create(TreeFilter a, TreeFilter b) Create a filter with two filters, one of which must match.
| |
| create | back to summary |
|---|---|
| public static TreeFilter create(TreeFilter[] list) Create a filter around many filters, one of which must match.
| |
| create | back to summary |
|---|---|
| public static TreeFilter create(Collection<TreeFilter> list) Create a filter around many filters, one of which must match.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final TreeFilter | |
| private final TreeFilter |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| 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 int | matchFilter(TreeWalk
the walker the filter needs to examine. walker)Overrides org. Determine if the current entry is a parent, a match, or no match. |
| 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. |
| a | back to summary |
|---|---|
| private final TreeFilter a | |
| b | back to summary |
|---|---|
| private final TreeFilter b | |
| Binary | back to summary |
|---|---|
| pack-priv Binary(TreeFilter one, TreeFilter two) | |
| 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) throws MissingObjectException, IncorrectObjectTypeException, IOException Implements abstract org. Doc from org. Determine if the current entry is interesting to report.
This method is consulted for subtree entries even if
| |
| matchFilter | back to summary |
|---|---|
| public int matchFilter(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, IOException Overrides org. Doc from org. Determine if the current entry is a parent, a match, or no match.
This method extends the result returned by
| |
| 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 TreeFilter[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| 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 int | matchFilter(TreeWalk
the walker the filter needs to examine. walker)Overrides org. Determine if the current entry is a parent, a match, or no match. |
| 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. |
| subfilters | back to summary |
|---|---|
| private final TreeFilter[] subfilters | |
| List | back to summary |
|---|---|
| pack-priv List(TreeFilter[] list) | |
| 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) throws MissingObjectException, IncorrectObjectTypeException, IOException Implements abstract org. Doc from org. Determine if the current entry is interesting to report.
This method is consulted for subtree entries even if
| |
| matchFilter | back to summary |
|---|---|
| public int matchFilter(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, IOException Overrides org. Doc from org. Determine if the current entry is a parent, a match, or no match.
This method extends the result returned by
| |
| 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- | |