|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.web.Criterion
public final class Criterion
Definition of a criterion to be used to narrow down a Filter
.
Field Summary | |
---|---|
static String |
EQ
|
static String |
GT
|
static String |
GTE
|
static String |
LT
|
static String |
LTE
|
static Set<String> |
OPERATORS
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 final Set<String> OPERATORS
Method Detail |
---|
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 getFamily()
public String getKey()
public String getOperator()
Valid values for the operator
are #EQ
, #GT
, #GTE
, #LT
and #LTE
public Float getValue()
public String getTextValue()
public boolean isVariation()
true
when the variation is used rather than the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |