public void printBuffer() { ArrayList<Event> copy = (ArrayList<Event>) this.buffer.clone(); for (Event e : copy) { System.out.println(e.toString()); this.buffer.remove(e); } }
@Override public void eventRecieved(Event event) throws RemoteException { switch (this.status) { case AUTO: System.out.println(event.toString()); break; case HIDE: this.buffer.add(event); break; } }