Code example for SparseArray

Methods: append

0
 
public class InitDataHandler { 
	/** 
	 * 初始化下载任务 
	 */ 
	static SparseArray<Boolean> mSa = new SparseArray<Boolean>(1);
	 
	public static final int KEY_INVAID = -1;
	public static final int KEY_CLLECTION_DOWNLOAD_TASK = 0;
	 
	static{ 
		mSa.append(KEY_INVAID, false);
		mSa.append(KEY_CLLECTION_DOWNLOAD_TASK, false);
	} 
	 
	/** 
	 * 初始化数据为单线程模式。 
	 */ 
	static Executor sSingleExcutor = Executors.newSingleThreadExecutor();
	 
	void excute(InitDataRunable command){