Package com.google.gerrit.index.query
Class RangeUtil
java.lang.Object
com.google.gerrit.index.query.RangeUtil
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic RangeUtil.Range
Determine the range of values being requested in the given query.static RangeUtil.Range
Determine the range of values being requested in the given query.
-
Method Details
-
getRange
Determine the range of values being requested in the given query.- Parameters:
rangeQuery
- the raw query, e.g. "added:>12345
"minValue
- the minimum possible value for the field, inclusivemaxValue
- the maximum possible value for the field, inclusive- Returns:
- the calculated
RangeUtil.Range
, or null if the query is invalid
-
getRange
public static RangeUtil.Range getRange(String prefix, String test, int queryInt, int minValue, int maxValue) Determine the range of values being requested in the given query.- Parameters:
prefix
- a prefix string which is copied into the rangetest
- the test operator, one of >, >=, =, <, or <=queryInt
- the integer being queriedminValue
- the minimum possible value for the field, inclusivemaxValue
- the maximum possible value for the field, inclusive- Returns:
- the calculated
RangeUtil.Range
-