Record Class ThreadSafetyChecker.CheckResult
java.lang.Object
java.lang.Record
cloud.opencode.base.test.concurrent.ThreadSafetyChecker.CheckResult
- Record Components:
passed- whether check passed | 检查是否通过expected- expected value | 期望值actual- actual value | 实际值difference- difference | 差异
- Enclosing class:
ThreadSafetyChecker
public static record ThreadSafetyChecker.CheckResult(boolean passed, int expected, int actual, int difference)
extends Record
Check result
检查结果
- Since:
- JDK 25, opencode-base-test V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionCheckResult(boolean passed, int expected, int actual, int difference) Creates an instance of aCheckResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleaccuracy()intactual()Returns the value of theactualrecord component.intReturns the value of thedifferencerecord component.final booleanIndicates whether some other object is "equal to" this one.intexpected()Returns the value of theexpectedrecord component.final inthashCode()Returns a hash code value for this object.booleanpassed()Returns the value of thepassedrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
CheckResult
public CheckResult(boolean passed, int expected, int actual, int difference) Creates an instance of aCheckResultrecord class.- Parameters:
passed- the value for thepassedrecord componentexpected- the value for theexpectedrecord componentactual- the value for theactualrecord componentdifference- the value for thedifferencerecord component
-
-
Method Details
-
accuracy
public double accuracy() -
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
passed
-
expected
-
actual
-
difference
public int difference()Returns the value of thedifferencerecord component.- Returns:
- the value of the
differencerecord component
-