Package org.daiitech.naftah.parser
Record Class LoopSignal.LoopSignalDetails
java.lang.Object
java.lang.Record
org.daiitech.naftah.parser.LoopSignal.LoopSignalDetails
- Record Components:
signal- the control signal (must not benull)sourceLabel- label associated with the source of the signal, may benulltargetLabel- label indicating the intended target for the signal, may benullresult- optional result value to carry with the signal, may benull
- 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 Summary
FieldsModifier and TypeFieldDescriptionprivate final ObjectThe field for theresultrecord component.private final LoopSignalThe field for thesignalrecord component.private final StringThe field for thesourceLabelrecord component.private final StringThe field for thetargetLabelrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLoopSignalDetails(LoopSignal signal, String sourceLabel, String targetLabel, Object result) Creates a new instance ofLoopSignal.LoopSignalDetailswith validation. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static LoopSignal.LoopSignalDetailsof(LoopSignal signal, Object result) Factory method to create aLoopSignal.LoopSignalDetailswith only signal and result.static LoopSignal.LoopSignalDetailsof(LoopSignal signal, String sourceLabel, String targetLabel) Factory method to create aLoopSignal.LoopSignalDetailswith no result value.static LoopSignal.LoopSignalDetailsof(LoopSignal signal, String sourceLabel, String targetLabel, Object result) Factory method to create aLoopSignal.LoopSignalDetailswith all fields specified.result()Returns the value of theresultrecord component.signal()Returns the value of thesignalrecord component.Returns the value of thesourceLabelrecord component.Returns the value of thetargetLabelrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
signal
The field for thesignalrecord component. -
sourceLabel
The field for thesourceLabelrecord component. -
targetLabel
The field for thetargetLabelrecord component. -
result
The field for theresultrecord component.
-
-
Constructor Details
-
LoopSignalDetails
Creates a new instance ofLoopSignal.LoopSignalDetailswith validation.- Throws:
NaftahBugError- ifsignalisnull
-
-
Method Details
-
of
public static LoopSignal.LoopSignalDetails of(LoopSignal signal, String sourceLabel, String targetLabel, Object result) Factory method to create aLoopSignal.LoopSignalDetailswith all fields specified.- Parameters:
signal- the control signal (non-null)sourceLabel- the source label (can benull)targetLabel- the target label (can benull)result- the result object (can benull)- Returns:
- a new instance of
LoopSignal.LoopSignalDetails
-
of
public static LoopSignal.LoopSignalDetails of(LoopSignal signal, String sourceLabel, String targetLabel) Factory method to create aLoopSignal.LoopSignalDetailswith no result value.- Parameters:
signal- the control signal (non-null)sourceLabel- the source label (can benull)targetLabel- the target label (can benull)- Returns:
- a new instance of
LoopSignal.LoopSignalDetails
-
of
Factory method to create aLoopSignal.LoopSignalDetailswith only signal and result.- Parameters:
signal- the control signal (non-null)result- the result object (can benull)- Returns:
- a new instance of
LoopSignal.LoopSignalDetails
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
signal
Returns the value of thesignalrecord component.- Returns:
- the value of the
signalrecord component
-
sourceLabel
Returns the value of thesourceLabelrecord component.- Returns:
- the value of the
sourceLabelrecord component
-
targetLabel
Returns the value of thetargetLabelrecord component.- Returns:
- the value of the
targetLabelrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-