package jaceP2P;
-import java.util.Vector;
+import java.util.ArrayList;
+
public class ListeTask implements java.io.Serializable, java.lang.Cloneable
{
private static final long serialVersionUID = 1L ;
// attributes
- protected Vector<TaskId> liste = new Vector<TaskId>() ;
+ protected ArrayList<TaskId> liste = new ArrayList<TaskId>() ;
protected TaskId task ;
// constructor
@SuppressWarnings("unchecked")
public synchronized ListeTask clone() {
ListeTask l = new ListeTask();
- l.liste = (Vector<TaskId>) liste.clone();
+ l.liste = (ArrayList<TaskId>) liste.clone();
l.task = task;
return (l);
}
// methods
public synchronized void addTask(TaskId tsk) {
- liste.addElement(tsk);
+ liste.add( tsk ) ;
}
public synchronized TaskId getTaskIdOfHostStub(JaceInterface hostStub) {
if (is != -1) {
return (TaskId) liste.get(is);
} else {
- System.err
- .println("There is no task affected to this host stub !");
+ System.err.println("There is no task affected to this host stub !");
return null;
}
}