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

    Constructors
    Constructor
    Description
    OperationMetrics(long comparacoes, long trocas, long atribuicoes, long leituras, long nanos)
    Creates an instance of a OperationMetrics record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    long
    Returns the value of the atribuicoes record component.
    long
    Returns the value of the comparacoes record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the leituras record component.
    double
     
    long
    Returns the value of the nanos record component.
    Returns a string representation of this record class.
    long
    Returns the value of the trocas record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OperationMetrics

      public OperationMetrics(long comparacoes, long trocas, long atribuicoes, long leituras, long nanos)
      Creates an instance of a OperationMetrics record class.
      Parameters:
      comparacoes - the value for the comparacoes record component
      trocas - the value for the trocas record component
      atribuicoes - the value for the atribuicoes record component
      leituras - the value for the leituras record component
      nanos - the value for the nanos record component
  • Method Details

    • acessos

      public long acessos()
    • millis

      public double millis()
    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • comparacoes

      public long comparacoes()
      Returns the value of the comparacoes record component.
      Returns:
      the value of the comparacoes record component
    • trocas

      public long trocas()
      Returns the value of the trocas record component.
      Returns:
      the value of the trocas record component
    • atribuicoes

      public long atribuicoes()
      Returns the value of the atribuicoes record component.
      Returns:
      the value of the atribuicoes record component
    • leituras

      public long leituras()
      Returns the value of the leituras record component.
      Returns:
      the value of the leituras record component
    • nanos

      public long nanos()
      Returns the value of the nanos record component.
      Returns:
      the value of the nanos record component