public class Forecast
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
ConditionCode
,
Serialized FormModifier and Type | Field and Description |
---|---|
private ConditionCode |
code |
private java.util.Date |
date |
private java.lang.String |
day |
private EqualsBean |
equals |
private int |
high |
private int |
low |
private static long |
serialVersionUID |
private java.lang.String |
text |
private ToStringBean |
toString |
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() |
private static final long serialVersionUID
private transient ToStringBean toString
private transient EqualsBean equals
private java.lang.String day
private java.util.Date date
private int low
private int high
private java.lang.String text
private ConditionCode code
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()
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 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.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object