Class WeatherServiceImpl

java.lang.Object
my.uum.service.impl.WeatherServiceImpl
All Implemented Interfaces:
WeatherService

public class WeatherServiceImpl extends Object implements WeatherService
Implementation of the WeatherService interface for retrieving weather data.
  • Constructor Details

    • WeatherServiceImpl

      public WeatherServiceImpl()
  • Method Details

    • getWeather

      public String getWeather(String city)
      Retrieves the weather information for a specified city.
      Specified by:
      getWeather in interface WeatherService
      Parameters:
      city - the name of the city
      Returns:
      the weather information as a string
    • getAvailableCities

      public List<String> getAvailableCities()
      Retrieves a list of available cities for weather information.
      Specified by:
      getAvailableCities in interface WeatherService
      Returns:
      a list of available cities
    • getCitiesByState

      public Map<String,List<String>> getCitiesByState()
      Retrieves a map of cities by state.
      Specified by:
      getCitiesByState in interface WeatherService
      Returns:
      a map of cities by state
    • getHierarchicalLocations

      public LocationHierarchy getHierarchicalLocations()
      Retrieves a hierarchical structure of locations.
      Specified by:
      getHierarchicalLocations in interface WeatherService
      Returns:
      a LocationHierarchy object representing the hierarchical structure of locations