org.sonar.api.measures
Class RuleMeasure

java.lang.Object
  extended by org.sonar.api.measures.Measure
      extended by org.sonar.api.measures.RuleMeasure

public class RuleMeasure
extends Measure

Since:
1.10

Field Summary
 
Fields inherited from class org.sonar.api.measures.Measure
alertStatus, alertText, characteristic, data, date, DEFAULT_PRECISION, description, diff1, diff2, diff3, MAX_TEXT_SIZE, metric, persistenceMode, tendency, url, value
 
Constructor Summary
RuleMeasure(Metric metric, Rule rule, RulePriority rulePriority, Integer ruleCategory)
          This constructor is for internal use only.
 
Method Summary
static RuleMeasure createForCategory(Metric metric, Integer category, Double value)
           
static RuleMeasure createForPriority(Metric metric, RulePriority priority, Double value)
           
static RuleMeasure createForRule(Metric metric, Rule rule, Double value)
           
 boolean equals(Object obj)
           
 Rule getRule()
           
 Integer getRuleCategory()
           
 RulePriority getRulePriority()
           
 int hashCode()
           
 void setRule(Rule rule)
           
 void setRuleCategory(Integer ruleCategory)
           
 void setRulePriority(RulePriority rulePriority)
           
 RuleMeasure setValue(Double v)
          Sets the measure value with the default precision of 1
 String toString()
           
 
Methods inherited from class org.sonar.api.measures.Measure
getAlertStatus, getAlertText, getCharacteristic, getData, getDataAsLevel, getDate, getDescription, getDiffValue1, getDiffValue2, getDiffValue3, getId, getIntValue, getMetric, getPersistenceMode, getTendency, getUrl, getValue, hasOptionalData, setAlertStatus, setAlertText, setCharacteristic, setData, setData, setDate, setDescription, setDiffValue1, setDiffValue2, setDiffValue3, setId, setIntValue, setMetric, setPersistenceMode, setTendency, setUrl, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleMeasure

public RuleMeasure(Metric metric,
                   Rule rule,
                   RulePriority rulePriority,
                   Integer ruleCategory)
This constructor is for internal use only. Please use static methods createForXXX().

Method Detail

getRule

public Rule getRule()

setRule

public void setRule(Rule rule)

getRulePriority

public RulePriority getRulePriority()

setRulePriority

public void setRulePriority(RulePriority rulePriority)

getRuleCategory

public Integer getRuleCategory()

setRuleCategory

public void setRuleCategory(Integer ruleCategory)

equals

public boolean equals(Object obj)
Overrides:
equals in class Measure

setValue

public RuleMeasure setValue(Double v)
Description copied from class: Measure
Sets the measure value with the default precision of 1

Overrides:
setValue in class Measure
Parameters:
v - the measure value
Returns:
the measure object instance

hashCode

public int hashCode()
Overrides:
hashCode in class Measure

toString

public String toString()
Overrides:
toString in class Measure

createForRule

public static RuleMeasure createForRule(Metric metric,
                                        Rule rule,
                                        Double value)

createForPriority

public static RuleMeasure createForPriority(Metric metric,
                                            RulePriority priority,
                                            Double value)

createForCategory

public static RuleMeasure createForCategory(Metric metric,
                                            Integer category,
                                            Double value)


Copyright © 2009-2010 SonarSource. All Rights Reserved.