Package records
Record Class Address
java.lang.Object
java.lang.Record
records.Address
- Record Components:
cityName- the name of the citycityCode- the city codecountryName- the name of the countrycountryCode- the ISO country codestateCode- the state/province coderegionCode- the region code
public record Address(String cityName, String cityCode, String countryName, String countryCode, String stateCode, String regionCode)
extends Record
Record representing an address in the Amadeus API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncityCode()Returns the value of thecityCoderecord component.cityName()Returns the value of thecityNamerecord component.Returns the value of thecountryCoderecord component.Returns the value of thecountryNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theregionCoderecord component.Returns the value of thestateCoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Address
public Address(String cityName, String cityCode, String countryName, String countryCode, String stateCode, String regionCode) Creates an instance of aAddressrecord class.- Parameters:
cityName- the value for thecityNamerecord componentcityCode- the value for thecityCoderecord componentcountryName- the value for thecountryNamerecord componentcountryCode- the value for thecountryCoderecord componentstateCode- the value for thestateCoderecord componentregionCode- the value for theregionCoderecord 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). -
cityName
Returns the value of thecityNamerecord component.- Returns:
- the value of the
cityNamerecord component
-
cityCode
Returns the value of thecityCoderecord component.- Returns:
- the value of the
cityCoderecord component
-
countryName
Returns the value of thecountryNamerecord component.- Returns:
- the value of the
countryNamerecord component
-
countryCode
Returns the value of thecountryCoderecord component.- Returns:
- the value of the
countryCoderecord component
-
stateCode
Returns the value of thestateCoderecord component.- Returns:
- the value of the
stateCoderecord component
-
regionCode
Returns the value of theregionCoderecord component.- Returns:
- the value of the
regionCoderecord component
-