Record Class FC16WriteRegistersTask.MergedWriteRegisters

java.lang.Object
java.lang.Record
io.openems.edge.bridge.modbus.api.task.FC16WriteRegistersTask.MergedWriteRegisters
Enclosing class:
FC16WriteRegistersTask

protected static record FC16WriteRegistersTask.MergedWriteRegisters(int startAddress, List<com.ghgande.j2mod.modbus.procimg.Register> registers) extends Record
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MergedWriteRegisters(int startAddress, List<com.ghgande.j2mod.modbus.procimg.Register> registers)
    Creates an instance of a MergedWriteRegisters record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    Returns a hash code value for this object.
    of(int startAddress)
     
    List<com.ghgande.j2mod.modbus.procimg.Register>
    Returns the value of the registers record component.
    int
    Returns the value of the startAddress record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MergedWriteRegisters

      protected MergedWriteRegisters(int startAddress, List<com.ghgande.j2mod.modbus.procimg.Register> registers)
      Creates an instance of a MergedWriteRegisters record class.
      Parameters:
      startAddress - the value for the startAddress record component
      registers - the value for the registers record component
  • Method Details

    • of

      public static FC16WriteRegistersTask.MergedWriteRegisters of(int startAddress)
    • 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • startAddress

      public int startAddress()
      Returns the value of the startAddress record component.
      Returns:
      the value of the startAddress record component
    • registers

      public List<com.ghgande.j2mod.modbus.procimg.Register> registers()
      Returns the value of the registers record component.
      Returns:
      the value of the registers record component