public ApiHaving(@NotNull String havingQuery,MetricDictionary metricDictionary) throws BadHavingException {
  LOG.trace("Having query: {} MetricDictionary: {}",havingQuery,metricDictionary);
  Matcher tokenizedQuery=QUERY_PATTERN.matcher(havingQuery);
  if (!tokenizedQuery.matches()) {
    LOG.debug(HAVING_INVALID.logFormat(havingQuery));
    throw new BadHavingException(HAVING_INVALID.format(havingQuery));
  }
  metric=extractMetric(tokenizedQuery,metricDictionary);
  operation=extractOperation(tokenizedQuery);
  values=extractValues(tokenizedQuery,havingQuery);
}

public ApiHaving ( @ NotNull String havingQuery , MetricDictionary metricDictionary ) throws BadHavingException { LOG . trace ( "Having query: {} MetricDictionary: {}" , havingQuery , metricDictionary ) ; Matcher tokenizedQuery = QUERY_PATTERN . matcher ( havingQuery ) ; if ( ! tokenizedQuery . matches ( ) ) { LOG . debug ( HAVING_INVALID . logFormat ( havingQuery ) ) ; throw new BadHavingException ( HAVING_INVALID . format ( havingQuery ) ) ; } metric = extractMetric ( tokenizedQuery , metricDictionary ) ; operation = extractOperation ( tokenizedQuery ) ; values = extractValues ( tokenizedQuery , havingQuery ) ; }
parses the url having query and generates the apihaving object .
