Record Class FC16WriteRegistersTask.MergedWriteRegisters
java.lang.Object
java.lang.Record
io.openems.edge.bridge.modbus.api.task.FC16WriteRegistersTask.MergedWriteRegisters
- Enclosing class:
FC16WriteRegistersTask
-
Constructor Summary
ModifierConstructorDescriptionprotected
MergedWriteRegisters
(int startAddress, List<com.ghgande.j2mod.modbus.procimg.Register> registers) Creates an instance of aMergedWriteRegisters
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(com.ghgande.j2mod.modbus.procimg.Register... registers) final boolean
Indicates whether some other object is "equal to" this one.int
com.ghgande.j2mod.modbus.procimg.Register[]
final int
hashCode()
Returns a hash code value for this object.of
(int startAddress) List
<com.ghgande.j2mod.modbus.procimg.Register> Returns the value of theregisters
record component.int
Returns the value of thestartAddress
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MergedWriteRegisters
protected MergedWriteRegisters(int startAddress, List<com.ghgande.j2mod.modbus.procimg.Register> registers) Creates an instance of aMergedWriteRegisters
record class.- Parameters:
startAddress
- the value for thestartAddress
record componentregisters
- the value for theregisters
record component
-
-
Method Details
-
of
-
add
public void add(com.ghgande.j2mod.modbus.procimg.Register... registers) -
getRegisters
public com.ghgande.j2mod.modbus.procimg.Register[] getRegisters() -
getLastAddress
public int getLastAddress() -
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 '=='. -
startAddress
public int startAddress()Returns the value of thestartAddress
record component.- Returns:
- the value of the
startAddress
record component
-
registers
Returns the value of theregisters
record component.- Returns:
- the value of the
registers
record component
-