Class Location

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class Location
    extends Object
    implements Serializable, Cloneable
    The location of this forecast. Attributes:
    • city: city name (string)
    • region: state, territory, or region, if given (string)
    • country: two-character country code. (string)
    See Also:
    Serialized Form
    • Constructor Detail

      • Location

        public Location()
      • Location

        public Location​(String city,
                        String region,
                        String country)
        Parameters:
        city - city name
        region - state, territory, or region, if given
        country - two-character country code.
    • Method Detail

      • getCity

        public String getCity()
        City name
        Returns:
        city name.
      • setCity

        public void setCity​(String city)
        City name
        Parameters:
        city - city name
      • getRegion

        public String getRegion()
        state, territory, or region, if given
        Returns:
        state, territory, or region, if given
      • setRegion

        public void setRegion​(String region)
        state, territory, or region, if given
        Parameters:
        region - state, territory, or region, if given
      • getCountry

        public String getCountry()
        country two-character country code.
        Returns:
        country two-character country code.
      • setCountry

        public void setCountry​(String country)
        country two-character country code.
        Parameters:
        country - country two-character country code.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object