Package dev.digiried.wattpilot
Record Class WattpilotInfo
java.lang.Object
java.lang.Record
dev.digiried.wattpilot.WattpilotInfo
- Record Components:
serial- serial number of the wallboxhostname- hostname of the wallboxfriendlyName- friendly name of the wallbox, i.e. what is displayed in the appfirmwareVersion- firmware version of the wallboxprotocolVersion- protocol versionsecured- whether the connection has to be authenticated
public record WattpilotInfo(String serial, String hostname, String friendlyName, String firmwareVersion, int protocolVersion, boolean secured)
extends Record
Record for Wattpilot information received on connection establishment.
- Author:
- Florian Hotze - Initial contribution
-
Constructor Summary
ConstructorsConstructorDescriptionWattpilotInfo(String serial, String hostname, String friendlyName, String firmwareVersion, int protocolVersion, boolean secured) Creates an instance of aWattpilotInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirmwareVersionrecord component.Returns the value of thefriendlyNamerecord component.final inthashCode()Returns a hash code value for this object.hostname()Returns the value of thehostnamerecord component.intReturns the value of theprotocolVersionrecord component.booleansecured()Returns the value of thesecuredrecord component.serial()Returns the value of theserialrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WattpilotInfo
public WattpilotInfo(String serial, String hostname, String friendlyName, String firmwareVersion, int protocolVersion, boolean secured) Creates an instance of aWattpilotInforecord class.- Parameters:
serial- the value for theserialrecord componenthostname- the value for thehostnamerecord componentfriendlyName- the value for thefriendlyNamerecord componentfirmwareVersion- the value for thefirmwareVersionrecord componentprotocolVersion- the value for theprotocolVersionrecord componentsecured- the value for thesecuredrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
serial
Returns the value of theserialrecord component.- Returns:
- the value of the
serialrecord component
-
hostname
Returns the value of thehostnamerecord component.- Returns:
- the value of the
hostnamerecord component
-
friendlyName
Returns the value of thefriendlyNamerecord component.- Returns:
- the value of the
friendlyNamerecord component
-
firmwareVersion
Returns the value of thefirmwareVersionrecord component.- Returns:
- the value of the
firmwareVersionrecord component
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
secured
public boolean secured()Returns the value of thesecuredrecord component.- Returns:
- the value of the
securedrecord component
-