All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tgtools.tasks.ListTask Maven / Gradle / Ivy

There is a newer version: 1.2.15
Show newest version
package tgtools.tasks;

import java.util.ArrayList;
import java.util.Collection;
/**
 * 描述了一个 Task 集合
 * @author tianjing
 *
 * @param 
 */
public  class ListTask extends ArrayList {

	public ListTask() {
		this("", null);
	}

	public ListTask(String pName) {
		this(pName, null);
	}

	public ListTask(String pName, Collection pTasks) {
		setName(pName);
		if (null != pTasks && pTasks.size() > 0) {
			super.addAll(pTasks);
		}
	}

	/**
	 * 获取任务集合的名称
	 * 
	 * @return
	 */
	public String getName() {
		return m_Name;
	}

	/**
	 * 设置任务集合的名称
	 * 
	 * @param pName
	 */
	public void setName(String pName) {
		m_Name = pName;
	}

	private String m_Name;
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 将一个任务集合添加到当前任务集合的末尾
	 * 
	 * @param pListTask
	 */
	public void Merge(ListTask pListTask) {
		super.addAll(pListTask);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy