Interface Measurement
-
public interface Measurement
A measurement with a continuous numeric value (double) such as: angle, voltage, active power and so on. Can have properties in addition of explicit fields to add precisions about the measurement if necessary.- Author:
- Miora Ralambotiana
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Measurement.Side
Specify which side of the equipment the measurement is applied on.static class
Measurement.Type
Specify what is measured.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getId()
Get ID of the measurement if it exists.String
getProperty(String name)
Return property value associated to the given property name if it exists, else return null.Set<String>
getPropertyNames()
Get all the property names with values applied to this measurement.Measurement.Side
getSide()
Get which side the measurement is applied on (seeMeasurement.Side
).double
getStandardDeviation()
Get the standard deviation.Measurement.Type
getType()
Get the type of measurement (specify what is measured, seeMeasurement.Type
).double
getValue()
Get measurement value.boolean
isValid()
Get validity status of the measurement.Measurement
putProperty(String name, String property)
Put a given property value associated with a given property name.void
remove()
Remove the measurement from the equipment.Measurement
removeProperty(String name)
Remove the property value associated with the given property name if it exists.Measurement
setStandardDeviation(double standardDeviation)
Set the standard deviation.Measurement
setValid(boolean valid)
Set validity status of the measurement.Measurement
setValue(double value)
Set measurement value.
-
-
-
Method Detail
-
getId
String getId()
Get ID of the measurement if it exists. It is optional (can be null).
-
getType
Measurement.Type getType()
Get the type of measurement (specify what is measured, seeMeasurement.Type
).
-
getPropertyNames
Set<String> getPropertyNames()
Get all the property names with values applied to this measurement.
-
getProperty
String getProperty(String name)
Return property value associated to the given property name if it exists, else return null.
-
putProperty
Measurement putProperty(String name, String property)
Put a given property value associated with a given property name.
-
removeProperty
Measurement removeProperty(String name)
Remove the property value associated with the given property name if it exists. Else, do nothing.
-
setValue
Measurement setValue(double value)
Set measurement value. Can not be NaN if the measurement is valid.
-
getValue
double getValue()
Get measurement value.
-
setStandardDeviation
Measurement setStandardDeviation(double standardDeviation)
Set the standard deviation.
-
getStandardDeviation
double getStandardDeviation()
Get the standard deviation. Return NaN if unspecified.
-
isValid
boolean isValid()
Get validity status of the measurement. If it is true (i.e. the measurement is valid), the measured value can not be NaN.
-
setValid
Measurement setValid(boolean valid)
Set validity status of the measurement. If it is true (i.e. the measurement is valid), the measured value can not be NaN.
-
getSide
Measurement.Side getSide()
Get which side the measurement is applied on (seeMeasurement.Side
).
-
remove
void remove()
Remove the measurement from the equipment.
-
-