Package br.unip.aps.busca
Record Class Buscas.Intervalo
java.lang.Object
java.lang.Record
br.unip.aps.busca.Buscas.Intervalo
- Enclosing class:
Buscas
Faixa de posicoes [inicio, fim) de um vetor ordenado.
-
Constructor Summary
ConstructorsConstructorDescriptionIntervalo(int inicio, int fim) Creates an instance of aIntervalorecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfim()Returns the value of thefimrecord component.final inthashCode()Returns a hash code value for this object.intinicio()Returns the value of theiniciorecord component.inttamanho()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Intervalo
public Intervalo(int inicio, int fim) Creates an instance of aIntervalorecord class.- Parameters:
inicio- the value for theiniciorecord componentfim- the value for thefimrecord component
-
-
Method Details
-
tamanho
public int tamanho() -
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 '=='. -
inicio
public int inicio()Returns the value of theiniciorecord component.- Returns:
- the value of the
iniciorecord component
-
fim
public int fim()Returns the value of thefimrecord component.- Returns:
- the value of the
fimrecord component
-