Package net.solarnetwork.domain
Class BasicDeviceInfo.Builder
java.lang.Object
net.solarnetwork.domain.BasicDeviceInfo.Builder
- Enclosing class:
- BasicDeviceInfo
Builder to build
BasicDeviceInfo.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new instance from this builder.booleanisEmpty()Test if all fields are null or empty.withDeviceAddress(String deviceAddress) Configure a device address.withManufactureDate(LocalDate manufactureDate) Configure a manufacture date.withManufacturer(String manufacturer) Configure a manufacturer.withModelName(String modelName) Configure a model name.Configure a name.withSerialNumber(String serialNumber) Configure a serial number.withVersion(String version) Configure a version.
-
Method Details
-
withName
Configure a name.- Parameters:
name- the value to set- Returns:
- this instance
-
withManufacturer
Configure a manufacturer.- Parameters:
manufacturer- the value to set- Returns:
- this instance
-
withModelName
Configure a model name.- Parameters:
modelName- the value to set- Returns:
- this instance
-
withVersion
Configure a version.- Parameters:
version- the value to set- Returns:
- this instance
-
withSerialNumber
Configure a serial number.- Parameters:
serialNumber- the value to set- Returns:
- this instance
-
withManufactureDate
Configure a manufacture date.- Parameters:
manufactureDate- the value to set- Returns:
- this instance
-
withDeviceAddress
Configure a device address.- Parameters:
deviceAddress- the value to set- Returns:
- this instance
-
build
Create a new instance from this builder.- Returns:
- the new instance
-
isEmpty
public boolean isEmpty()Test if all fields are null or empty.- Returns:
- true if all fields are null or empty
-