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>
public class ListOfFilesUnchangedPredicate extends ApprovalPredicate
Predicate that matches when the new patch-set includes the same files as the old patch-set.
-
-
Constructor Summary
Constructors Constructor Description ListOfFilesUnchangedPredicate(DiffOperations diffOperations, GitRepositoryManager repositoryManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<ApprovalContext>
copy(Collection<? extends Predicate<ApprovalContext>> children)
Create a copy of this predicate, with new children.boolean
equals(Object other)
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 Detail
-
ListOfFilesUnchangedPredicate
@Inject public ListOfFilesUnchangedPredicate(DiffOperations diffOperations, GitRepositoryManager repositoryManager)
-
-
Method Detail
-
match
public boolean match(ApprovalContext ctx)
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
public boolean isInitialCommit(Project.NameKey project, org.eclipse.jgit.lib.ObjectId objectId)
-
copy
public Predicate<ApprovalContext> copy(Collection<? extends Predicate<ApprovalContext>> children)
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
public boolean equals(Object other)
- Specified by:
equals
in classPredicate<ApprovalContext>
-
-