|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.measures.Metric
public class Metric
Nested Class Summary | |
---|---|
static class |
Metric.Level
|
static class |
Metric.Origin
|
static class |
Metric.ValueType
|
Field Summary | |
---|---|
static int |
DIRECTION_BETTER
A metric bigger value means an improvement |
static int |
DIRECTION_NONE
The metric direction has no meaning |
static int |
DIRECTION_WORST
A metric bigger value means a degradation |
Constructor Summary | |
---|---|
Metric()
Deprecated. |
|
Metric(String key)
Creates a metric based on its key. |
|
Metric(String key,
Metric.ValueType type)
Creates a metric based on a key and a type. |
|
Metric(String key,
String name,
Metric.ValueType type,
Integer direction,
Boolean qualitative,
String domain,
Formula formula)
Creates a fully qualified metric. |
|
Metric(String key,
String name,
String description,
Metric.ValueType type,
Integer direction,
Boolean qualitative,
String domain)
|
|
Metric(String key,
String name,
String description,
Metric.ValueType type,
Integer direction,
Boolean qualitative,
String domain,
boolean userManaged)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DIRECTION_WORST
public static final int DIRECTION_BETTER
public static final int DIRECTION_NONE
Constructor Detail |
---|
@Deprecated public Metric()
public Metric(String key)
key
- the metric keypublic Metric(String key, Metric.ValueType type)
key
- the keytype
- the typepublic Metric(String key, String name, String description, Metric.ValueType type, Integer direction, Boolean qualitative, String domain)
@Deprecated public Metric(String key, String name, String description, Metric.ValueType type, Integer direction, Boolean qualitative, String domain, boolean userManaged)
key
- the metric keyname
- the metric namedescription
- the metric descriptiontype
- the metric typedirection
- the metric directionqualitative
- whether the metric is qualitativedomain
- the metric domainuserManaged
- whether the metric is user managedpublic Metric(String key, String name, Metric.ValueType type, Integer direction, Boolean qualitative, String domain, Formula formula)
key
- the metric keyname
- the metric nametype
- the metric typedirection
- the metric directionqualitative
- whether the metric is qualitativedomain
- the metric domainformula
- the metric formulaMethod Detail |
---|
public Integer getId()
public Metric setId(Integer id)
public Formula getFormula()
public Metric setFormula(Formula formula)
formula
- the formula
public Boolean getQualitative()
public Metric setQualitative(Boolean qualitative)
qualitative
- whether the metric is qualitative
public String getKey()
public Metric setKey(String key)
key
- the key
public Metric.ValueType getType()
public Metric setType(Metric.ValueType type)
type
- the type
public String getDescription()
public Metric setDescription(String description)
description
- the description
public Boolean getUserManaged()
public Metric setUserManaged(Boolean userManaged)
userManaged
- whether the metric is user managed
public Boolean getEnabled()
public Metric setEnabled(Boolean enabled)
enabled
- whether the metric is enabled
public Integer getDirection()
public Metric setDirection(Integer direction)
direction
- the directionpublic String getDomain()
public Metric setDomain(String domain)
domain
- the domain
public String getName()
public Metric setName(String name)
name
- the name
public Metric.Origin getOrigin()
public Metric setOrigin(Metric.Origin origin)
origin
- the origin
public Double getWorstValue()
public Double getBestValue()
public Metric setWorstValue(Double d)
public Metric setBestValue(Double bestValue)
bestValue
- the best value. It can be null.
public boolean isNumericType()
public boolean isDataType()
public boolean isPercentageType()
public Metric setOptimizedBestValue(Boolean b)
public Boolean isOptimizedBestValue()
public Boolean isHidden()
public Metric setHidden(Boolean hidden)
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public Metric merge(Metric with)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |