Пример #1
0
  public void printBuffer() {
    ArrayList<Event> copy = (ArrayList<Event>) this.buffer.clone();

    for (Event e : copy) {
      System.out.println(e.toString());
      this.buffer.remove(e);
    }
  }
Пример #2
0
  @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;
    }
  }