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 thecityCode
record component.cityName()
Returns the value of thecityName
record component.Returns the value of thecountryCode
record component.Returns the value of thecountryName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theregionCode
record component.Returns the value of thestateCode
record component.final String
toString()
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 aAddress
record class.- Parameters:
cityName
- the value for thecityName
record componentcityCode
- the value for thecityCode
record componentcountryName
- the value for thecountryName
record componentcountryCode
- the value for thecountryCode
record componentstateCode
- the value for thestateCode
record componentregionCode
- the value for theregionCode
record 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 thecityName
record component.- Returns:
- the value of the
cityName
record component
-
cityCode
Returns the value of thecityCode
record component.- Returns:
- the value of the
cityCode
record component
-
countryName
Returns the value of thecountryName
record component.- Returns:
- the value of the
countryName
record component
-
countryCode
Returns the value of thecountryCode
record component.- Returns:
- the value of the
countryCode
record component
-
stateCode
Returns the value of thestateCode
record component.- Returns:
- the value of the
stateCode
record component
-
regionCode
Returns the value of theregionCode
record component.- Returns:
- the value of the
regionCode
record component
-