Package net.solarnetwork.domain
Class BasicNodeControlInfo
java.lang.Object
net.solarnetwork.domain.BasicNodeControlInfo
- All Implemented Interfaces:
NodeControlInfo
Basic implementation of
NodeControlInfo.- Since:
- 2.0
- Version:
- 1.0
- Author:
- matt
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBasicNodeControlInfo(String controlId, NodeControlPropertyType type, String value, Boolean readonly, String unit, String propertyName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic BasicNodeControlInfo.Builderbuilder()Creates builder to buildBasicNodeControlInfo.static BasicNodeControlInfo.BuilderbuilderFrom(NodeControlInfo info) Creates a builder to buildNodeControlInfoand initialize it with the given object.Get the control ID.Get an optional control property name.Get a read-only flag.getType()Get the control property type.getUnit()Get an optional unit of measure for the control value.getValue()Get the control value.
-
Constructor Details
-
BasicNodeControlInfo
public BasicNodeControlInfo(String controlId, NodeControlPropertyType type, String value, Boolean readonly, String unit, String propertyName) Constructor.- Parameters:
controlId- the control IDtype- the control typevalue- the control valuereadonly- the readonly flagunit- the unitpropertyName- the property name
-
-
Method Details
-
builder
Creates builder to buildBasicNodeControlInfo.- Returns:
- created builder
-
builderFrom
Creates a builder to buildNodeControlInfoand initialize it with the given object.- Parameters:
info- the object to initialize the builder with- Returns:
- created builder
-
getControlId
Description copied from interface:NodeControlInfoGet the control ID.- Specified by:
getControlIdin interfaceNodeControlInfo- Returns:
- the control ID
-
getPropertyName
Description copied from interface:NodeControlInfoGet an optional control property name.- Specified by:
getPropertyNamein interfaceNodeControlInfo- Returns:
- the control property name, or null
-
getType
Description copied from interface:NodeControlInfoGet the control property type.- Specified by:
getTypein interfaceNodeControlInfo- Returns:
- the property type
-
getValue
Description copied from interface:NodeControlInfoGet the control value.- Specified by:
getValuein interfaceNodeControlInfo- Returns:
- the value
-
getReadonly
Description copied from interface:NodeControlInfoGet a read-only flag.- Specified by:
getReadonlyin interfaceNodeControlInfo- Returns:
- the read-only flag
-
getUnit
Description copied from interface:NodeControlInfoGet an optional unit of measure for the control value.- Specified by:
getUnitin interfaceNodeControlInfo- Returns:
- the unit of measure, or null
-