Record Class JSONModelRecord
java.lang.Object
java.lang.Record
app.valuationcontrol.multimodule.library.records.JSONRecords.JSONModelRecord
public record JSONModelRecord(String name, int nbHistoricalPeriod, int nbForecastPeriod, int startYear, JSONArea[] areas, JSONVariable[] variables, JSONVariableValue[] variableValues, JSONSegment[] segments)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionJSONModelRecord(String name, int nbHistoricalPeriod, int nbForecastPeriod, int startYear, JSONArea[] areas, JSONVariable[] variables, JSONVariableValue[] variableValues, JSONSegment[] segments) Creates an instance of aJSONModelRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionJSONArea[]areas()Returns the value of theareasrecord component.final booleanIndicates whether some other object is "equal to" this one.getModel()final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.intReturns the value of thenbForecastPeriodrecord component.intReturns the value of thenbHistoricalPeriodrecord component.segments()Returns the value of thesegmentsrecord component.intReturns the value of thestartYearrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevariablesrecord component.Returns the value of thevariableValuesrecord component.
-
Constructor Details
-
JSONModelRecord
public JSONModelRecord(String name, int nbHistoricalPeriod, int nbForecastPeriod, int startYear, JSONArea[] areas, JSONVariable[] variables, JSONVariableValue[] variableValues, JSONSegment[] segments) Creates an instance of aJSONModelRecordrecord class.- Parameters:
name- the value for thenamerecord componentnbHistoricalPeriod- the value for thenbHistoricalPeriodrecord componentnbForecastPeriod- the value for thenbForecastPeriodrecord componentstartYear- the value for thestartYearrecord componentareas- the value for theareasrecord componentvariables- the value for thevariablesrecord componentvariableValues- the value for thevariableValuesrecord componentsegments- the value for thesegmentsrecord component
-
-
Method Details
-
getModel
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
nbHistoricalPeriod
public int nbHistoricalPeriod()Returns the value of thenbHistoricalPeriodrecord component.- Returns:
- the value of the
nbHistoricalPeriodrecord component
-
nbForecastPeriod
public int nbForecastPeriod()Returns the value of thenbForecastPeriodrecord component.- Returns:
- the value of the
nbForecastPeriodrecord component
-
startYear
public int startYear()Returns the value of thestartYearrecord component.- Returns:
- the value of the
startYearrecord component
-
areas
Returns the value of theareasrecord component.- Returns:
- the value of the
areasrecord component
-
variables
Returns the value of thevariablesrecord component.- Returns:
- the value of the
variablesrecord component
-
variableValues
Returns the value of thevariableValuesrecord component.- Returns:
- the value of the
variableValuesrecord component
-
segments
Returns the value of thesegmentsrecord component.- Returns:
- the value of the
segmentsrecord component
-