Code example for ArrayDeque

0
/** 
 * @author zml2008 
 */ 
public class BukkitPainting extends BukkitEntity { 
    private static int spawnTask = -1;
    private static final Deque<QueuedPaintingSpawn> spawnQueue = new ArrayDeque<QueuedPaintingSpawn>();
 
    private class QueuedPaintingSpawn { 
        private final Location weLoc;
 
        public QueuedPaintingSpawn(Location weLoc) {
            this.weLoc = weLoc;
        } 
 
        public void spawn() { 
            spawnRaw(weLoc);
        } 
    } 
    private static class PaintingSpawnRunnable implements Runnable {
        @Override 
        public void run() {