Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public synchronized void putAll(Vector <T> vecteur ){
- while(!liste.isEmpty()){
- try{
- this.wait();//mise en attente
- }catch(InterruptedException e){}
- }
- for(int i = 0; i<liste.size();++i){
- liste.set(i, vecteur.get(i)); //remplace liste[i] par element (ds le cas ou la liste est vide add devrait produire le mm effet
- }
- this.notifyAll();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement