Class CommitPredicate
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.OperatorPredicate<I>
-
- com.google.gerrit.index.query.IndexPredicate<ChangeData>
-
- com.google.gerrit.server.query.change.ChangeIndexPredicate
-
- com.google.gerrit.server.query.change.CommitPredicate
-
- All Implemented Interfaces:
HasCardinality
,Matchable<ChangeData>
public class CommitPredicate extends ChangeIndexPredicate implements HasCardinality
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.index.query.OperatorPredicate
name, value
-
-
Constructor Summary
Constructors Constructor Description CommitPredicate(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equals(PatchSet p, String id)
int
getCardinality()
int
getCost()
boolean
match(ChangeData object)
Does this predicate match this object?-
Methods inherited from class com.google.gerrit.server.query.change.ChangeIndexPredicate
none
-
Methods inherited from class com.google.gerrit.index.query.IndexPredicate
getField, getType
-
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, getLeafCount, isMatchable, not, or, or
-
-
-
-
Constructor Detail
-
CommitPredicate
public CommitPredicate(String id)
-
-
Method Detail
-
match
public boolean match(ChangeData object)
Description copied from interface:Matchable
Does this predicate match this object?- Specified by:
match
in interfaceMatchable<ChangeData>
-
getCost
public int getCost()
- Specified by:
getCost
in interfaceMatchable<ChangeData>
- Returns:
- a cost estimate to run this predicate, higher figures cost more.
-
getCardinality
public int getCardinality()
- Specified by:
getCardinality
in interfaceHasCardinality
- Returns:
- an estimate of the number of results a source can return.
-
-