- java.lang.Object
-
- org.eclipse.jgit.treewalk.filter.TreeFilterMarker
-
public class TreeFilterMarker extends Object
For testing an array ofTreeFilterduring aTreeWalkfor each entry and returning the result as a bitmask.- Since:
- 2.3
-
-
Constructor Summary
Constructors Constructor Description TreeFilterMarker(TreeFilter[] markTreeFilters)Construct a TreeFilterMarker.
-
-
-
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:
IllegalArgumentException- if more tree filters are passed than possible
-
-
Method Detail
-
getMarks
public int getMarks(TreeWalk walk) throws MissingObjectException, IncorrectObjectTypeException, 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)IOException- as thrown byTreeFilter.include(TreeWalk)
-
-