Package br.unip.aps.sorting
Record Class OperationMetrics
java.lang.Object
java.lang.Record
br.unip.aps.sorting.OperationMetrics
- All Implemented Interfaces:
Serializable
public record OperationMetrics(long comparacoes, long trocas, long atribuicoes, long leituras, long nanos)
extends Record
implements Serializable
Resultado imutavel da contagem de operacoes de uma execucao de ordenacao.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOperationMetrics(long comparacoes, long trocas, long atribuicoes, long leituras, long nanos) Creates an instance of aOperationMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongacessos()longReturns the value of theatribuicoesrecord component.longReturns the value of thecomparacoesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longleituras()Returns the value of theleiturasrecord component.doublemillis()longnanos()Returns the value of thenanosrecord component.toString()Returns a string representation of this record class.longtrocas()Returns the value of thetrocasrecord component.
-
Constructor Details
-
OperationMetrics
public OperationMetrics(long comparacoes, long trocas, long atribuicoes, long leituras, long nanos) Creates an instance of aOperationMetricsrecord class.- Parameters:
comparacoes- the value for thecomparacoesrecord componenttrocas- the value for thetrocasrecord componentatribuicoes- the value for theatribuicoesrecord componentleituras- the value for theleiturasrecord componentnanos- the value for thenanosrecord component
-
-
Method Details
-
acessos
public long acessos() -
millis
public double millis() -
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 with '=='. -
comparacoes
public long comparacoes()Returns the value of thecomparacoesrecord component.- Returns:
- the value of the
comparacoesrecord component
-
trocas
public long trocas()Returns the value of thetrocasrecord component.- Returns:
- the value of the
trocasrecord component
-
atribuicoes
public long atribuicoes()Returns the value of theatribuicoesrecord component.- Returns:
- the value of the
atribuicoesrecord component
-
leituras
public long leituras()Returns the value of theleiturasrecord component.- Returns:
- the value of the
leiturasrecord component
-
nanos
public long nanos()Returns the value of thenanosrecord component.- Returns:
- the value of the
nanosrecord component
-