org.sonar.api.batch.sensor.measure
Interface Measure<G extends Serializable>

All Known Implementing Classes:
DefaultMeasure

public interface Measure<G extends Serializable>

Builder to create new Measure.

Since:
5.0

Method Summary
 Measure<G> forMetric(Metric<G> metric)
          Set the metric this measure belong to.
 InputFile inputFile()
          The file the measure belong to.
 Metric<G> metric()
          The metric this measure belong to.
 Measure<G> onFile(InputFile file)
          The file the measure belongs to.
 Measure<G> onProject()
          Tell that the measure is global to the project.
 void save()
          Save the measure.
 G value()
          Value of the measure.
 Measure<G> withValue(G value)
          Value of the measure.
 

Method Detail

onFile

Measure<G> onFile(InputFile file)
The file the measure belongs to.


onProject

Measure<G> onProject()
Tell that the measure is global to the project.


inputFile

@CheckForNull
InputFile inputFile()
The file the measure belong to.

Returns:
null if measure is on project

forMetric

Measure<G> forMetric(Metric<G> metric)
Set the metric this measure belong to.


metric

Metric<G> metric()
The metric this measure belong to.


withValue

Measure<G> withValue(G value)
Value of the measure.


value

G value()
Value of the measure.


save

void save()
Save the measure. It is not permitted so save several measures of the same metric on the same file/project.



Copyright © 2009–2015 SonarSource. All rights reserved.