Package org.eclipse.jgit.treewalk.filter
Class TreeFilterMarker
java.lang.Object
org.eclipse.jgit.treewalk.filter.TreeFilterMarker
For testing an array of
TreeFilter
during a TreeWalk
for each entry and
returning the result as a bitmask.- Since:
- 2.3
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTreeFilterMarker
(TreeFilter[] markTreeFilters) Construct a TreeFilterMarker. -
Method Summary
-
Field Details
-
filters
-
-
Constructor Details
-
TreeFilterMarker
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 Details
-
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)
-