1 26 27 package org.objectweb.jonas.ant.jonasbase; 28 29 import java.util.ArrayList ; 30 import java.util.Iterator ; 31 import java.util.List ; 32 33 import org.apache.tools.ant.Task; 34 35 38 public class Tasks { 39 40 43 private List tasks = null; 44 45 48 public Tasks() { 49 tasks = new ArrayList (); 50 } 51 52 56 public void addTask(Task task) { 57 tasks.add(task); 58 } 59 60 63 public List getTasks() { 64 return tasks; 65 } 66 67 71 public void addTasks(Tasks subTasks) { 72 if (subTasks != null) { 73 for (Iterator it = subTasks.getTasks().iterator(); it.hasNext();) { 74 addTask((Task) it.next()); 75 } 76 } 77 } 78 79 83 public void addTasks(List tasks) { 84 if (tasks != null) { 85 for (Iterator it = tasks.iterator(); it.hasNext();) { 86 addTask((Task) it.next()); 87 } 88 } 89 } 90 } | Popular Tags |