public class Forecast extends Object implements Serializable, Cloneable
ConditionCode
,
Serialized FormConstructor and Description |
---|
Forecast()
Simple constructor.
|
Forecast(String day,
Date date,
int low,
int high,
String text,
ConditionCode code) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
equals(Object o) |
ConditionCode |
getCode()
Condition code
|
Date |
getDate()
For date.
|
String |
getDay()
Day of week
|
int |
getHigh()
High temperature
|
int |
getLow()
Low temperature.
|
String |
getText()
Text summary
|
int |
hashCode() |
void |
setCode(ConditionCode code)
Condition code
|
void |
setDate(Date date)
For date.
|
void |
setDay(String day)
Day of week
|
void |
setHigh(int high)
High temperature
|
void |
setLow(int low)
Low temperature
|
void |
setText(String text)
Text summary
|
String |
toString() |
public Forecast()
public Forecast(String day, Date date, int low, int high, String text, ConditionCode code)
day
- day of the week to which this forecast applies. Possible values are Mon Tue Wed
Thu Fri Sat Sun (string)date
- the date to which this forecast applieslow
- the forecasted low temperature for this dayhigh
- the forecasted high temperature for this daytext
- a textual description of conditions, for example, "Partly Cloudy"code
- ConditionCode instance for this forcast.public String getDay()
public void setDay(String day)
day
- day of the week to which this forecast applies. Possible values are Mon Tue Wed
Thu Fri Sat Sun (string)public Date getDate()
public void setDate(Date date)
date
- the date to which this forecast appliespublic int getLow()
Units
public void setLow(int low)
low
- the forecasted low temperature for this dayUnits
public int getHigh()
Units
public void setHigh(int high)
high
- the forecasted high temperature for this dayUnits
public String getText()
public void setText(String text)
text
- a textual description of conditions, for example, "Partly Cloudy"public ConditionCode getCode()
public void setCode(ConditionCode code)
code
- the condition code for this forecastCopyright © 2024. All rights reserved.