Package org.eclipse.jgit.treewalk.filter
Class TreeFilterMarker
- java.lang.Object
-
- org.eclipse.jgit.treewalk.filter.TreeFilterMarker
-
public class TreeFilterMarker extends java.lang.ObjectFor testing an array ofTreeFilterduring aTreeWalkfor each entry and returning the result as a bitmask.- Since:
- 2.3
-
-
Field Summary
Fields Modifier and Type Field Description private TreeFilter[]filters
-
Constructor Summary
Constructors Constructor Description TreeFilterMarker(TreeFilter[] markTreeFilters)Construct a TreeFilterMarker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMarks(TreeWalk walk)Test the filters against the walk.
-
-
-
Field Detail
-
filters
private final TreeFilter[] filters
-
-
Constructor Detail
-
TreeFilterMarker
public TreeFilterMarker(TreeFilter[] markTreeFilters)
Construct a TreeFilterMarker. Note that it is stateful and can only be used for one walk loop.- Parameters:
markTreeFilters- the filters to use for marking, must not have more elements thanInteger.SIZE.- Throws:
java.lang.IllegalArgumentException- if more tree filters are passed than possible
-
-
Method Detail
-
getMarks
public int getMarks(TreeWalk walk) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
Test the filters against the walk. Returns a bitmask where each bit represents the result of a call toTreeFilter.include(TreeWalk), ordered by the index for which the tree filters were passed in the constructor.- Parameters:
walk- the walk from which to test the current entry- Returns:
- the marks bitmask
- Throws:
MissingObjectException- as thrown byTreeFilter.include(TreeWalk)IncorrectObjectTypeException- as thrown byTreeFilter.include(TreeWalk)java.io.IOException- as thrown byTreeFilter.include(TreeWalk)
-
-