public synchronized SetLayerRunnable popLayerEvent(){
  try {
    return events.remove(0);
  }
 catch (  ArrayIndexOutOfBoundsException aioobe) {
    return null;
  }
}

public synchronized SetLayerRunnable popLayerEvent ( ) { try { return events . remove ( 0 ) ; } catch ( ArrayIndexOutOfBoundsException aioobe ) { return null ; } }
return the first event on the stack , may be null if there is nothing to do .
