public class Forecast
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
ConditionCode,
Serialized Form| Constructor and Description |
|---|
Forecast()
Simple constructor.
|
Forecast(java.lang.String day,
java.util.Date date,
int low,
int high,
java.lang.String text,
ConditionCode code) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
ConditionCode |
getCode()
Condition code
|
java.util.Date |
getDate()
For date.
|
java.lang.String |
getDay()
Day of week
|
int |
getHigh()
High temperature
|
int |
getLow()
Low temperature.
|
java.lang.String |
getText()
Text summary
|
int |
hashCode() |
void |
setCode(ConditionCode code)
Condition code
|
void |
setDate(java.util.Date date)
For date.
|
void |
setDay(java.lang.String day)
Day of week
|
void |
setHigh(int high)
High temperature
|
void |
setLow(int low)
Low temperature
|
void |
setText(java.lang.String text)
Text summary
|
java.lang.String |
toString() |
public Forecast()
public Forecast(java.lang.String day,
java.util.Date date,
int low,
int high,
java.lang.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 java.lang.String getDay()
public void setDay(java.lang.String day)
day - day of the week to which this forecast applies. Possible values are Mon Tue Wed
Thu Fri Sat Sun (string)public java.util.Date getDate()
public void setDate(java.util.Date date)
date - the date to which this forecast appliespublic int getLow()
Unitspublic void setLow(int low)
low - the forecasted low temperature for this dayUnitspublic int getHigh()
Unitspublic void setHigh(int high)
high - the forecasted high temperature for this dayUnitspublic java.lang.String getText()
public void setText(java.lang.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 forecastpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.ObjectCopyright © 2025. All rights reserved.