|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.measures.Metric.Builder
public static final class Metric.Builder
Constructor Summary | |
---|---|
Metric.Builder(String key,
String name,
Metric.ValueType type)
|
Method Summary | |
---|---|
Metric |
create()
|
boolean |
isUserManaged()
Values of user-managed metrics can be set online in the "Manual measures" page. |
Metric.Builder |
setBestValue(Double d)
Sets the best value. |
Metric.Builder |
setDescription(String s)
Sets the metric description. |
Metric.Builder |
setDirection(Integer i)
Sets the metric direction. |
Metric.Builder |
setDomain(String s)
Sets the domain for the metric (General, Complexity...). |
Metric.Builder |
setFormula(Formula f)
|
Metric.Builder |
setHidden(boolean b)
Sets whether the metric should be hidden in UI (e.g. |
Metric.Builder |
setOptimizedBestValue(boolean b)
|
Metric.Builder |
setQualitative(Boolean b)
Sets whether the metric is qualitative. |
Metric.Builder |
setUserManaged(boolean b)
Values of user-managed metrics can be set online in the "Manual measures" page. |
Metric.Builder |
setWorstValue(Double d)
Sets the worst value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Metric.Builder(String key, String name, Metric.ValueType type)
key
- the metric key, should be unique among all metricsname
- the metric nametype
- the metric typeMethod Detail |
---|
public Metric.Builder setDescription(String s)
public Metric.Builder setDirection(Integer i)
Metric.DIRECTION_WORST
,
Metric.DIRECTION_BETTER
,
Metric.DIRECTION_NONE
public Metric.Builder setQualitative(Boolean b)
public Metric.Builder setDomain(String s)
public Metric.Builder setFormula(Formula f)
public Metric.Builder setWorstValue(Double d)
public Metric.Builder setBestValue(Double d)
public Metric.Builder setOptimizedBestValue(boolean b)
public Metric.Builder setHidden(boolean b)
public boolean isUserManaged()
public Metric.Builder setUserManaged(boolean b)
public Metric create()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |