
org.objectweb.jonas.ant.jonasbase.Tasks Maven / Gradle / Ivy
The newest version!
/**
* JOnAS: Java(TM) Open Application Server
* Copyright (C) 2004 Bull S.A.
* Contact: [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* Initial developer: Florent BENOIT
* --------------------------------------------------------------------------
* $Id: Tasks.java 10521 2007-06-04 15:30:13Z sauthieg $
* --------------------------------------------------------------------------
*/
package org.objectweb.jonas.ant.jonasbase;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.tools.ant.Task;
/**
* @author Florent Benoit
*/
public class Tasks {
/**
* List of tasks
*/
private List tasks = null;
/**
* Default constructor
*/
public Tasks() {
tasks = new ArrayList();
}
/**
* Add a task to the list of defined tasks
* @param task to add
*/
public void addTask(Task task) {
tasks.add(task);
}
/**
* @return a list of all tasks to do
*/
public List getTasks() {
return tasks;
}
/**
* Add several tasks
* @param subTasks some tasks to do
*/
public void addTasks(Tasks subTasks) {
if (subTasks != null) {
for (Iterator it = subTasks.getTasks().iterator(); it.hasNext();) {
addTask((Task) it.next());
}
}
}
/**
* Add several tasks
* @param tasks some tasks to do
*/
public void addTasks(List tasks) {
if (tasks != null) {
for (Iterator it = tasks.iterator(); it.hasNext();) {
addTask((Task) it.next());
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy