Record Class Segment

java.lang.Object
java.lang.Record
org.applecommander.os.pascal.Segment

public record Segment(String name, String textInterface, DataBuffer data, Segment.Kind kind, int textAddr, int segNum, Segment.MachineType machineType, int version, Object[] dictionary) extends Record
  • Constructor Details

    • Segment

      public Segment(String name, String textInterface, DataBuffer data, Segment.Kind kind, int textAddr, int segNum, Segment.MachineType machineType, int version, Object[] dictionary)
      Creates an instance of a Segment record class.
      Parameters:
      name - the value for the name record component
      textInterface - the value for the textInterface record component
      data - the value for the data record component
      kind - the value for the kind record component
      textAddr - the value for the textAddr record component
      segNum - the value for the segNum record component
      machineType - the value for the machineType record component
      version - the value for the version record component
      dictionary - the value for the dictionary record component
  • Method Details

    • load

      public static Segment load(String name, int kind, int segInfo, DataBuffer data, DataBuffer textAddrBuf)
    • 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • textInterface

      public String textInterface()
      Returns the value of the textInterface record component.
      Returns:
      the value of the textInterface record component
    • data

      public DataBuffer data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • kind

      public Segment.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • textAddr

      public int textAddr()
      Returns the value of the textAddr record component.
      Returns:
      the value of the textAddr record component
    • segNum

      public int segNum()
      Returns the value of the segNum record component.
      Returns:
      the value of the segNum record component
    • machineType

      public Segment.MachineType machineType()
      Returns the value of the machineType record component.
      Returns:
      the value of the machineType record component
    • version

      public int version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • dictionary

      public Object[] dictionary()
      Returns the value of the dictionary record component.
      Returns:
      the value of the dictionary record component