⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 weatherset.java

📁 android项目实战 7个经典的例子
💻 JAVA
字号:
package com.yarin.android.CityWeather;

import java.util.ArrayList;

public class WeatherSet
{
	//实时天气信息
	private WeatherCurrentCondition myCurrentCondition = null; 
	//预报的后四天的天气信息
    private ArrayList<WeatherForecastCondition> myForecastConditions = 
         							new ArrayList<WeatherForecastCondition>();
    
    public WeatherSet()
	{

	}
    
    //得到实时天气信息的对象
	public WeatherCurrentCondition getMyCurrentCondition()
	{
		return myCurrentCondition;
	}

	//设置实时天气信息的对象
	public void setMyCurrentCondition(WeatherCurrentCondition myCurrentCondition)
	{
		this.myCurrentCondition = myCurrentCondition;
	}

	//得到预报天气
	public ArrayList<WeatherForecastCondition> getMyForecastConditions()
	{
		return myForecastConditions;
	}

	//得到最后一个预报天气
	//这里我们每次添加一个数据都是在最后
	//所以得到最后一个
	public WeatherForecastCondition getLastForecastCondition()
	{
		return myForecastConditions.get(myForecastConditions.size() - 1);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -