Record Class Benchmark.ComparisonResult
java.lang.Object
java.lang.Record
cloud.opencode.base.test.benchmark.Benchmark.ComparisonResult
- Enclosing class:
Benchmark
public static record Benchmark.ComparisonResult(Benchmark.BenchmarkResult first, Benchmark.BenchmarkResult second)
extends Record
Comparison result
比较结果
- Since:
- JDK 25, opencode-base-test V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionComparisonResult(Benchmark.BenchmarkResult first, Benchmark.BenchmarkResult second) Creates an instance of aComparisonResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.first()Returns the value of thefirstrecord component.doublefinal inthashCode()Returns a hash code value for this object.second()Returns the value of thesecondrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
ComparisonResult
Creates an instance of aComparisonResultrecord class.- Parameters:
first- the value for thefirstrecord componentsecond- the value for thesecondrecord component
-
-
Method Details
-
getSpeedup
public double getSpeedup() -
getFaster
-
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 withObjects::equals(Object,Object). -
first
Returns the value of thefirstrecord component.- Returns:
- the value of the
firstrecord component
-
second
Returns the value of thesecondrecord component.- Returns:
- the value of the
secondrecord component
-