Package records

Record Class Address

Record Components:
cityName - the name of the city
cityCode - the city code
countryName - the name of the country
countryCode - the ISO country code
stateCode - the state/province code
regionCode - 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 Details

    • Address

      public Address(String cityName, String cityCode, String countryName, String countryCode, String stateCode, String regionCode)
      Creates an instance of a Address record class.
      Parameters:
      cityName - the value for the cityName record component
      cityCode - the value for the cityCode record component
      countryName - the value for the countryName record component
      countryCode - the value for the countryCode record component
      stateCode - the value for the stateCode record component
      regionCode - the value for the regionCode record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • cityName

      public String cityName()
      Returns the value of the cityName record component.
      Returns:
      the value of the cityName record component
    • cityCode

      public String cityCode()
      Returns the value of the cityCode record component.
      Returns:
      the value of the cityCode record component
    • countryName

      public String countryName()
      Returns the value of the countryName record component.
      Returns:
      the value of the countryName record component
    • countryCode

      public String countryCode()
      Returns the value of the countryCode record component.
      Returns:
      the value of the countryCode record component
    • stateCode

      public String stateCode()
      Returns the value of the stateCode record component.
      Returns:
      the value of the stateCode record component
    • regionCode

      public String regionCode()
      Returns the value of the regionCode record component.
      Returns:
      the value of the regionCode record component