Package org.eclipse.jgit.treewalk.filter
Class AndTreeFilter
- java.lang.Object
-
- org.eclipse.jgit.treewalk.filter.TreeFilter
-
- org.eclipse.jgit.treewalk.filter.AndTreeFilter
-
public abstract class AndTreeFilter extends TreeFilter
Includes a tree entry only if all subfilters include the same tree entry.Classic shortcut behavior is used, so evaluation of the
TreeFilter.include(TreeWalk)
method stops as soon as a false result is obtained. Applications can improve filtering performance by placing faster filters that are more likely to reject a result earlier in the list.
-
-
Field Summary
-
Fields inherited from class org.eclipse.jgit.treewalk.filter.TreeFilter
ALL, ANY_DIFF
-
-
Constructor Summary
Constructors Constructor Description AndTreeFilter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TreeFilter
create(Collection<TreeFilter> list)
Create a filter around many filters, all of which must match.static TreeFilter
create(TreeFilter[] list)
Create a filter around many filters, all of which must match.static TreeFilter
create(TreeFilter a, TreeFilter b)
Create a filter with two filters, both of which must match.-
Methods inherited from class org.eclipse.jgit.treewalk.filter.TreeFilter
clone, include, matchFilter, negate, shouldBeRecursive, toString
-
-
-
-
Method Detail
-
create
public static TreeFilter create(TreeFilter a, TreeFilter b)
Create a filter with two filters, both of which must match.- Parameters:
a
- first filter to test.b
- second filter to test.- Returns:
- a filter that must match both input filters.
-
create
public static TreeFilter create(TreeFilter[] list)
Create a filter around many filters, all of which must match.- Parameters:
list
- list of filters to match against. Must contain at least 2 filters.- Returns:
- a filter that must match all input filters.
-
create
public static TreeFilter create(Collection<TreeFilter> list)
Create a filter around many filters, all of which must match.- Parameters:
list
- list of filters to match against. Must contain at least 2 filters.- Returns:
- a filter that must match all input filters.
-
-