Record Class LoopSignal.LoopSignalDetails

java.lang.Object
java.lang.Record
org.daiitech.naftah.parser.LoopSignal.LoopSignalDetails
Record Components:
signal - the control signal (must not be null)
sourceLabel - label associated with the source of the signal, may be null
targetLabel - label indicating the intended target for the signal, may be null
result - optional result value to carry with the signal, may be null
Enclosing class:
LoopSignal

public static record LoopSignal.LoopSignalDetails(LoopSignal signal, String sourceLabel, String targetLabel, Object result) extends Record
Encapsulates details about a loop signal, including the type of signal, optional labels for control flow, and an optional result value.
  • Field Details

    • signal

      private final LoopSignal signal
      The field for the signal record component.
    • sourceLabel

      private final String sourceLabel
      The field for the sourceLabel record component.
    • targetLabel

      private final String targetLabel
      The field for the targetLabel record component.
    • result

      private final Object result
      The field for the result record component.
  • Constructor Details

  • Method Details

    • of

      public static LoopSignal.LoopSignalDetails of(LoopSignal signal, String sourceLabel, String targetLabel, Object result)
      Factory method to create a LoopSignal.LoopSignalDetails with all fields specified.
      Parameters:
      signal - the control signal (non-null)
      sourceLabel - the source label (can be null)
      targetLabel - the target label (can be null)
      result - the result object (can be null)
      Returns:
      a new instance of LoopSignal.LoopSignalDetails
    • of

      public static LoopSignal.LoopSignalDetails of(LoopSignal signal, String sourceLabel, String targetLabel)
      Factory method to create a LoopSignal.LoopSignalDetails with no result value.
      Parameters:
      signal - the control signal (non-null)
      sourceLabel - the source label (can be null)
      targetLabel - the target label (can be null)
      Returns:
      a new instance of LoopSignal.LoopSignalDetails
    • of

      public static LoopSignal.LoopSignalDetails of(LoopSignal signal, Object result)
      Factory method to create a LoopSignal.LoopSignalDetails with only signal and result.
      Parameters:
      signal - the control signal (non-null)
      result - the result object (can be null)
      Returns:
      a new instance of LoopSignal.LoopSignalDetails
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • signal

      public LoopSignal signal()
      Returns the value of the signal record component.
      Returns:
      the value of the signal record component
    • sourceLabel

      public String sourceLabel()
      Returns the value of the sourceLabel record component.
      Returns:
      the value of the sourceLabel record component
    • targetLabel

      public String targetLabel()
      Returns the value of the targetLabel record component.
      Returns:
      the value of the targetLabel record component
    • result

      public Object result()
      Returns the value of the result record component.
      Returns:
      the value of the result record component