Package br.unip.aps.sorting
Record Class GravadorPassos.Passo
java.lang.Object
java.lang.Record
br.unip.aps.sorting.GravadorPassos.Passo
- Enclosing class:
GravadorPassos
Um passo: tipo, posicoes envolvidas (-1 quando nao ha) e o valor escrito, nas atribuicoes.
-
Constructor Summary
ConstructorsConstructorDescriptionPasso(int tipo, int i, int j, int valor) Creates an instance of aPassorecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inti()Returns the value of theirecord component.intj()Returns the value of thejrecord component.inttipo()Returns the value of thetiporecord component.final StringtoString()Returns a string representation of this record class.intvalor()Returns the value of thevalorrecord component.
-
Constructor Details
-
Passo
public Passo(int tipo, int i, int j, int valor) Creates an instance of aPassorecord class.- Parameters:
tipo- the value for thetiporecord componenti- the value for theirecord componentj- the value for thejrecord componentvalor- the value for thevalorrecord 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. All components in this record class are compared with '=='. -
tipo
public int tipo()Returns the value of thetiporecord component.- Returns:
- the value of the
tiporecord component
-
i
public int i()Returns the value of theirecord component.- Returns:
- the value of the
irecord component
-
j
public int j()Returns the value of thejrecord component.- Returns:
- the value of the
jrecord component
-
valor
public int valor()Returns the value of thevalorrecord component.- Returns:
- the value of the
valorrecord component
-