Record Class AreaInfo
java.lang.Object
java.lang.Record
cz.krystofcejchan.lite_weather_lib.weather_objects.subparts.nearest_area.details.AreaInfo
public record AreaInfo(String name, String latitude, String longitude, String population, String region)
extends Record
record
more info for
more info for
NearestArea- Version:
- 17
- Author:
- krystof-cejchan
-
Constructor Summary
Constructors -
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.latitude()Returns the value of thelatituderecord component.Returns the value of thelongituderecord component.name()Returns the value of thenamerecord component.Returns the value of thepopulationrecord component.region()Returns the value of theregionrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
AreaInfo
Creates an instance of aAreaInforecord class.- Parameters:
name- the value for thenamerecord componentlatitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentpopulation- the value for thepopulationrecord componentregion- the value for theregionrecord 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 withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
latitude
Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
population
Returns the value of thepopulationrecord component.- Returns:
- the value of the
populationrecord component
-
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-