Package com.google.gerrit.index.query
Class LimitPredicate<T>
- java.lang.Object
-
- com.google.gerrit.index.query.Predicate<T>
-
- com.google.gerrit.index.query.OperatorPredicate<T>
-
- com.google.gerrit.index.query.IntPredicate<T>
-
- com.google.gerrit.index.query.LimitPredicate<T>
-
- All Implemented Interfaces:
Matchable<T>
public class LimitPredicate<T> extends IntPredicate<T> implements Matchable<T>
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.index.query.OperatorPredicate
name, value
-
-
Constructor Summary
Constructors Constructor Description LimitPredicate(String fieldName, int limit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCost()
Returns a cost estimate to run this predicate, higher figures cost more.static Integer
getLimit(String fieldName, Predicate<?> p)
boolean
match(T object)
Does this predicate match this object?-
Methods inherited from class com.google.gerrit.index.query.IntPredicate
equals, hashCode, intValue, toString
-
Methods inherited from class com.google.gerrit.index.query.OperatorPredicate
copy, getOperator, getValue
-
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
-
LimitPredicate
public LimitPredicate(String fieldName, int limit) throws QueryParseException
- Throws:
QueryParseException
-
-