public class ApiHaving extends Object
Constructor and Description |
---|
ApiHaving(LogicalMetric metric,
HavingOperation operation,
List<Double> values)
Constructor for an ApiHaving object whose data has already been parsed.
|
ApiHaving(String havingQuery,
Map<String,LogicalMetric> metricDictionary)
Parses the URL having Query and generates the ApiHaving object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
LogicalMetric |
getMetric() |
HavingOperation |
getOperation() |
List<Double> |
getValues() |
int |
hashCode() |
ApiHaving |
withLogicalMetric(LogicalMetric metric) |
ApiHaving |
withOperation(HavingOperation operation) |
ApiHaving |
withValues(List<Double> values) |
public ApiHaving(@NotNull String havingQuery, Map<String,LogicalMetric> metricDictionary) throws BadHavingException
havingQuery
- Expects a URL having query String in the format:
(metric name)-(operation)[?(value or comma separated numeric values)]?
metricDictionary
- cache containing all the valid metric objects.BadHavingException
- when having pattern is not matched or when any of its properties are not valid.public ApiHaving(LogicalMetric metric, HavingOperation operation, List<Double> values)
metric
- The metric to perform the "having" check on.operation
- The operation to perform (i.e. greater than, less than).values
- The numbers to compare the metric to.public ApiHaving withLogicalMetric(@NotNull LogicalMetric metric)
public ApiHaving withOperation(@NotNull HavingOperation operation)
public LogicalMetric getMetric()
public HavingOperation getOperation()
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.