Package net.datafaker

Class Weather

java.lang.Object
net.datafaker.Weather

public class Weather extends Object
A generator for weather data.
Since:
0.8.0
  • Constructor Details

    • Weather

      protected Weather(Faker faker)
  • Method Details

    • description

      public String description()
      Generates a short weather description.
    • temperatureCelsius

      public String temperatureCelsius()
      Generates a random temperature celsius between -30 and 38 degrees.
      Returns:
      String that represents temperature in format 5°C
    • temperatureFahrenheit

      public String temperatureFahrenheit()
      Generates a random temperature fahrenheit between -22 and 100 degrees.
      Returns:
      String that represents temperature in format 5°F
    • temperatureCelsius

      public String temperatureCelsius(int minTemperature, int maxTemperature)
      Generates a random temperature celsius between two temperatures.
      Parameters:
      minTemperature - the minimal temperature
      maxTemperature - the maximal temperature
      Returns:
      String that represents temperature in format 5°C
    • temperatureFahrenheit

      public String temperatureFahrenheit(int minTemperature, int maxTemperature)
      Generates a random temperature fahrenheit between two temperatures.
      Parameters:
      minTemperature - the minimal temperature
      maxTemperature - the maximal temperature
      Returns:
      String that represents temperature in format 5°F