Package com.google.gerrit.server.query
Class FileEditsPredicate
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.OperatorPredicate<ChangeData>
-
- com.google.gerrit.server.query.change.SubmitRequirementPredicate
-
- com.google.gerrit.server.query.FileEditsPredicate
-
- All Implemented Interfaces:
Matchable<ChangeData>
public class FileEditsPredicate extends SubmitRequirementPredicate
A submit-requirement predicate that can be used in submit requirements expressions. This predicate is fulfilled if the diff between the latest patchset of the change and the base commit includes a specific file path pattern with some specific content modification. The modification could be an added, deleted or replaced content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FileEditsPredicate.Factory
static class
FileEditsPredicate.FileEditsArgs
-
Field Summary
-
Fields inherited from class com.google.gerrit.index.query.OperatorPredicate
name, value
-
-
Constructor Summary
Constructors Constructor Description FileEditsPredicate(DiffOperations diffOperations, GitRepositoryManager repoManager, FileEditsPredicate.FileEditsArgs fileEditsArgs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCost()
Returns a cost estimate to run this predicate, higher figures cost more.boolean
match(ChangeData cd)
Does this predicate match this object?-
Methods inherited from class com.google.gerrit.server.query.change.SubmitRequirementPredicate
supportedForQueries
-
Methods inherited from class com.google.gerrit.index.query.OperatorPredicate
copy, equals, getOperator, getValue, hashCode, toString
-
Methods inherited from class com.google.gerrit.index.query.Predicate
and, and, any, asMatchable, estimateCost, getChild, getChildCount, getChildren, getFlattenedPredicateList, getLeafCount, getPredicateString, isLeaf, isMatchable, not, or, or
-
-
-
-
Constructor Detail
-
FileEditsPredicate
public FileEditsPredicate(DiffOperations diffOperations, GitRepositoryManager repoManager, FileEditsPredicate.FileEditsArgs fileEditsArgs)
-
-
Method Detail
-
match
public boolean match(ChangeData cd)
Description copied from interface:Matchable
Does this predicate match this object?
-
getCost
public int getCost()
Description copied from interface:Matchable
Returns a cost estimate to run this predicate, higher figures cost more.
-
-