Class ListOfFilesUnchangedPredicate
java.lang.Object
com.google.gerrit.index.query.Predicate<ApprovalContext>
com.google.gerrit.server.query.approval.ApprovalPredicate
com.google.gerrit.server.query.approval.ListOfFilesUnchangedPredicate
- All Implemented Interfaces:
Matchable<ApprovalContext>
Predicate that matches when the new patch-set includes the same files as the old patch-set.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gerrit.index.query.Predicate
Predicate.Any<T>
-
Constructor Summary
ConstructorsConstructorDescriptionListOfFilesUnchangedPredicate
(DiffOperations diffOperations, GitRepositoryManager repositoryManager) -
Method Summary
Modifier and TypeMethodDescriptioncopy
(Collection<? extends Predicate<ApprovalContext>> children) Create a copy of this predicate, with new children.boolean
int
hashCode()
boolean
isInitialCommit
(Project.NameKey project, org.eclipse.jgit.lib.ObjectId objectId) boolean
match
(ApprovalContext ctx) Does this predicate match this object?boolean
match
(Map<String, ModifiedFile> baseVsCurrent, Map<String, ModifiedFile> baseVsPrior, Map<String, ModifiedFile> priorVsCurrent) returnstrue
if the files that were modified are the same in both inputs, and thePatch.ChangeType
matches for each modified file.Methods inherited from class com.google.gerrit.server.query.approval.ApprovalPredicate
getCost
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, supportedForQueries
-
Constructor Details
-
ListOfFilesUnchangedPredicate
@Inject public ListOfFilesUnchangedPredicate(DiffOperations diffOperations, GitRepositoryManager repositoryManager)
-
-
Method Details
-
match
Description copied from interface:Matchable
Does this predicate match this object? -
match
public boolean match(Map<String, ModifiedFile> baseVsCurrent, Map<String, ModifiedFile> baseVsPrior, Map<String, ModifiedFile> priorVsCurrent) returnstrue
if the files that were modified are the same in both inputs, and thePatch.ChangeType
matches for each modified file. -
isInitialCommit
-
copy
Description copied from class:Predicate
Create a copy of this predicate, with new children.- Specified by:
copy
in classPredicate<ApprovalContext>
-
hashCode
public int hashCode()- Specified by:
hashCode
in classPredicate<ApprovalContext>
-
equals
- Specified by:
equals
in classPredicate<ApprovalContext>
-