source: DCWoRMS/trunk/src/schedframe/scheduling/plan/SchedulingPlanInterface.java @ 481

Revision 481, 2.5 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package schedframe.scheduling.plan;
2
3import java.util.ArrayList;
4
5import schedframe.DescriptionContainer;
6
7public interface SchedulingPlanInterface<T> extends DescriptionContainer<T> {
8
9        /**
10         *
11         *
12         * @param vTask
13         * @throws java.lang.IndexOutOfBoundsException if the index
14         * given is outside the bounds of the collection
15         */
16        public <Task> void addTask(final ScheduledTaskInterface<Task> vTask)
17                        throws java.lang.IndexOutOfBoundsException;
18
19        /**
20         *
21         *
22         * @param index
23         * @param vTask
24         * @throws java.lang.IndexOutOfBoundsException if the index
25         * given is outside the bounds of the collection
26         */
27        public <Task> void addTask(final int index,
28                        final ScheduledTaskInterface<Task> vTask)
29                        throws java.lang.IndexOutOfBoundsException;
30
31        /**
32         * Method getTask.
33         *
34         * @param index
35         * @throws java.lang.IndexOutOfBoundsException if the index
36         * given is outside the bounds of the collection
37         * @return the value of the schedframe.schedulingplan.impl.Task
38         * at the given index
39         */
40        public <Task>ScheduledTaskInterface<Task> getTask(final int index)
41                        throws java.lang.IndexOutOfBoundsException;
42
43        /**
44         * Method getTask.Returns the contents of the collection in an
45         * Array.  <p>Note:  Just in case the collection contents are
46         * changing in another thread, we pass a 0-length Array of the
47         * correct type into the API call.  This way we <i>know</i>
48         * that the Array returned is of exactly the correct length.
49         *
50         * @return this collection as an Array
51         */
52        public <Task>ScheduledTaskInterface<Task>[] getTask();
53
54        /**
55         * Method getTaskCount.
56         *
57         * @return the size of this collection
58         */
59        public int getTaskCount();
60
61        /**
62         */
63        public void removeAllTask();
64
65        /**
66         * Method removeTask.
67         *
68         * @param vTask
69         * @return true if the object was removed from the collection.
70         */
71        public <Task> boolean removeTask(final ScheduledTaskInterface<Task> vTask);
72
73        /**
74         * Method removeTaskAt.
75         *
76         * @param index
77         * @return the element removed from the collection
78         */
79        public <Task>ScheduledTaskInterface<Task> removeTaskAt(final int index);
80
81        /**
82         *
83         *
84         * @param index
85         * @param vTask
86         * @throws java.lang.IndexOutOfBoundsException if the index
87         * given is outside the bounds of the collection
88         */
89        public <Task> void setTask(final int index,
90                        final ScheduledTaskInterface<Task> vTask)
91                        throws java.lang.IndexOutOfBoundsException;
92
93        /**
94         *
95         *
96         * @param vTaskArray
97         */
98        public <Task> void setTask(final ScheduledTaskInterface<Task>[] vTaskArray);
99
100
101        public ArrayList<ScheduledTaskInterface<?>> getTasks();
102}
Note: See TracBrowser for help on using the repository browser.