Modifier and Type | Field and Description |
---|---|
static String |
EQ |
static String |
GT |
static String |
GTE |
static String |
LT |
static String |
LTE |
static Set<String> |
OPERATORS |
Modifier and Type | Method and Description |
---|---|
static Criterion |
create(String family,
String key,
String operator,
Float value,
boolean variation)
Creates a new
Criterion with a numerical value. |
static Criterion |
create(String family,
String key,
String operator,
String textValue,
boolean variation)
Creates a new
Criterion with a text value. |
static Criterion |
createForMetric(String key,
String operator,
Float value,
boolean variation)
Creates a new
Criterion on a metric, with a numerical value. |
static Criterion |
createForMetric(String key,
String operator,
String textValue,
boolean variation)
Creates a new
Criterion on a metric, with a text value. |
static Criterion |
createForQualifier(Object... values)
Creates a new
Criterion on a qualifier. |
String |
getFamily()
Get the the criterion's family.
|
String |
getKey()
Get the the criterion's key.
|
String |
getOperator()
Get the the criterion's operator.
|
String |
getTextValue()
Get the the criterion's value as text.
|
Float |
getValue()
Get the the criterion's value.
|
boolean |
isVariation()
A criterion can be based on the varation of a value rather than on the value itself.
|
public static final String EQ
public static final String GT
public static final String GTE
public static final String LT
public static final String LTE
public static Criterion create(String family, String key, String operator, Float value, boolean variation)
Criterion
with a numerical value.
Valid values for the operator
are #EQ
, #GT
, #GTE
, #LT
and #LTE
IllegalArgumentException
- if operator
is not validpublic static Criterion create(String family, String key, String operator, String textValue, boolean variation)
Criterion
with a text value.
Valid values for the operator
are #EQ
, #GT
, #GTE
, #LT
and #LTE
IllegalArgumentException
- if operator
is not validpublic static Criterion createForMetric(String key, String operator, Float value, boolean variation)
Criterion
on a metric, with a numerical value.
Valid values for the operator
are #EQ
, #GT
, #GTE
, #LT
and #LTE
IllegalArgumentException
- if operator
is not validpublic static Criterion createForMetric(String key, String operator, String textValue, boolean variation)
Criterion
on a metric, with a text value.
Valid values for the operator
are #EQ
, #GT
, #GTE
, #LT
and #LTE
IllegalArgumentException
- if operator
is not validpublic static Criterion createForQualifier(Object... values)
Criterion
on a qualifier.public String getOperator()
Valid values for the operator
are #EQ
, #GT
, #GTE
, #LT
and #LTE
public String getTextValue()
public boolean isVariation()
true
when the variation is used rather than the valueCopyright © 2009–2015 SonarSource. All rights reserved.