Package br.unip.aps.busca
Record Class ServicoGeografico.Prefixo
java.lang.Object
java.lang.Record
br.unip.aps.busca.ServicoGeografico.Prefixo
- Enclosing class:
ServicoGeografico
public static record ServicoGeografico.Prefixo(String prefixo, List<String> nomes, int total, long passosTrie, long comparacoesLinear, int nomesDistintos)
extends Record
Resultado do autocompletar: nomes encontrados e custo da Trie contra a varredura de todos os nomes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecomparacoesLinearrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.nomes()Returns the value of thenomesrecord component.intReturns the value of thenomesDistintosrecord component.longReturns the value of thepassosTrierecord component.prefixo()Returns the value of theprefixorecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
Prefixo
public Prefixo(String prefixo, List<String> nomes, int total, long passosTrie, long comparacoesLinear, int nomesDistintos) Creates an instance of aPrefixorecord class.- Parameters:
prefixo- the value for theprefixorecord componentnomes- the value for thenomesrecord componenttotal- the value for thetotalrecord componentpassosTrie- the value for thepassosTrierecord componentcomparacoesLinear- the value for thecomparacoesLinearrecord componentnomesDistintos- the value for thenomesDistintosrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
prefixo
Returns the value of theprefixorecord component.- Returns:
- the value of the
prefixorecord component
-
nomes
Returns the value of thenomesrecord component.- Returns:
- the value of the
nomesrecord component
-
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
passosTrie
public long passosTrie()Returns the value of thepassosTrierecord component.- Returns:
- the value of the
passosTrierecord component
-
comparacoesLinear
public long comparacoesLinear()Returns the value of thecomparacoesLinearrecord component.- Returns:
- the value of the
comparacoesLinearrecord component
-
nomesDistintos
public int nomesDistintos()Returns the value of thenomesDistintosrecord component.- Returns:
- the value of the
nomesDistintosrecord component
-