Record Class LivelockDetector.DetectionResult
java.lang.Object
java.lang.Record
com.tnsai.coordination.choreography.LivelockDetector.DetectionResult
- Enclosing class:
LivelockDetector
public static record LivelockDetector.DetectionResult(List<LivelockDetector.Violation> violations, boolean circuitBroken)
extends Record
Result of livelock analysis.
-
Constructor Summary
ConstructorsConstructorDescriptionDetectionResult(List<LivelockDetector.Violation> violations, boolean circuitBroken) Creates an instance of aDetectionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecircuitBrokenrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns true if any livelock violation was found.safe()Returns a safe (no-livelock) result.final StringtoString()Returns a string representation of this record class.Returns the value of theviolationsrecord component.
-
Constructor Details
-
DetectionResult
Creates an instance of aDetectionResultrecord class.- Parameters:
violations- the value for theviolationsrecord componentcircuitBroken- the value for thecircuitBrokenrecord component
-
-
Method Details
-
hasLivelock
public boolean hasLivelock()Returns true if any livelock violation was found. -
safe
Returns a safe (no-livelock) result. -
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 '=='. -
violations
Returns the value of theviolationsrecord component.- Returns:
- the value of the
violationsrecord component
-
circuitBroken
public boolean circuitBroken()Returns the value of thecircuitBrokenrecord component.- Returns:
- the value of the
circuitBrokenrecord component
-