Class RangeUtil

java.lang.Object
com.google.gerrit.index.query.RangeUtil

public final class RangeUtil extends Object
  • Method Details

    • getRange

      public static RangeUtil.Range getRange(String rangeQuery, int minValue, int maxValue)
      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, inclusive
      maxValue - 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 range
      test - the test operator, one of >, >=, =, <, or <=
      queryInt - the integer being queried
      minValue - the minimum possible value for the field, inclusive
      maxValue - the maximum possible value for the field, inclusive
      Returns:
      the calculated RangeUtil.Range