Record Class TradeFlowAnalyzer.Country
java.lang.Object
java.lang.Record
org.episteme.social.economics.TradeFlowAnalyzer.Country
- Enclosing class:
TradeFlowAnalyzer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.gdp()Returns the value of thegdprecord component.final inthashCode()Returns a hash code value for this object.doublelatitude()Returns the value of thelatituderecord component.doubleReturns the value of thelongituderecord component.name()Returns the value of thenamerecord component.Returns the value of thepopulationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Country
public Country(String code, String name, Real gdp, Real population, double latitude, double longitude) Creates an instance of aCountryrecord class.- Parameters:
code- the value for thecoderecord componentname- the value for thenamerecord componentgdp- the value for thegdprecord componentpopulation- the value for thepopulationrecord componentlatitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
gdp
Returns the value of thegdprecord component.- Returns:
- the value of the
gdprecord component
-
population
Returns the value of thepopulationrecord component.- Returns:
- the value of the
populationrecord component
-
latitude
public double latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
public double longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-