Interface DiscreteMeasurement
public interface DiscreteMeasurement
A measurement with a discrete value (string, boolean or int) such as: tap position, switch position and so on.
Can have properties in addition of explicit fields to add precisions about the measurement if necessary.
- Author:
- Miora Ralambotiana <miora.ralambotiana at rte-france.com>
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
If it is the modelization of a tap position (or any discrete measurement on a tap changer), can explicit which tap changer of the transformer it is applied on.static enum
Specify what is measured.static enum
Explicit what type of discrete value is used for this measurement (boolean, int or string). -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Get ID of the measurement if it exists.getProperty
(String name) Return property value associated to the given property name if it exists, else return null.Get all the property names with values applied to this measurement.Get the tap changer the measurement is applied on if necessary (seeDiscreteMeasurement.TapChanger
).getType()
Get the type of the measurement (specify what it is measured, seeDiscreteMeasurement.Type
).boolean
Get value as boolean if the type of measured discrete value is BOOLEAN (seeDiscreteMeasurement.ValueType
).int
Get value as int if the type of measured discrete value is INT (seeDiscreteMeasurement.ValueType
).Get value as String if the type of measured discrete value is STRING (seeDiscreteMeasurement.ValueType
).Get the type of measured discrete value (int, boolean or string, seeDiscreteMeasurement.ValueType
).boolean
isValid()
Get validity status of the 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.removeProperty
(String name) Remove the property value associated with the given property name if it exists.setValid
(boolean valid) Set validity status of the measurement.setValue
(boolean value) Set the discrete measured value and set the value type as BOOLEAN (seeDiscreteMeasurement.ValueType
).setValue
(int value) Set the discrete measured value and set the value type as INT (seeDiscreteMeasurement.ValueType
).Set the discrete measured value and set the value type as STRING (seeDiscreteMeasurement.ValueType
).
-
Method Details
-
getId
String getId()Get ID of the measurement if it exists. It is optional (can be null). -
getType
DiscreteMeasurement.Type getType()Get the type of the measurement (specify what it is measured, seeDiscreteMeasurement.Type
). -
getTapChanger
DiscreteMeasurement.TapChanger getTapChanger()Get the tap changer the measurement is applied on if necessary (seeDiscreteMeasurement.TapChanger
). Must be null if the measurement is not applied to a tap changer. Throw an exception if the extended equipment is not a transformer. Must be not null if the measurement is not applied to a tap changer, else throw an exception. -
getPropertyNames
Get all the property names with values applied to this measurement. -
getProperty
Return property value associated to the given property name if it exists, else return null. -
putProperty
Put a given property value associated with a given property name. -
removeProperty
Remove the property value associated with the given property name if it exists. Else, do nothing. -
getValueType
DiscreteMeasurement.ValueType getValueType()Get the type of measured discrete value (int, boolean or string, seeDiscreteMeasurement.ValueType
). -
getValueAsString
String getValueAsString()Get value as String if the type of measured discrete value is STRING (seeDiscreteMeasurement.ValueType
). Else throw an exception. -
getValueAsInt
int getValueAsInt()Get value as int if the type of measured discrete value is INT (seeDiscreteMeasurement.ValueType
). Else throw an exception. -
getValueAsBoolean
boolean getValueAsBoolean()Get value as boolean if the type of measured discrete value is BOOLEAN (seeDiscreteMeasurement.ValueType
). Else throw an exception. -
setValue
Set the discrete measured value and set the value type as STRING (seeDiscreteMeasurement.ValueType
). Can not be null if the measurement is valid. -
setValue
Set the discrete measured value and set the value type as INT (seeDiscreteMeasurement.ValueType
). -
setValue
Set the discrete measured value and set the value type as BOOLEAN (seeDiscreteMeasurement.ValueType
). -
isValid
boolean isValid()Get validity status of the measurement. If it is true (i.e. the measurement is valid), the discrete measured value can not be null. -
setValid
Set validity status of the measurement. If it is true (i.e. the measurement is valid), the discrete measured value can not be null. -
remove
void remove()Remove the measurement from the equipment.
-