com.togethersoft.sca.core.plugin.metric
Interface IMetricResult


public interface IMetricResult

The metric result holds a measurement result for a single entity.

There are three possible kinds of results: integers, fractions, and void results.

If result is a fraction, you may specify it's numerator and denominator.

You can explicitly specify that result is void, but usually you don't need to do this since initially the result is void.


Method Summary
 int getLowerLimit()
          Returns the lower limit for this measurement.
 IMetricResult[] getResults()
          Returns the nested metric results.
 AstMember getSubject()
          Returns the subject of the measurement.
 IMetricSurvey getSurvey()
          Returns the survey to which this measurement result belongs.
 int getUpperLimit()
          Returns the upper limit for this measurement.
 int getValue()
          Returns the result value as an integer.
 void setValue(int value)
          Sets the result value to the given integer.
 void setValue(int numerator, int denominator)
          Sets the result value to the given fraction.
 void setVoid()
          Sets the result value to void.
 

Method Detail

getLowerLimit

public int getLowerLimit()
Returns the lower limit for this measurement. Returns -1 if the lower limit is not defined.

getResults

public IMetricResult[] getResults()
Returns the nested metric results.

getSubject

public AstMember getSubject()
Returns the subject of the measurement. Returns null if this is the top-level measurement result for the entire model.

getSurvey

public IMetricSurvey getSurvey()
Returns the survey to which this measurement result belongs.

getUpperLimit

public int getUpperLimit()
Returns the upper limit for this measurement. Returns -1 if the upper limit is not defined.

getValue

public int getValue()
Returns the result value as an integer.

If the result is fraction, returns corresponding percent. If the result is void, returns -1.

Returns:
the result value

setValue

public void setValue(int value)
Sets the result value to the given integer.

setValue

public void setValue(int numerator,
                     int denominator)
Sets the result value to the given fraction.

setVoid

public void setVoid()
Sets the result value to void.