Advertisement
Ankhwatcher

SynchronisedPics

Aug 4th, 2011
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. package org.gtug.trafficcam;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. import android.graphics.drawable.Drawable;
  6.  
  7. public class SynchronisedPics
  8.     {
  9.     private ArrayList<Drawable> pics = new ArrayList<Drawable>();
  10.  
  11.             public synchronized void add(Drawable newDrawable)
  12.             {
  13.                 pics.add(newDrawable);
  14.             }
  15.  
  16.             public synchronized ArrayList<Drawable> output()
  17.             {
  18.                 return pics;
  19.             }
  20.             public synchronized void restore()
  21.             {
  22.                 pics.clear();
  23.             }
  24.        
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement