Class DefaultMeasure<G extends java.io.Serializable>
- java.lang.Object
-
- org.sonar.api.batch.sensor.internal.DefaultStorable
-
- org.sonar.api.batch.sensor.measure.internal.DefaultMeasure<G>
-
- All Implemented Interfaces:
Measure<G>,NewMeasure<G>
public class DefaultMeasure<G extends java.io.Serializable> extends DefaultStorable implements Measure<G>, NewMeasure<G>
-
-
Field Summary
-
Fields inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
storage
-
-
Constructor Summary
Constructors Constructor Description DefaultMeasure()DefaultMeasure(SensorStorage storage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoSave()booleanequals(java.lang.Object obj)DefaultMeasure<G>forMetric(Metric<G> metric)Set the metric this measure belong to.inthashCode()InputComponentinputComponent()TheInputComponentthis measure belongs to.booleanisFromCore()For internal use.Metric<G>metric()The metric this measure belong to.DefaultMeasure<G>on(InputComponent component)TheInputComponentthe measure belongs to.DefaultMeasure<G>setFromCore()For internal use.Gvalue()Value of the measure.DefaultMeasure<G>withValue(G value)Value of the measure.-
Methods inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
save, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.api.batch.sensor.measure.NewMeasure
save
-
-
-
-
Constructor Detail
-
DefaultMeasure
public DefaultMeasure()
-
DefaultMeasure
public DefaultMeasure(@Nullable SensorStorage storage)
-
-
Method Detail
-
on
public DefaultMeasure<G> on(InputComponent component)
Description copied from interface:NewMeasureTheInputComponentthe measure belongs to. Mandatory.- Specified by:
onin interfaceNewMeasure<G extends java.io.Serializable>
-
forMetric
public DefaultMeasure<G> forMetric(Metric<G> metric)
Description copied from interface:NewMeasureSet the metric this measure belong to. To find a metric based on its key you can useMetricFinder.- Specified by:
forMetricin interfaceNewMeasure<G extends java.io.Serializable>
-
withValue
public DefaultMeasure<G> withValue(G value)
Description copied from interface:NewMeasureValue of the measure.- Specified by:
withValuein interfaceNewMeasure<G extends java.io.Serializable>
-
isFromCore
public boolean isFromCore()
For internal use.
-
setFromCore
public DefaultMeasure<G> setFromCore()
For internal use. Used by core components to bypass check that prevent a plugin to store core measures.
-
doSave
public void doSave()
- Specified by:
doSavein classDefaultStorable
-
metric
public Metric<G> metric()
Description copied from interface:MeasureThe metric this measure belong to.
-
inputComponent
public InputComponent inputComponent()
Description copied from interface:MeasureTheInputComponentthis measure belongs to.- Specified by:
inputComponentin interfaceMeasure<G extends java.io.Serializable>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-