Record Class AbstractBenchmarkRunner.GlobalStatisticsKey
java.lang.Object
java.lang.Record
it.univr.di.cstnu.util.AbstractBenchmarkRunner.GlobalStatisticsKey
- Record Components:
nodes- # of nodescontingents- # contingents
- All Implemented Interfaces:
Comparable<AbstractBenchmarkRunner.GlobalStatisticsKey>
- Enclosing class:
AbstractBenchmarkRunner
static record AbstractBenchmarkRunner.GlobalStatisticsKey(int nodes, int contingents)
extends Record
implements Comparable<AbstractBenchmarkRunner.GlobalStatisticsKey>
Represents a key composed by
(nodes, contingents) used to group the global statistics.
Implements a natural order based on the increasing pair (nodes, contingents).
- Author:
- posenato
-
Constructor Summary
ConstructorsConstructorDescriptionGlobalStatisticsKey(int nodes, int contingents) Creates an instance of aGlobalStatisticsKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintThe order is with respect to #nodes and, then, #contingents.intReturns the value of thecontingentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intnodes()Returns the value of thenodesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GlobalStatisticsKey
GlobalStatisticsKey(int nodes, int contingents) Creates an instance of aGlobalStatisticsKeyrecord class.- Parameters:
nodes- the value for thenodesrecord componentcontingents- the value for thecontingentsrecord component
-
-
Method Details
-
compareTo
The order is with respect to #nodes and, then, #contingents. It is consistent with the record-generatedequals.- Specified by:
compareToin interfaceComparable<AbstractBenchmarkRunner.GlobalStatisticsKey>- Parameters:
o- the object to be compared.- Returns:
- negative if this has, in order, fewer nodes or fewer contingents than the parameter 'o'; a positive value in the opposite case; 0 when both values are equal to the corresponding values in 'o'.
-
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. -
nodes
-
contingents
public int contingents()Returns the value of thecontingentsrecord component.- Returns:
- the value of the
contingentsrecord component
-