Class Condition
- java.lang.Object
-
- com.rometools.modules.yahooweather.types.Condition
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Condition extends Object implements Serializable, Cloneable
The current weather conditions. Attributes:- text: a textual description of conditions, for example, "Partly Cloudy" (string)
- code: the condition code for this forecast. You could use this code to choose a text description or image for the forecast. The possible values for this element are described in Condition Codes (integer)
- temp: the current temperature, in the units specified by the yweather:units element (integer)
- date: the current date and time for which this forecast applies. [ I believe this should be the time this condition information was captured] The date is in RFC822 Section 5 format, for example "Wed, 30 Nov 2005 1:56 pm PST" (string)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Condition()Condition(String text, ConditionCode code, int temperature, Date date)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()booleanequals(Object o)ConditionCodegetCode()Condition codeDategetDate()Date recordedintgetTemperature()Current TemperatureStringgetText()Description of conditioninthashCode()voidsetCode(ConditionCode code)Condition codevoidsetDate(Date date)Date recordedvoidsetTemperature(int temperature)Current TemperaturevoidsetText(String text)Description of conditionStringtoString()
-
-
-
Constructor Detail
-
Condition
public Condition()
-
Condition
public Condition(String text, ConditionCode code, int temperature, Date date)
- Parameters:
text- a textual description of conditions, for example, "Partly Cloudy"code- the condition code for this forecast.temperature- the current temperaturedate- the current date and time
-
-
Method Detail
-
getText
public String getText()
Description of condition- Returns:
- a textual description of conditions, for example, "Partly Cloudy"
-
setText
public void setText(String text)
Description of condition- Parameters:
text- a textual description of conditions, for example, "Partly Cloudy"
-
getCode
public ConditionCode getCode()
Condition code- Returns:
- condition code
-
setCode
public void setCode(ConditionCode code)
Condition code- Parameters:
code- Condition code
-
getTemperature
public int getTemperature()
Current Temperature- Returns:
- the current temperature
- See Also:
Units
-
setTemperature
public void setTemperature(int temperature)
Current Temperature- Parameters:
temperature- the current temperature- See Also:
Units
-
getDate
public Date getDate()
Date recorded- Returns:
- the current date and time
-
setDate
public void setDate(Date date)
Date recorded- Parameters:
date- the current date and time
-
-