Package br.unip.aps.analysis
Record Class Estatisticas.LinhaComparativo
java.lang.Object
java.lang.Record
br.unip.aps.analysis.Estatisticas.LinhaComparativo
- Enclosing class:
Estatisticas
public static record Estatisticas.LinhaComparativo(int mes, long anoA, long anoB, double variacao)
extends Record
Linha do comparativo mensal entre dois anos.
-
Constructor Summary
ConstructorsConstructorDescriptionLinhaComparativo(int mes, long anoA, long anoB, double variacao) Creates an instance of aLinhaComparativorecord class. -
Method Summary
Modifier and TypeMethodDescriptionlonganoA()Returns the value of theanoArecord component.longanoB()Returns the value of theanoBrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmes()Returns the value of themesrecord component.final StringtoString()Returns a string representation of this record class.doublevariacao()Returns the value of thevariacaorecord component.
-
Constructor Details
-
LinhaComparativo
public LinhaComparativo(int mes, long anoA, long anoB, double variacao) Creates an instance of aLinhaComparativorecord class.- Parameters:
mes- the value for themesrecord componentanoA- the value for theanoArecord componentanoB- the value for theanoBrecord componentvariacao- the value for thevariacaorecord 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 '=='. -
mes
public int mes()Returns the value of themesrecord component.- Returns:
- the value of the
mesrecord component
-
anoA
public long anoA()Returns the value of theanoArecord component.- Returns:
- the value of the
anoArecord component
-
anoB
public long anoB()Returns the value of theanoBrecord component.- Returns:
- the value of the
anoBrecord component
-
variacao
public double variacao()Returns the value of thevariacaorecord component.- Returns:
- the value of the
variacaorecord component
-