Record Class ServicoConsultas.Custo

java.lang.Object
java.lang.Record
br.unip.aps.busca.ServicoConsultas.Custo
Enclosing class:
ServicoConsultas

public static record ServicoConsultas.Custo(ServicoConsultas.Metodo metodo, OperationMetrics construcao, OperationMetrics consultas, int quantidade, long resultados, boolean suportado, String detalhe) extends Record
Custo de responder um lote de consultas com um metodo.
  • Constructor Details

    • Custo

      public Custo(ServicoConsultas.Metodo metodo, OperationMetrics construcao, OperationMetrics consultas, int quantidade, long resultados, boolean suportado, String detalhe)
      Creates an instance of a Custo record class.
      Parameters:
      metodo - the value for the metodo record component
      construcao - the value for the construcao record component
      consultas - the value for the consultas record component
      quantidade - the value for the quantidade record component
      resultados - the value for the resultados record component
      suportado - the value for the suportado record component
      detalhe - the value for the detalhe record component
  • Method Details

    • comparacoesTotais

      public long comparacoesTotais()
    • comparacoesPorConsulta

      public double comparacoesPorConsulta()
    • nanosTotais

      public long nanosTotais()
    • pontoDeEquilibrio

      public double pontoDeEquilibrio(ServicoConsultas.Custo linear)
      Numero de consultas a partir do qual o preparo compensa em relacao a busca sequencial.
    • toString

      public final 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • metodo

      public ServicoConsultas.Metodo metodo()
      Returns the value of the metodo record component.
      Returns:
      the value of the metodo record component
    • construcao

      public OperationMetrics construcao()
      Returns the value of the construcao record component.
      Returns:
      the value of the construcao record component
    • consultas

      public OperationMetrics consultas()
      Returns the value of the consultas record component.
      Returns:
      the value of the consultas record component
    • quantidade

      public int quantidade()
      Returns the value of the quantidade record component.
      Returns:
      the value of the quantidade record component
    • resultados

      public long resultados()
      Returns the value of the resultados record component.
      Returns:
      the value of the resultados record component
    • suportado

      public boolean suportado()
      Returns the value of the suportado record component.
      Returns:
      the value of the suportado record component
    • detalhe

      public String detalhe()
      Returns the value of the detalhe record component.
      Returns:
      the value of the detalhe record component